Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
155 SEEK
Holders
101
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 SEEKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TheSeeker
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 20000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /// @title The Seeker by Karborn /// @author transientlabs.xyz /*////////////////////////////////////////////////////////////////////////////////// // // // !!KARBORNXTRANSIENTLABS.1930-2023.SELECTALLSAVEANDEXI(S)T.LONDONSCENE!:) // // <<BEWARETHEMEDUSA!SHEWILLPETRIFYYOU?!BUILTONTHECOLLECTORSCHOICECONTRACT>> // // WELCOMETOTHESEEKER....................................................... // // // //////////////////////////////////////////////////////////////////////////////////*/ pragma solidity 0.8.19; import {CollectorsChoice} from "tl-creator-contracts/doppelganger/CollectorsChoice.sol"; contract TheSeeker is CollectorsChoice { constructor( string memory name, string memory symbol, address defaultRoyaltyRecipient, uint256 defaultRoyaltyPercentage, address initOwner, address[] memory admins, bool enableStory, address blockListRegistry ) CollectorsChoice( 0x12Ab97BDe4a92e6261fca39fe2d9670E40c5dAF2, name, symbol, defaultRoyaltyRecipient, defaultRoyaltyPercentage, initOwner, admins, enableStory, blockListRegistry ) {} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import {ERC1967Proxy} from "openzeppelin/proxy/ERC1967/ERC1967Proxy.sol"; import { OwnableAccessControlUpgradeable, NotRoleOrOwner } from "tl-sol-tools/upgradeable/access/OwnableAccessControlUpgradeable.sol"; import {IERC721} from "openzeppelin/interfaces/IERC721.sol"; /*////////////////////////////////////////////////////////////////////////// Collector's Choice //////////////////////////////////////////////////////////////////////////*/ /// @title CollectorsChoice.sol /// @notice the doppelganger contract with a twist where the ability to change URIs is locked after a time period /// @dev this works for only ERC721TL contracts, implementation contract should reflect that /// @author transientlabs.xyz /// @custom:version 2.6.0 contract CollectorsChoice is ERC1967Proxy { /*////////////////////////////////////////////////////////////////////////// Constants //////////////////////////////////////////////////////////////////////////*/ bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); // bytes32(uint256(keccak256('erc721.tl.collectorschoice')) - 1); bytes32 public constant METADATA_STORAGE_SLOT = 0x42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c; /*////////////////////////////////////////////////////////////////////////// Events //////////////////////////////////////////////////////////////////////////*/ /// @notice Event emitted when a new URI is added event NewURIAdded(address indexed sender, string newUri, uint256 index); /// @notice ERC-4906 event for when metadata is changed event MetadataUpdate(uint256 tokenId); /*////////////////////////////////////////////////////////////////////////// Errors //////////////////////////////////////////////////////////////////////////*/ error Unauthorized(); error MetadataSelectionDoesNotExist(uint256 selection); /*////////////////////////////////////////////////////////////////////////// Structs //////////////////////////////////////////////////////////////////////////*/ struct CollectorsChoiceStorage { mapping(uint256 => uint256) tokens; string[] uris; uint256 uriChangeCutoff; } /*////////////////////////////////////////////////////////////////////////// Constructor //////////////////////////////////////////////////////////////////////////*/ /// @param name: the name of the contract /// @param symbol: the symbol of the contract /// @param defaultRoyaltyRecipient: the default address for royalty payments /// @param defaultRoyaltyPercentage: the default royalty percentage of basis points (out of 10,000) /// @param initOwner: initial owner of the contract /// @param admins: array of admin addresses to add to the contract /// @param enableStory: a bool deciding whether to add story fuctionality or not /// @param blockListRegistry: address of the blocklist registry to use constructor( address implementation, string memory name, string memory symbol, address defaultRoyaltyRecipient, uint256 defaultRoyaltyPercentage, address initOwner, address[] memory admins, bool enableStory, address blockListRegistry ) ERC1967Proxy( implementation, abi.encodeWithSelector( 0x1fbd2402, // selector for "initialize(string,string,address,uint256,address,address[],bool,address)" name, symbol, defaultRoyaltyRecipient, defaultRoyaltyPercentage, initOwner, admins, enableStory, blockListRegistry ) ) {} /*////////////////////////////////////////////////////////////////////////// Admin Write Functions //////////////////////////////////////////////////////////////////////////*/ /// @notice function to add URIs to the URI array /// @dev requires contract admin or owner /// @param _newURIs: string array of URIs function addNewURIs(string[] calldata _newURIs) external { if ( msg.sender != OwnableAccessControlUpgradeable(address(this)).owner() && !OwnableAccessControlUpgradeable(address(this)).hasRole(ADMIN_ROLE, msg.sender) ) { revert Unauthorized(); } CollectorsChoiceStorage storage store; assembly { store.slot := METADATA_STORAGE_SLOT } for (uint256 i = 0; i < _newURIs.length; i++) { store.uris.push(_newURIs[i]); emit NewURIAdded(msg.sender, _newURIs[i], store.uris.length); } } /// @notice function to set the cutoff timestamp after which token URIs cannot be changed /// @dev requires contract admin or owner /// @dev cannot be set more than once /// @param _cutoffDatetime: timestamp in seconds after which the owners of the tokens cannot change URI function setCutoff(uint256 _cutoffDatetime) external { if ( msg.sender != OwnableAccessControlUpgradeable(address(this)).owner() && !OwnableAccessControlUpgradeable(address(this)).hasRole(ADMIN_ROLE, msg.sender) ) { revert Unauthorized(); } CollectorsChoiceStorage storage store; assembly { store.slot := METADATA_STORAGE_SLOT } if (store.uriChangeCutoff != 0) revert Unauthorized(); store.uriChangeCutoff = _cutoffDatetime; } /*////////////////////////////////////////////////////////////////////////// Public Write Functions //////////////////////////////////////////////////////////////////////////*/ /// @notice function for token owners to change URI for their token /// @dev requires msg.sender is the owner of tokenId /// @dev cannot change the URI after the uri change cutoff timestamp /// @param tokenId: token id of the token to change the URI for /// @param tokenUriIndex: index in the the array of the URI to point the token to function changeURI(uint256 tokenId, uint256 tokenUriIndex) external { if (IERC721(address(this)).ownerOf(tokenId) != msg.sender) revert Unauthorized(); CollectorsChoiceStorage storage store; assembly { store.slot := METADATA_STORAGE_SLOT } if (tokenUriIndex >= store.uris.length) revert MetadataSelectionDoesNotExist(tokenUriIndex); if (store.uriChangeCutoff != 0 && block.timestamp > store.uriChangeCutoff) revert Unauthorized(); store.tokens[tokenId] = tokenUriIndex; emit MetadataUpdate(tokenId); } /*////////////////////////////////////////////////////////////////////////// External View Functions //////////////////////////////////////////////////////////////////////////*/ /// @notice function to override the ERC-721 tokenURI function function tokenURI(uint256 tokenId) external view returns (string memory) { IERC721(address(this)).ownerOf(tokenId); CollectorsChoiceStorage storage store; assembly { store.slot := METADATA_STORAGE_SLOT } uint256 uri_index = store.tokens[tokenId]; return store.uris[uri_index]; } /// @notice function to return how many URIs are on the contract /// @return uint256 with that number function numURIs() external view returns (uint256) { CollectorsChoiceStorage storage store; assembly { store.slot := METADATA_STORAGE_SLOT } return store.uris.length; } /// @notice function to get the uri change cutoff timestamp /// @return uint256 with that timestamp function getCutoff() external view returns (uint256) { CollectorsChoiceStorage storage store; assembly { store.slot := METADATA_STORAGE_SLOT } return store.uriChangeCutoff; } /// @notice function to get an array of all available URIs on the contract /// @return string array of URIs function viewURIOptions() external view returns (string[] memory) { CollectorsChoiceStorage storage store; assembly { store.slot := METADATA_STORAGE_SLOT } string[] memory options = new string[](store.uris.length); for (uint256 i = 0; i < store.uris.length; i++) { options[i] = store.uris[i]; } return options; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.0; import "../Proxy.sol"; import "./ERC1967Upgrade.sol"; /** * @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 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(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {Initializable} from "openzeppelin-upgradeable/proxy/utils/Initializable.sol"; import {EnumerableSetUpgradeable} from "openzeppelin-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import {OwnableUpgradeable} from "openzeppelin-upgradeable/access/OwnableUpgradeable.sol"; /*////////////////////////////////////////////////////////////////////////// Custom Errors //////////////////////////////////////////////////////////////////////////*/ /// @dev does not have specified role error NotSpecifiedRole(bytes32 role); /// @dev is not specified role or owner error NotRoleOrOwner(bytes32 role); /*////////////////////////////////////////////////////////////////////////// OwnableAccessControlUpgradeable //////////////////////////////////////////////////////////////////////////*/ /// @title OwnableAccessControl.sol /// @notice single owner, flexible access control mechanics /// @dev can easily be extended by inheriting and applying additional roles /// @dev by default, only the owner can grant roles but by inheriting, but you /// may allow other roles to grant roles by using the internal helper. /// @author transientlabs.xyz /// @custom:version 2.2.2 abstract contract OwnableAccessControlUpgradeable is Initializable, OwnableUpgradeable { /*////////////////////////////////////////////////////////////////////////// State Variables //////////////////////////////////////////////////////////////////////////*/ using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; uint256 private _c; // counter to be able to revoke all priviledges mapping(uint256 => mapping(bytes32 => mapping(address => bool))) private _roleStatus; mapping(uint256 => mapping(bytes32 => EnumerableSetUpgradeable.AddressSet)) private _roleMembers; /*////////////////////////////////////////////////////////////////////////// Events //////////////////////////////////////////////////////////////////////////*/ /// @param from - address that authorized the role change /// @param user - the address who's role has been changed /// @param approved - boolean indicating the user's status in role /// @param role - the bytes32 role created in the inheriting contract event RoleChange(address indexed from, address indexed user, bool indexed approved, bytes32 role); /// @param from - address that authorized the revoke event AllRolesRevoked(address indexed from); /*////////////////////////////////////////////////////////////////////////// Modifiers //////////////////////////////////////////////////////////////////////////*/ modifier onlyRole(bytes32 role) { if (!hasRole(role, msg.sender)) { revert NotSpecifiedRole(role); } _; } modifier onlyRoleOrOwner(bytes32 role) { if (!hasRole(role, msg.sender) && owner() != msg.sender) { revert NotRoleOrOwner(role); } _; } /*////////////////////////////////////////////////////////////////////////// Initializer //////////////////////////////////////////////////////////////////////////*/ /// @param initOwner - the address of the initial owner function __OwnableAccessControl_init(address initOwner) internal onlyInitializing { __Ownable_init(); _transferOwnership(initOwner); __OwnableAccessControl_init_unchained(); } function __OwnableAccessControl_init_unchained() internal onlyInitializing {} /*////////////////////////////////////////////////////////////////////////// External Role Functions //////////////////////////////////////////////////////////////////////////*/ /// @notice function to revoke all roles currently present /// @dev increments the `_c` variables /// @dev requires owner privileges function revokeAllRoles() external onlyOwner { _c++; emit AllRolesRevoked(msg.sender); } /// @notice function to renounce role /// @param role - bytes32 role created in inheriting contracts function renounceRole(bytes32 role) external { address[] memory members = new address[](1); members[0] = msg.sender; _setRole(role, members, false); } /// @notice function to grant/revoke a role to an address /// @dev requires owner to call this function but this may be further /// extended using the internal helper function in inheriting contracts /// @param role - bytes32 role created in inheriting contracts /// @param roleMembers - list of addresses that should have roles attached to them based on `status` /// @param status - bool whether to remove or add `roleMembers` to the `role` function setRole(bytes32 role, address[] memory roleMembers, bool status) external onlyOwner { _setRole(role, roleMembers, status); } /*////////////////////////////////////////////////////////////////////////// External View Functions //////////////////////////////////////////////////////////////////////////*/ /// @notice function to see if an address is the owner /// @param role - bytes32 role created in inheriting contracts /// @param potentialRoleMember - address to check for role membership function hasRole(bytes32 role, address potentialRoleMember) public view returns (bool) { return _roleStatus[_c][role][potentialRoleMember]; } /// @notice function to get role members /// @param role - bytes32 role created in inheriting contracts function getRoleMembers(bytes32 role) public view returns (address[] memory) { return _roleMembers[_c][role].values(); } /*////////////////////////////////////////////////////////////////////////// Internal Helper Functions //////////////////////////////////////////////////////////////////////////*/ /// @notice helper function to set addresses for a role /// @param role - bytes32 role created in inheriting contracts /// @param roleMembers - list of addresses that should have roles attached to them based on `status` /// @param status - bool whether to remove or add `roleMembers` to the `role` function _setRole(bytes32 role, address[] memory roleMembers, bool status) internal { for (uint256 i = 0; i < roleMembers.length; i++) { _roleStatus[_c][role][roleMembers[i]] = status; if (status) { _roleMembers[_c][role].add(roleMembers[i]); } else { _roleMembers[_c][role].remove(roleMembers[i]); } emit RoleChange(msg.sender, roleMembers[i], status, role); } } /*////////////////////////////////////////////////////////////////////////// Upgradeability Gap //////////////////////////////////////////////////////////////////////////*/ /// @dev gap variable - see https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[50] private _gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) pragma solidity ^0.8.0; import "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) 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 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 { _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 overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/IERC1967.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @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 is IERC1967 { // 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 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 _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @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 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 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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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); }
// SPDX-License-Identifier: MIT // 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.9._ */ interface IERC1967 { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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); }
{ "remappings": [ "blocklist/=lib/tl-creator-contracts/lib/blocklist/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/tl-creator-contracts/lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/tl-creator-contracts/lib/openzeppelin-contracts/", "openzeppelin-upgradeable/=lib/tl-creator-contracts/lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin/=lib/tl-creator-contracts/lib/openzeppelin-contracts/contracts/", "sstore2/=lib/tl-creator-contracts/lib/sstore2/contracts/", "story-contract/=lib/tl-creator-contracts/lib/story-contract/src/", "tl-blocklist/=lib/tl-creator-contracts/lib/blocklist/src/", "tl-creator-contracts/=lib/tl-creator-contracts/src/", "tl-creator/=lib/tl-creator-contracts/src/", "tl-sol-tools/=lib/tl-creator-contracts/lib/tl-sol-tools/src/", "tl-story/=lib/tl-creator-contracts/lib/story-contract/src/", "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/", "lib/tl-creator-contracts:blocklist/=lib/tl-creator-contracts/lib/blocklist/src/", "lib/tl-creator-contracts:ds-test/=lib/tl-creator-contracts/lib/forge-std/lib/ds-test/src/", "lib/tl-creator-contracts:forge-std/=lib/tl-creator-contracts/lib/forge-std/src/", "lib/tl-creator-contracts:openzeppelin-contracts-upgradeable/=lib/tl-creator-contracts/lib/openzeppelin-contracts-upgradeable/", "lib/tl-creator-contracts:openzeppelin-contracts/=lib/tl-creator-contracts/lib/openzeppelin-contracts/", "lib/tl-creator-contracts:openzeppelin-upgradeable/=lib/tl-creator-contracts/lib/openzeppelin-contracts-upgradeable/contracts/", "lib/tl-creator-contracts:openzeppelin/=lib/tl-creator-contracts/lib/openzeppelin-contracts/contracts/", "lib/tl-creator-contracts:sstore2/=lib/tl-creator-contracts/lib/sstore2/contracts/", "lib/tl-creator-contracts:story-contract/=lib/tl-creator-contracts/lib/story-contract/src/", "lib/tl-creator-contracts:tl-blocklist/=lib/tl-creator-contracts/lib/blocklist/src/", "lib/tl-creator-contracts:tl-creator-contracts/=lib/tl-creator-contracts/src/", "lib/tl-creator-contracts:tl-sol-tools/=lib/tl-creator-contracts/lib/tl-sol-tools/src/", "lib/tl-creator-contracts:tl-story/=lib/tl-creator-contracts/lib/story-contract/src/" ], "optimizer": { "enabled": true, "runs": 20000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"defaultRoyaltyRecipient","type":"address"},{"internalType":"uint256","name":"defaultRoyaltyPercentage","type":"uint256"},{"internalType":"address","name":"initOwner","type":"address"},{"internalType":"address[]","name":"admins","type":"address[]"},{"internalType":"bool","name":"enableStory","type":"bool"},{"internalType":"address","name":"blockListRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"selection","type":"uint256"}],"name":"MetadataSelectionDoesNotExist","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"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":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"string","name":"newUri","type":"string"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"NewURIAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"METADATA_STORAGE_SLOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"_newURIs","type":"string[]"}],"name":"addNewURIs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"tokenUriIndex","type":"uint256"}],"name":"changeURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCutoff","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numURIs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cutoffDatetime","type":"uint256"}],"name":"setCutoff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewURIOptions","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620018ae380380620018ae8339810160408190526200003491620004f6565b7312ab97bde4a92e6261fca39fe2d9670e40c5daf2888888888888888888631fbd24028989898989898989604051602401620000789897969594939291906200060a565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050620000b882826000620000d160201b60201c565b50505050505050505050505050505050505050620006f5565b620000dc8362000103565b600082511180620000ea5750805b15620000fe57620000fc838362000145565b505b505050565b6200010e8162000174565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200016d8383604051806060016040528060278152602001620018876027913962000228565b9392505050565b6001600160a01b0381163b620001e75760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b031685604051620002479190620006c2565b600060405180830381855af49150503d806000811462000284576040519150601f19603f3d011682016040523d82523d6000602084013e62000289565b606091505b5090925090506200029d86838387620002a7565b9695505050505050565b606083156200031b57825160000362000313576001600160a01b0385163b620003135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001de565b508162000327565b6200032783836200032f565b949350505050565b815115620003405781518083602001fd5b8060405162461bcd60e51b8152600401620001de9190620006e0565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200039d576200039d6200035c565b604052919050565b60005b83811015620003c2578181015183820152602001620003a8565b50506000910152565b600082601f830112620003dd57600080fd5b81516001600160401b03811115620003f957620003f96200035c565b6200040e601f8201601f191660200162000372565b8181528460208386010111156200042457600080fd5b62000327826020830160208701620003a5565b80516001600160a01b03811681146200044f57600080fd5b919050565b600082601f8301126200046657600080fd5b815160206001600160401b038211156200048457620004846200035c565b8160051b6200049582820162000372565b9283528481018201928281019087851115620004b057600080fd5b83870192505b84831015620004da57620004ca8362000437565b82529183019190830190620004b6565b979650505050505050565b805180151581146200044f57600080fd5b600080600080600080600080610100898b0312156200051457600080fd5b88516001600160401b03808211156200052c57600080fd5b6200053a8c838d01620003cb565b995060208b01519150808211156200055157600080fd5b6200055f8c838d01620003cb565b98506200056f60408c0162000437565b975060608b015196506200058660808c0162000437565b955060a08b01519150808211156200059d57600080fd5b50620005ac8b828c0162000454565b935050620005bd60c08a01620004e5565b9150620005cd60e08a0162000437565b90509295985092959890939650565b60008151808452620005f6816020860160208601620003a5565b601f01601f19169290920160200192915050565b6000610100808352620006208184018c620005dc565b905060208382038185015262000637828c620005dc565b6001600160a01b038b81166040870152606086018b9052898116608087015285820360a08701528851808352838a019450909183019060005b818110156200069057855184168352948401949184019160010162000670565b505087151560c08701529350620006a692505050565b6001600160a01b03831660e08301529998505050505050505050565b60008251620006d6818460208701620003a5565b9190910192915050565b6020815260006200016d6020830184620005dc565b61118280620007056000396000f3fe60806040526004361061009a5760003560e01c8063a90a9b1411610069578063c87b56dd1161004e578063c87b56dd146101be578063d3821d33146101eb578063d7bf91101461021f576100a9565b8063a90a9b1414610168578063b26dd8881461019c576100a9565b80634d770ca3146100b157806356604b10146100d157806375b238fc14610114578063838532cb14610148576100a9565b366100a9576100a761023f565b005b6100a761023f565b3480156100bd57600080fd5b506100a76100cc366004610c0a565b610251565b3480156100dd57600080fd5b507f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04e545b6040519081526020015b60405180910390f35b34801561012057600080fd5b506101017fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561015457600080fd5b506100a7610163366004610c2c565b610431565b34801561017457600080fd5b506101017f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c81565b3480156101a857600080fd5b506101b161069c565b60405161010b9190610d05565b3480156101ca57600080fd5b506101de6101d9366004610d85565b610822565b60405161010b9190610d9e565b3480156101f757600080fd5b507f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d54610101565b34801561022b57600080fd5b506100a761023a366004610d85565b61099f565b61024f61024a610b9c565b610be1565b565b6040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810183905233903090636352211e90602401602060405180830381865afa1580156102a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cc9190610db8565b73ffffffffffffffffffffffffffffffffffffffff1614610319576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d547f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c90821061039c576040517f96c3127f0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6002810154158015906103b25750806002015442115b156103e9576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152602082815260409182902084905590518481527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7910160405180910390a1505050565b3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561047c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a09190610db8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561057657506040517f91d148540000000000000000000000000000000000000000000000000000000081527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775600482015233602482015230906391d1485490604401602060405180830381865afa158015610550573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105749190610dee565b155b156105ad576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c60005b8281101561069657816001018484838181106105ef576105ef610e10565b90506020028101906106019190610e3f565b825460018101845560009384526020909320909201916106219183610f7b565b50337f3fa37899d3e07425ef4abd03938bc891270cd668fe895d147cef6dfcd0e438a385858481811061065657610656610e10565b90506020028101906106689190610e3f565b600186015460405161067c93929190611096565b60405180910390a28061068e816110ed565b9150506105d1565b50505050565b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d546060907f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c9060009067ffffffffffffffff8111156106fe576106fe610eab565b60405190808252806020026020018201604052801561073157816020015b606081526020019060019003908161071c5790505b50905060005b600183015481101561081b5782600101818154811061075857610758610e10565b90600052602060002001805461076d90610eda565b80601f016020809104026020016040519081016040528092919081815260200182805461079990610eda565b80156107e65780601f106107bb576101008083540402835291602001916107e6565b820191906000526020600020905b8154815290600101906020018083116107c957829003601f168201915b50505050508282815181106107fd576107fd610e10565b60200260200101819052508080610813906110ed565b915050610737565b5092915050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018290526060903090636352211e90602401602060405180830381865afa15801561087a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089e9190610db8565b5060008281527f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c60208190526040909120547f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d80548290811061090357610903610e10565b90600052602060002001805461091890610eda565b80601f016020809104026020016040519081016040528092919081815260200182805461094490610eda565b80156109915780601f1061096657610100808354040283529160200191610991565b820191906000526020600020905b81548152906001019060200180831161097457829003601f168201915b505050505092505050919050565b3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0e9190610db8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610ae457506040517f91d148540000000000000000000000000000000000000000000000000000000081527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775600482015233602482015230906391d1485490604401602060405180830381865afa158015610abe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae29190610dee565b155b15610b1b576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04e547f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c9015610b96576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60020155565b6000610bdc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e808015610c00573d6000f35b3d6000fd5b505050565b60008060408385031215610c1d57600080fd5b50508035926020909101359150565b60008060208385031215610c3f57600080fd5b823567ffffffffffffffff80821115610c5757600080fd5b818501915085601f830112610c6b57600080fd5b813581811115610c7a57600080fd5b8660208260051b8501011115610c8f57600080fd5b60209290920196919550909350505050565b6000815180845260005b81811015610cc757602081850181015186830182015201610cab565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610d78577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452610d66858351610ca1565b94509285019290850190600101610d2c565b5092979650505050505050565b600060208284031215610d9757600080fd5b5035919050565b602081526000610db16020830184610ca1565b9392505050565b600060208284031215610dca57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610db157600080fd5b600060208284031215610e0057600080fd5b81518015158114610db157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610e7457600080fd5b83018035915067ffffffffffffffff821115610e8f57600080fd5b602001915036819003821315610ea457600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c90821680610eee57607f821691505b602082108103610f27577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610c0557600081815260208120601f850160051c81016020861015610f545750805b601f850160051c820191505b81811015610f7357828155600101610f60565b505050505050565b67ffffffffffffffff831115610f9357610f93610eab565b610fa783610fa18354610eda565b83610f2d565b6000601f841160018114610ff95760008515610fc35750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835561108f565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156110485786850135825560209485019460019092019101611028565b5086821015611083577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6040815282604082015282846060830137600060608483010152600060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601168301019050826020830152949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611145577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220d37efa5cf22984a8111d16e30b916456b35b72349146b90f0268ce7932e3739d64736f6c63430008130033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c656400000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d0a030f8f91eaec83a31afc793c736fe396cf0be0000000000000000000000000000000000000000000000000000000000000190000000000000000000000000d0a030f8f91eaec83a31afc793c736fe396cf0be0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000100000000000000000000000056fe4de01b15bb2afa969f914692867acac27ba5000000000000000000000000000000000000000000000000000000000000000a544845205345454b45520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045345454b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bfcb7fc3ec9923ae2e20c8ec6c5fc43a4c23f089
Deployed Bytecode
0x60806040526004361061009a5760003560e01c8063a90a9b1411610069578063c87b56dd1161004e578063c87b56dd146101be578063d3821d33146101eb578063d7bf91101461021f576100a9565b8063a90a9b1414610168578063b26dd8881461019c576100a9565b80634d770ca3146100b157806356604b10146100d157806375b238fc14610114578063838532cb14610148576100a9565b366100a9576100a761023f565b005b6100a761023f565b3480156100bd57600080fd5b506100a76100cc366004610c0a565b610251565b3480156100dd57600080fd5b507f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04e545b6040519081526020015b60405180910390f35b34801561012057600080fd5b506101017fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b34801561015457600080fd5b506100a7610163366004610c2c565b610431565b34801561017457600080fd5b506101017f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c81565b3480156101a857600080fd5b506101b161069c565b60405161010b9190610d05565b3480156101ca57600080fd5b506101de6101d9366004610d85565b610822565b60405161010b9190610d9e565b3480156101f757600080fd5b507f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d54610101565b34801561022b57600080fd5b506100a761023a366004610d85565b61099f565b61024f61024a610b9c565b610be1565b565b6040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810183905233903090636352211e90602401602060405180830381865afa1580156102a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cc9190610db8565b73ffffffffffffffffffffffffffffffffffffffff1614610319576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d547f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c90821061039c576040517f96c3127f0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6002810154158015906103b25750806002015442115b156103e9576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152602082815260409182902084905590518481527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7910160405180910390a1505050565b3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561047c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a09190610db8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561057657506040517f91d148540000000000000000000000000000000000000000000000000000000081527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775600482015233602482015230906391d1485490604401602060405180830381865afa158015610550573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105749190610dee565b155b156105ad576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c60005b8281101561069657816001018484838181106105ef576105ef610e10565b90506020028101906106019190610e3f565b825460018101845560009384526020909320909201916106219183610f7b565b50337f3fa37899d3e07425ef4abd03938bc891270cd668fe895d147cef6dfcd0e438a385858481811061065657610656610e10565b90506020028101906106689190610e3f565b600186015460405161067c93929190611096565b60405180910390a28061068e816110ed565b9150506105d1565b50505050565b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d546060907f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c9060009067ffffffffffffffff8111156106fe576106fe610eab565b60405190808252806020026020018201604052801561073157816020015b606081526020019060019003908161071c5790505b50905060005b600183015481101561081b5782600101818154811061075857610758610e10565b90600052602060002001805461076d90610eda565b80601f016020809104026020016040519081016040528092919081815260200182805461079990610eda565b80156107e65780601f106107bb576101008083540402835291602001916107e6565b820191906000526020600020905b8154815290600101906020018083116107c957829003601f168201915b50505050508282815181106107fd576107fd610e10565b60200260200101819052508080610813906110ed565b915050610737565b5092915050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018290526060903090636352211e90602401602060405180830381865afa15801561087a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089e9190610db8565b5060008281527f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c60208190526040909120547f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04d80548290811061090357610903610e10565b90600052602060002001805461091890610eda565b80601f016020809104026020016040519081016040528092919081815260200182805461094490610eda565b80156109915780601f1061096657610100808354040283529160200191610991565b820191906000526020600020905b81548152906001019060200180831161097457829003601f168201915b505050505092505050919050565b3073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0e9190610db8565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015610ae457506040517f91d148540000000000000000000000000000000000000000000000000000000081527fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775600482015233602482015230906391d1485490604401602060405180830381865afa158015610abe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae29190610dee565b155b15610b1b576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04e547f42e4ec1f98e793b22ce6d3d94dac69be208b1022748a25a29587cf3b64c7a04c9015610b96576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60020155565b6000610bdc7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e808015610c00573d6000f35b3d6000fd5b505050565b60008060408385031215610c1d57600080fd5b50508035926020909101359150565b60008060208385031215610c3f57600080fd5b823567ffffffffffffffff80821115610c5757600080fd5b818501915085601f830112610c6b57600080fd5b813581811115610c7a57600080fd5b8660208260051b8501011115610c8f57600080fd5b60209290920196919550909350505050565b6000815180845260005b81811015610cc757602081850181015186830182015201610cab565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610d78577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452610d66858351610ca1565b94509285019290850190600101610d2c565b5092979650505050505050565b600060208284031215610d9757600080fd5b5035919050565b602081526000610db16020830184610ca1565b9392505050565b600060208284031215610dca57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610db157600080fd5b600060208284031215610e0057600080fd5b81518015158114610db157600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610e7457600080fd5b83018035915067ffffffffffffffff821115610e8f57600080fd5b602001915036819003821315610ea457600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c90821680610eee57607f821691505b602082108103610f27577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610c0557600081815260208120601f850160051c81016020861015610f545750805b601f850160051c820191505b81811015610f7357828155600101610f60565b505050505050565b67ffffffffffffffff831115610f9357610f93610eab565b610fa783610fa18354610eda565b83610f2d565b6000601f841160018114610ff95760008515610fc35750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b17835561108f565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156110485786850135825560209485019460019092019101611028565b5086821015611083577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6040815282604082015282846060830137600060608483010152600060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601168301019050826020830152949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611145577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220d37efa5cf22984a8111d16e30b916456b35b72349146b90f0268ce7932e3739d64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d0a030f8f91eaec83a31afc793c736fe396cf0be0000000000000000000000000000000000000000000000000000000000000190000000000000000000000000d0a030f8f91eaec83a31afc793c736fe396cf0be0000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000100000000000000000000000056fe4de01b15bb2afa969f914692867acac27ba5000000000000000000000000000000000000000000000000000000000000000a544845205345454b45520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045345454b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bfcb7fc3ec9923ae2e20c8ec6c5fc43a4c23f089
-----Decoded View---------------
Arg [0] : name (string): THE SEEKER
Arg [1] : symbol (string): SEEK
Arg [2] : defaultRoyaltyRecipient (address): 0xd0A030f8F91Eaec83A31AFC793c736fe396cf0bE
Arg [3] : defaultRoyaltyPercentage (uint256): 400
Arg [4] : initOwner (address): 0xd0A030f8F91Eaec83A31AFC793c736fe396cf0bE
Arg [5] : admins (address[]): 0xbfCb7FC3Ec9923Ae2e20C8eC6C5fc43A4c23F089
Arg [6] : enableStory (bool): True
Arg [7] : blockListRegistry (address): 0x56Fe4de01B15BB2AFA969f914692867acaC27ba5
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 000000000000000000000000d0a030f8f91eaec83a31afc793c736fe396cf0be
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000190
Arg [4] : 000000000000000000000000d0a030f8f91eaec83a31afc793c736fe396cf0be
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 00000000000000000000000056fe4de01b15bb2afa969f914692867acac27ba5
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [9] : 544845205345454b455200000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [11] : 5345454b00000000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [13] : 000000000000000000000000bfcb7fc3ec9923ae2e20c8ec6c5fc43a4c23f089
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.