ERC-721
Overview
Max Total Supply
3 PGMN
Holders
2
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 PGMNLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PagemanNFT
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // __ _ // / _| | // _ __ __ _ __ _ ___ _ __ ___ __ _ _ __ _ __ | |_| |_ // | '_ \ / _` |/ _` |/ _ \ '_ ` _ \ / _` | '_ \ | '_ \| _| __| // | |_) | (_| | (_| | __/ | | | | | (_| | | | | | | | | | | |_ // | .__/ \__,_|\__, |\___|_| |_| |_|\__,_|_| |_| |_| |_|_| \__| // | | __/ | // _| |___/ import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "erc721b/contracts/ERC721B.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract PagemanNFT is ERC721B, Ownable, AccessControl, IERC721Metadata { using Strings for uint256; bytes32 private constant _MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 private constant _CURATOR_ROLE = keccak256("CURATOR_ROLE"); string private _URI; uint256 public constant MAX_SUPPLY = 50; constructor(address admin) { _setupRole(DEFAULT_ADMIN_ROLE, admin); } function name () external pure returns (string memory) { return "Pageman NFT"; } function symbol () external pure returns (string memory) { return "PGMN"; } function mint(address to, uint256 amount) external onlyRole(_MINTER_ROLE) { if (totalSupply() + amount > MAX_SUPPLY) revert("supply is exceeded"); _safeMint(to, amount); } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl,ERC721B,IERC165) returns (bool) { return super.supportsInterface(interfaceId); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert ("token does not exist"); return bytes(_URI).length > 0 ? string(abi.encodePacked(_URI, tokenId.toString(),".json")) : ""; } function setURI(string memory uri) external onlyRole(_CURATOR_ROLE) { _URI = uri; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; error InvalidCall(); error BalanceQueryZeroAddress(); error NonExistentToken(); error ApprovalToCurrentOwner(); error ApprovalOwnerIsOperator(); error NotERC721Receiver(); error ERC721ReceiverNotReceived(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] * Non-Fungible Token Standard, including the Metadata extension and * token Auto-ID generation. * * You must provide `name()` `symbol()` and `tokenURI(uint256 tokenId)` * to conform with IERC721Metadata */ abstract contract ERC721B is Context, ERC165, IERC721 { // ============ Storage ============ // The last token id minted uint256 private _lastTokenId; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; // Mapping owner address to token count mapping(address => uint256) internal _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============ Read Methods ============ /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns(uint256) { if (owner == address(0)) revert BalanceQueryZeroAddress(); return _balances[owner]; } /** * @dev Shows the overall amount of tokens generated in the contract */ function totalSupply() public view virtual returns(uint256) { return _lastTokenId; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns(address) { unchecked { //this is the situation when _owners normalized uint256 id = tokenId; if (_owners[id] != address(0)) { return _owners[id]; } //this is the situation when _owners is not normalized if (id > 0 && id <= _lastTokenId) { //there will never be a case where token 1 is address(0) while(true) { id--; if (id == 0) { break; } else if (_owners[id] != address(0)) { return _owners[id]; } } } } revert NonExistentToken(); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns(bool) { return interfaceId == type(IERC721).interfaceId || super.supportsInterface(interfaceId); } // ============ Approval Methods ============ /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721B.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); address sender = _msgSender(); if (sender != owner && !isApprovedForAll(owner, sender)) revert ApprovalToCurrentOwner(); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns(address) { if (!_exists(tokenId)) revert NonExistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId, address owner) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev transfers token considering approvals */ function _approveTransfer( address spender, address from, address to, uint256 tokenId ) internal virtual { if (!_isApprovedOrOwner(spender, tokenId, from)) revert InvalidCall(); _transfer(from, to, tokenId); } /** * @dev Safely transfers token considering approvals */ function _approveSafeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _approveTransfer(_msgSender(), from, to, tokenId); //see: @openzep/utils/Address.sol if (to.code.length > 0 && !_checkOnERC721Received(from, to, tokenId, _data) ) revert ERC721ReceiverNotReceived(); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner( address spender, uint256 tokenId, address owner ) internal view virtual returns(bool) { return spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { if (owner == operator) revert ApprovalOwnerIsOperator(); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } // ============ Mint Methods ============ /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} * whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint( address to, uint256 amount, bytes memory _data, bool safeCheck ) private { if(amount == 0 || to == address(0)) revert InvalidCall(); uint256 startTokenId = _lastTokenId + 1; _beforeTokenTransfers(address(0), to, startTokenId, amount); unchecked { _lastTokenId += amount; _balances[to] += amount; _owners[startTokenId] = to; _afterTokenTransfers(address(0), to, startTokenId, amount); uint256 updatedIndex = startTokenId; uint256 endIndex = updatedIndex + amount; //if do safe check and, //check if contract one time (instead of loop) //see: @openzep/utils/Address.sol if (safeCheck && to.code.length > 0) { //loop emit transfer and received check do { emit Transfer(address(0), to, updatedIndex); if (!_checkOnERC721Received(address(0), to, updatedIndex++, _data)) revert ERC721ReceiverNotReceived(); } while (updatedIndex != endIndex); return; } do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != endIndex); } } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a * safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 amount) internal virtual { _safeMint(to, amount, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], * with an additional `data` parameter which is forwarded in * {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 amount, bytes memory _data ) internal virtual { _mint(to, amount, _data, true); } // ============ Transfer Methods ============ /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _approveTransfer(_msgSender(), from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _approveSafeTransfer(from, to, tokenId, _data); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} * on a target address. The call is not executed if the target address * is not a contract. */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert NotERC721Receiver(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via * {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId > 0 && tokenId <= _lastTokenId; } /** * @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. * * `_data` is additional data, it has no specified format and it is * sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can * be used to e.g. * implement alternative mechanisms to perform token transfer, such as * signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a * safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); //see: @openzep/utils/Address.sol if (to.code.length > 0 && !_checkOnERC721Received(from, to, tokenId, _data) ) revert ERC721ReceiverNotReceived(); } /** * @dev Transfers `tokenId` from `from` to `to`. As opposed to * {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) private { //if transfer to null or not the owner if (to == address(0) || from != ERC721B.ownerOf(tokenId)) revert InvalidCall(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); unchecked { //this is the situation when _owners are normalized _balances[to] += 1; _balances[from] -= 1; _owners[tokenId] = to; //this is the situation when _owners are not normalized uint256 nextTokenId = tokenId + 1; if (nextTokenId <= _lastTokenId && _owners[nextTokenId] == address(0)) { _owners[nextTokenId] = from; } } _afterTokenTransfers(from, to, tokenId, 1); emit Transfer(from, to, tokenId); } // ============ TODO Methods ============ /** * @dev Hook that is called before a set of serially-ordered token ids * are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * amount - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` * will be transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 amount ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids * have been transferred. This includes minting. * * startTokenId - the first token id to be transferred * amount - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * 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 (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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 Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalOwnerIsOperator","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"BalanceQueryZeroAddress","type":"error"},{"inputs":[],"name":"ERC721ReceiverNotReceived","type":"error"},{"inputs":[],"name":"InvalidCall","type":"error"},{"inputs":[],"name":"NonExistentToken","type":"error"},{"inputs":[],"name":"NotERC721Receiver","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001c3c38038062001c3c833981016040819052620000349162000159565b6200003f3362000053565b6200004c600082620000a5565b506200018b565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620000b18282620000b5565b5050565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620000b15760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001153390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000602082840312156200016c57600080fd5b81516001600160a01b03811681146200018457600080fd5b9392505050565b611aa1806200019b6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80636352211e116100de578063a217fddf11610097578063c87b56dd11610071578063c87b56dd1461037a578063d547741f1461038d578063e985e9c5146103a0578063f2fde38b146103b357600080fd5b8063a217fddf1461034c578063a22cb46514610354578063b88d4fde1461036757600080fd5b80636352211e146102da57806370a08231146102ed578063715018a6146103005780638da5cb5b1461030857806391d148541461031957806395d89b411461032c57600080fd5b806323b872dd1161014b57806332cb6b0c1161012557806332cb6b0c1461029957806336568abe146102a157806340c10f19146102b457806342842e0e146102c757600080fd5b806323b872dd14610250578063248a9ca3146102635780632f2ff15d1461028657600080fd5b806301ffc9a71461019357806302fe5305146101bb57806306fdde03146101d0578063081812fc14610200578063095ea7b31461022b57806318160ddd1461023e575b600080fd5b6101a66101a136600461147f565b6103c6565b60405190151581526020015b60405180910390f35b6101ce6101c9366004611528565b6103d7565b005b60408051808201909152600b81526a141859d95b585b8813919560aa1b60208201525b6040516101b291906115c9565b61021361020e3660046115dc565b610419565b6040516001600160a01b0390911681526020016101b2565b6101ce610239366004611611565b61045d565b6000545b6040519081526020016101b2565b6101ce61025e36600461163b565b6104ed565b6102426102713660046115dc565b60009081526006602052604090206001015490565b6101ce610294366004611677565b6104f9565b610242603281565b6101ce6102af366004611677565b61051e565b6101ce6102c2366004611611565b6105a1565b6101ce6102d536600461163b565b61062e565b6102136102e83660046115dc565b610649565b6102426102fb3660046116a3565b610706565b6101ce61074b565b6005546001600160a01b0316610213565b6101a6610327366004611677565b61075f565b6040805180820190915260048152632823a6a760e11b60208201526101f3565b610242600081565b6101ce6103623660046116be565b61078a565b6101ce6103753660046116fa565b610795565b6101f36103883660046115dc565b6107a1565b6101ce61039b366004611677565b61084b565b6101a66103ae366004611776565b610870565b6101ce6103c13660046116a3565b61089e565b60006103d182610917565b92915050565b7f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a106104018161093c565b81516104149060079060208501906113d0565b505050565b600061042482610946565b61044157604051634a1850bf60e11b815260040160405180910390fd5b506000908152600360205260409020546001600160a01b031690565b600061046882610649565b9050806001600160a01b0316836001600160a01b0316141561049d5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821681148015906104be57506104bc8282610870565b155b156104dc5760405163250fdee360e21b815260040160405180910390fd5b6104e784848461095b565b50505050565b610414338484846109b7565b6000828152600660205260409020600101546105148161093c565b61041483836109ea565b6001600160a01b03811633146105935760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61059d8282610a70565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66105cb8161093c565b6032826105d760005490565b6105e191906117b6565b11156106245760405162461bcd60e51b81526020600482015260126024820152711cdd5c1c1b1e481a5cc8195e18d95959195960721b604482015260640161058a565b6104148383610ad7565b61041483838360405180602001604052806000815250610795565b60008181526001602052604081205482906001600160a01b031615610686576000908152600160205260409020546001600160a01b031692915050565b60008111801561069857506000548111155b156106ec575b60001901806106ac576106ec565b6000818152600160205260409020546001600160a01b0316156106e7576000908152600160205260409020546001600160a01b031692915050565b61069e565b50604051634a1850bf60e11b815260040160405180910390fd5b60006001600160a01b03821661072f576040516316285dcb60e11b815260040160405180910390fd5b506001600160a01b031660009081526002602052604090205490565b610753610af1565b61075d6000610b4b565b565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61059d338383610b9d565b6104e784848484610c3d565b60606107ac82610946565b6107ef5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161058a565b6000600780546107fe906117ce565b90501161081a57604051806020016040528060008152506103d1565b600761082583610c8a565b604051602001610836929190611825565b60405160208183030381529060405292915050565b6000828152600660205260409020600101546108668161093c565b6104148383610a70565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6108a6610af1565b6001600160a01b03811661090b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161058a565b61091481610b4b565b50565b60006001600160e01b03198216637965db0b60e01b14806103d157506103d182610d90565b6109148133610dc5565b600080821180156103d1575050600054101590565b60008281526003602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6109c2848285610e29565b6109df5760405163574b16a760e11b815260040160405180910390fd5b6104e7838383610e74565b6109f4828261075f565b61059d5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610a2c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610a7a828261075f565b1561059d5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61059d828260405180602001604052806000815250610fbc565b6005546001600160a01b0316331461075d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161058a565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415610bd05760405163079f14e360e51b815260040160405180910390fd5b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610c49338585856109b7565b6000836001600160a01b03163b118015610c6c5750610c6a84848484610fc9565b155b156104e757604051631f11849560e21b815260040160405180910390fd5b606081610cae5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610cd85780610cc2816118e0565b9150610cd19050600a83611911565b9150610cb2565b60008167ffffffffffffffff811115610cf357610cf361149c565b6040519080825280601f01601f191660200182016040528015610d1d576020820181803683370190505b5090505b8415610d8857610d32600183611925565b9150610d3f600a8661193c565b610d4a9060306117b6565b60f81b818381518110610d5f57610d5f611950565b60200101906001600160f81b031916908160001a905350610d81600a86611911565b9450610d21565b949350505050565b60006001600160e01b031982166380ac58cd60e01b14806103d157506301ffc9a760e01b6001600160e01b03198316146103d1565b610dcf828261075f565b61059d57610de7816001600160a01b031660146110c0565b610df28360206110c0565b604051602001610e03929190611966565b60408051601f198184030181529082905262461bcd60e51b825261058a916004016115c9565b6000816001600160a01b0316846001600160a01b03161480610e645750836001600160a01b0316610e5984610419565b6001600160a01b0316145b80610d885750610d888285610870565b6001600160a01b0382161580610ea45750610e8e81610649565b6001600160a01b0316836001600160a01b031614155b15610ec25760405163574b16a760e11b815260040160405180910390fd5b610ece6000828561095b565b6001600160a01b038083166000818152600260209081526040808320805460019081019091559488168352808320805460001901905585835290849052812080546001600160a01b03191690921790915554908201908111801590610f4857506000818152600160205260409020546001600160a01b0316155b15610f7557600081815260016020526040902080546001600160a01b0319166001600160a01b0386161790555b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6104148383836001611263565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290610ffe9033908990889088906004016119db565b602060405180830381600087803b15801561101857600080fd5b505af1925050508015611048575060408051601f3d908101601f1916820190925261104591810190611a18565b60015b6110a3573d808015611076576040519150601f19603f3d011682016040523d82523d6000602084013e61107b565b606091505b50805161109b57604051630568cbab60e01b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060006110cf836002611a35565b6110da9060026117b6565b67ffffffffffffffff8111156110f2576110f261149c565b6040519080825280601f01601f19166020018201604052801561111c576020820181803683370190505b509050600360fc1b8160008151811061113757611137611950565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061116657611166611950565b60200101906001600160f81b031916908160001a905350600061118a846002611a35565b6111959060016117b6565b90505b600181111561120d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106111c9576111c9611950565b1a60f81b8282815181106111df576111df611950565b60200101906001600160f81b031916908160001a90535060049490941c9361120681611a54565b9050611198565b50831561125c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161058a565b9392505050565b82158061127757506001600160a01b038416155b156112955760405163574b16a760e11b815260040160405180910390fd5b600080546112a49060016117b6565b905060008054850181556001600160a01b038616808252600260209081526040808420805489019055848452600190915290912080546001600160a01b03191690911790558084810183801561130457506000876001600160a01b03163b115b15611382575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46113556000888480600101955088610fc9565b61137257604051631f11849560e21b815260040160405180910390fd5b8082141561130a575050506104e7565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156113835750505050505050565b8280546113dc906117ce565b90600052602060002090601f0160209004810192826113fe5760008555611444565b82601f1061141757805160ff1916838001178555611444565b82800160010185558215611444579182015b82811115611444578251825591602001919060010190611429565b50611450929150611454565b5090565b5b808211156114505760008155600101611455565b6001600160e01b03198116811461091457600080fd5b60006020828403121561149157600080fd5b813561125c81611469565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156114cd576114cd61149c565b604051601f8501601f19908116603f011681019082821181831017156114f5576114f561149c565b8160405280935085815286868601111561150e57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561153a57600080fd5b813567ffffffffffffffff81111561155157600080fd5b8201601f8101841361156257600080fd5b610d88848235602084016114b2565b60005b8381101561158c578181015183820152602001611574565b838111156104e75750506000910152565b600081518084526115b5816020860160208601611571565b601f01601f19169290920160200192915050565b60208152600061125c602083018461159d565b6000602082840312156115ee57600080fd5b5035919050565b80356001600160a01b038116811461160c57600080fd5b919050565b6000806040838503121561162457600080fd5b61162d836115f5565b946020939093013593505050565b60008060006060848603121561165057600080fd5b611659846115f5565b9250611667602085016115f5565b9150604084013590509250925092565b6000806040838503121561168a57600080fd5b8235915061169a602084016115f5565b90509250929050565b6000602082840312156116b557600080fd5b61125c826115f5565b600080604083850312156116d157600080fd5b6116da836115f5565b9150602083013580151581146116ef57600080fd5b809150509250929050565b6000806000806080858703121561171057600080fd5b611719856115f5565b9350611727602086016115f5565b925060408501359150606085013567ffffffffffffffff81111561174a57600080fd5b8501601f8101871361175b57600080fd5b61176a878235602084016114b2565b91505092959194509250565b6000806040838503121561178957600080fd5b611792836115f5565b915061169a602084016115f5565b634e487b7160e01b600052601160045260246000fd5b600082198211156117c9576117c96117a0565b500190565b600181811c908216806117e257607f821691505b6020821081141561180357634e487b7160e01b600052602260045260246000fd5b50919050565b6000815161181b818560208601611571565b9290920192915050565b600080845481600182811c91508083168061184157607f831692505b602080841082141561186157634e487b7160e01b86526022600452602486fd5b8180156118755760018114611886576118b3565b60ff198616895284890196506118b3565b60008b81526020902060005b868110156118ab5781548b820152908501908301611892565b505084890196505b5050505050506118d76118c68286611809565b64173539b7b760d91b815260050190565b95945050505050565b60006000198214156118f4576118f46117a0565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082611920576119206118fb565b500490565b600082821015611937576119376117a0565b500390565b60008261194b5761194b6118fb565b500690565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161199e816017850160208801611571565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516119cf816028840160208801611571565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611a0e9083018461159d565b9695505050505050565b600060208284031215611a2a57600080fd5b815161125c81611469565b6000816000190483118215151615611a4f57611a4f6117a0565b500290565b600081611a6357611a636117a0565b50600019019056fea26469706673582212202d1ea527249ced58bc3a5eba46d021a10cdb9b1dfa93f9e4b765d6e0cf550e9764736f6c63430008090033000000000000000000000000355268746329bb3bcc91bf3cef0d32882f430952
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80636352211e116100de578063a217fddf11610097578063c87b56dd11610071578063c87b56dd1461037a578063d547741f1461038d578063e985e9c5146103a0578063f2fde38b146103b357600080fd5b8063a217fddf1461034c578063a22cb46514610354578063b88d4fde1461036757600080fd5b80636352211e146102da57806370a08231146102ed578063715018a6146103005780638da5cb5b1461030857806391d148541461031957806395d89b411461032c57600080fd5b806323b872dd1161014b57806332cb6b0c1161012557806332cb6b0c1461029957806336568abe146102a157806340c10f19146102b457806342842e0e146102c757600080fd5b806323b872dd14610250578063248a9ca3146102635780632f2ff15d1461028657600080fd5b806301ffc9a71461019357806302fe5305146101bb57806306fdde03146101d0578063081812fc14610200578063095ea7b31461022b57806318160ddd1461023e575b600080fd5b6101a66101a136600461147f565b6103c6565b60405190151581526020015b60405180910390f35b6101ce6101c9366004611528565b6103d7565b005b60408051808201909152600b81526a141859d95b585b8813919560aa1b60208201525b6040516101b291906115c9565b61021361020e3660046115dc565b610419565b6040516001600160a01b0390911681526020016101b2565b6101ce610239366004611611565b61045d565b6000545b6040519081526020016101b2565b6101ce61025e36600461163b565b6104ed565b6102426102713660046115dc565b60009081526006602052604090206001015490565b6101ce610294366004611677565b6104f9565b610242603281565b6101ce6102af366004611677565b61051e565b6101ce6102c2366004611611565b6105a1565b6101ce6102d536600461163b565b61062e565b6102136102e83660046115dc565b610649565b6102426102fb3660046116a3565b610706565b6101ce61074b565b6005546001600160a01b0316610213565b6101a6610327366004611677565b61075f565b6040805180820190915260048152632823a6a760e11b60208201526101f3565b610242600081565b6101ce6103623660046116be565b61078a565b6101ce6103753660046116fa565b610795565b6101f36103883660046115dc565b6107a1565b6101ce61039b366004611677565b61084b565b6101a66103ae366004611776565b610870565b6101ce6103c13660046116a3565b61089e565b60006103d182610917565b92915050565b7f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a106104018161093c565b81516104149060079060208501906113d0565b505050565b600061042482610946565b61044157604051634a1850bf60e11b815260040160405180910390fd5b506000908152600360205260409020546001600160a01b031690565b600061046882610649565b9050806001600160a01b0316836001600160a01b0316141561049d5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821681148015906104be57506104bc8282610870565b155b156104dc5760405163250fdee360e21b815260040160405180910390fd5b6104e784848461095b565b50505050565b610414338484846109b7565b6000828152600660205260409020600101546105148161093c565b61041483836109ea565b6001600160a01b03811633146105935760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61059d8282610a70565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66105cb8161093c565b6032826105d760005490565b6105e191906117b6565b11156106245760405162461bcd60e51b81526020600482015260126024820152711cdd5c1c1b1e481a5cc8195e18d95959195960721b604482015260640161058a565b6104148383610ad7565b61041483838360405180602001604052806000815250610795565b60008181526001602052604081205482906001600160a01b031615610686576000908152600160205260409020546001600160a01b031692915050565b60008111801561069857506000548111155b156106ec575b60001901806106ac576106ec565b6000818152600160205260409020546001600160a01b0316156106e7576000908152600160205260409020546001600160a01b031692915050565b61069e565b50604051634a1850bf60e11b815260040160405180910390fd5b60006001600160a01b03821661072f576040516316285dcb60e11b815260040160405180910390fd5b506001600160a01b031660009081526002602052604090205490565b610753610af1565b61075d6000610b4b565b565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61059d338383610b9d565b6104e784848484610c3d565b60606107ac82610946565b6107ef5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161058a565b6000600780546107fe906117ce565b90501161081a57604051806020016040528060008152506103d1565b600761082583610c8a565b604051602001610836929190611825565b60405160208183030381529060405292915050565b6000828152600660205260409020600101546108668161093c565b6104148383610a70565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6108a6610af1565b6001600160a01b03811661090b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161058a565b61091481610b4b565b50565b60006001600160e01b03198216637965db0b60e01b14806103d157506103d182610d90565b6109148133610dc5565b600080821180156103d1575050600054101590565b60008281526003602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6109c2848285610e29565b6109df5760405163574b16a760e11b815260040160405180910390fd5b6104e7838383610e74565b6109f4828261075f565b61059d5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610a2c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610a7a828261075f565b1561059d5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61059d828260405180602001604052806000815250610fbc565b6005546001600160a01b0316331461075d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161058a565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415610bd05760405163079f14e360e51b815260040160405180910390fd5b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610c49338585856109b7565b6000836001600160a01b03163b118015610c6c5750610c6a84848484610fc9565b155b156104e757604051631f11849560e21b815260040160405180910390fd5b606081610cae5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610cd85780610cc2816118e0565b9150610cd19050600a83611911565b9150610cb2565b60008167ffffffffffffffff811115610cf357610cf361149c565b6040519080825280601f01601f191660200182016040528015610d1d576020820181803683370190505b5090505b8415610d8857610d32600183611925565b9150610d3f600a8661193c565b610d4a9060306117b6565b60f81b818381518110610d5f57610d5f611950565b60200101906001600160f81b031916908160001a905350610d81600a86611911565b9450610d21565b949350505050565b60006001600160e01b031982166380ac58cd60e01b14806103d157506301ffc9a760e01b6001600160e01b03198316146103d1565b610dcf828261075f565b61059d57610de7816001600160a01b031660146110c0565b610df28360206110c0565b604051602001610e03929190611966565b60408051601f198184030181529082905262461bcd60e51b825261058a916004016115c9565b6000816001600160a01b0316846001600160a01b03161480610e645750836001600160a01b0316610e5984610419565b6001600160a01b0316145b80610d885750610d888285610870565b6001600160a01b0382161580610ea45750610e8e81610649565b6001600160a01b0316836001600160a01b031614155b15610ec25760405163574b16a760e11b815260040160405180910390fd5b610ece6000828561095b565b6001600160a01b038083166000818152600260209081526040808320805460019081019091559488168352808320805460001901905585835290849052812080546001600160a01b03191690921790915554908201908111801590610f4857506000818152600160205260409020546001600160a01b0316155b15610f7557600081815260016020526040902080546001600160a01b0319166001600160a01b0386161790555b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6104148383836001611263565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290610ffe9033908990889088906004016119db565b602060405180830381600087803b15801561101857600080fd5b505af1925050508015611048575060408051601f3d908101601f1916820190925261104591810190611a18565b60015b6110a3573d808015611076576040519150601f19603f3d011682016040523d82523d6000602084013e61107b565b606091505b50805161109b57604051630568cbab60e01b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060006110cf836002611a35565b6110da9060026117b6565b67ffffffffffffffff8111156110f2576110f261149c565b6040519080825280601f01601f19166020018201604052801561111c576020820181803683370190505b509050600360fc1b8160008151811061113757611137611950565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061116657611166611950565b60200101906001600160f81b031916908160001a905350600061118a846002611a35565b6111959060016117b6565b90505b600181111561120d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106111c9576111c9611950565b1a60f81b8282815181106111df576111df611950565b60200101906001600160f81b031916908160001a90535060049490941c9361120681611a54565b9050611198565b50831561125c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161058a565b9392505050565b82158061127757506001600160a01b038416155b156112955760405163574b16a760e11b815260040160405180910390fd5b600080546112a49060016117b6565b905060008054850181556001600160a01b038616808252600260209081526040808420805489019055848452600190915290912080546001600160a01b03191690911790558084810183801561130457506000876001600160a01b03163b115b15611382575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46113556000888480600101955088610fc9565b61137257604051631f11849560e21b815260040160405180910390fd5b8082141561130a575050506104e7565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156113835750505050505050565b8280546113dc906117ce565b90600052602060002090601f0160209004810192826113fe5760008555611444565b82601f1061141757805160ff1916838001178555611444565b82800160010185558215611444579182015b82811115611444578251825591602001919060010190611429565b50611450929150611454565b5090565b5b808211156114505760008155600101611455565b6001600160e01b03198116811461091457600080fd5b60006020828403121561149157600080fd5b813561125c81611469565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156114cd576114cd61149c565b604051601f8501601f19908116603f011681019082821181831017156114f5576114f561149c565b8160405280935085815286868601111561150e57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561153a57600080fd5b813567ffffffffffffffff81111561155157600080fd5b8201601f8101841361156257600080fd5b610d88848235602084016114b2565b60005b8381101561158c578181015183820152602001611574565b838111156104e75750506000910152565b600081518084526115b5816020860160208601611571565b601f01601f19169290920160200192915050565b60208152600061125c602083018461159d565b6000602082840312156115ee57600080fd5b5035919050565b80356001600160a01b038116811461160c57600080fd5b919050565b6000806040838503121561162457600080fd5b61162d836115f5565b946020939093013593505050565b60008060006060848603121561165057600080fd5b611659846115f5565b9250611667602085016115f5565b9150604084013590509250925092565b6000806040838503121561168a57600080fd5b8235915061169a602084016115f5565b90509250929050565b6000602082840312156116b557600080fd5b61125c826115f5565b600080604083850312156116d157600080fd5b6116da836115f5565b9150602083013580151581146116ef57600080fd5b809150509250929050565b6000806000806080858703121561171057600080fd5b611719856115f5565b9350611727602086016115f5565b925060408501359150606085013567ffffffffffffffff81111561174a57600080fd5b8501601f8101871361175b57600080fd5b61176a878235602084016114b2565b91505092959194509250565b6000806040838503121561178957600080fd5b611792836115f5565b915061169a602084016115f5565b634e487b7160e01b600052601160045260246000fd5b600082198211156117c9576117c96117a0565b500190565b600181811c908216806117e257607f821691505b6020821081141561180357634e487b7160e01b600052602260045260246000fd5b50919050565b6000815161181b818560208601611571565b9290920192915050565b600080845481600182811c91508083168061184157607f831692505b602080841082141561186157634e487b7160e01b86526022600452602486fd5b8180156118755760018114611886576118b3565b60ff198616895284890196506118b3565b60008b81526020902060005b868110156118ab5781548b820152908501908301611892565b505084890196505b5050505050506118d76118c68286611809565b64173539b7b760d91b815260050190565b95945050505050565b60006000198214156118f4576118f46117a0565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082611920576119206118fb565b500490565b600082821015611937576119376117a0565b500390565b60008261194b5761194b6118fb565b500690565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161199e816017850160208801611571565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516119cf816028840160208801611571565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611a0e9083018461159d565b9695505050505050565b600060208284031215611a2a57600080fd5b815161125c81611469565b6000816000190483118215151615611a4f57611a4f6117a0565b500290565b600081611a6357611a636117a0565b50600019019056fea26469706673582212202d1ea527249ced58bc3a5eba46d021a10cdb9b1dfa93f9e4b765d6e0cf550e9764736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000355268746329bb3bcc91bf3cef0d32882f430952
-----Decoded View---------------
Arg [0] : admin (address): 0x355268746329BB3BCC91bF3Cef0d32882F430952
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000355268746329bb3bcc91bf3cef0d32882f430952
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.