FLA Certiblock (FLA)
Overview
TokenID
85048
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
FLACertiblock
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "erc721psi/contracts/ERC721Psi.sol"; import "./utils/Administrator.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract FLACertiblock is ERC721Psi, Administrator { // implement Strings library using Strings for uint256; // Array to store state of each NFT bool[] private _state; // variable to the active base URI string private _activeBaseTokenURI; // variable to the inactive base URI string private _inactiveBaseTokenURI; /** * @dev Constructor function * @param name Name of the NFT * @param symbol Symbol of the NFT */ constructor(string memory name, string memory symbol) ERC721Psi(name, symbol) Administrator(msg.sender) {} /** * @dev Function to mint NFTs * @param to - address of the future owner of the NFT * @param quantity - quantity of NFTs to be minted */ function mint(address to, uint256 quantity) external payable onlyAdminOrUser { // _safeMint's second argument now takes in a quantity, not a tokenId. (same as ERC721A) _safeMint(to, quantity); // set the state of the all NFT to active for (uint256 i = 0; i < quantity; i++) { _state.push(true); } } /** * @dev Function _activeBaseURI */ function _activeBaseURI() internal view returns (string memory) { return _activeBaseTokenURI; } /** * @dev Function _inactiveBaseURI */ function _inactiveBaseURI() internal view returns (string memory) { return _inactiveBaseTokenURI; } /** * @dev Function to set the active base URI * @param newuri - base URI of the NFT */ function setActiveBaseURI(string memory newuri) external onlyAdminOrUser { _activeBaseTokenURI = newuri; } /** * @dev Function to set the inactive base URI * @param newuri - base URI of the NFT */ function setInactiveBaseURI(string memory newuri) external onlyAdminOrUser { _inactiveBaseTokenURI = newuri; } /// override supportsInterface() function in ERC721Psi.sol to add support for ERC721A function supportsInterface(bytes4 interfaceId) public view override(ERC721Psi, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } /// @dev Function set the state of the NFT to inactive function setStateInactive(uint256 tokenId) external onlyAdminOrUser { _state[tokenId] = false; } /// override tokenURI() function in ERC721Psi.sol to return the base URI function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Psi: URI query for nonexistent token"); string memory baseURI; if (_state[tokenId]) { baseURI = _activeBaseURI(); } else { baseURI = _inactiveBaseURI(); } return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")) : ""; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControl.sol"; /** * @title Administered * @author Alberto Cuesta Canada * @notice Implements Admin and User roles. */ contract Administrator is AccessControl { bytes32 public constant USER_ROLE = keccak256("USER"); /// @dev Add `root` to the admin role as a member. constructor(address root) { _setupRole(DEFAULT_ADMIN_ROLE, root); _setRoleAdmin(USER_ROLE, DEFAULT_ADMIN_ROLE); } /// @dev Restricted to members of the admin role. modifier onlyAdmin() { require(isAdmin(msg.sender), "Restricted to admins."); _; } /// @dev Restricted to members of the user role. modifier onlyUser() { require(isUser(msg.sender), "Restricted to users."); _; } /// @dev Restricted to members of the admin role or the user role. modifier onlyAdminOrUser() { require( isAdmin(msg.sender) || isUser(msg.sender), "Restricted to admins or users." ); _; } /// @dev Return `true` if the account belongs to the admin role. function isAdmin(address account) public view virtual returns (bool) { return hasRole(DEFAULT_ADMIN_ROLE, account); } /// @dev Return `true` if the account belongs to the user role. function isUser(address account) public view virtual returns (bool) { return hasRole(USER_ROLE, account); } /// @dev Add an account to the user role. Restricted to admins. function addUser(address account) public virtual onlyAdmin { grantRole(USER_ROLE, account); } /// @dev Add an account to the admin role. Restricted to admins. function addAdmin(address account) public virtual onlyAdmin { grantRole(DEFAULT_ADMIN_ROLE, account); } /// @dev Remove an account from the user role. Restricted to admins. function removeUser(address account) public virtual onlyAdmin { revokeRole(USER_ROLE, account); } /// @dev Remove oneself from the admin role. function renounceAdmin() public virtual { renounceRole(DEFAULT_ADMIN_ROLE, msg.sender); } }
// 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/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/StorageSlot.sol"; import "solidity-bits/contracts/BitMaps.sol"; contract ERC721Psi is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using BitMaps for BitMaps.BitMap; BitMaps.BitMap private _batchHead; string private _name; string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; uint256 internal _minted; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint) { require(owner != address(0), "ERC721Psi: balance query for the zero address"); uint count; for( uint i; i < _minted; ++i ){ if(_exists(i)){ if( owner == ownerOf(i)){ ++count; } } } return count; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { (address owner, ) = _ownerAndBatchHeadOf(tokenId); return owner; } function _ownerAndBatchHeadOf(uint256 tokenId) internal view returns (address owner, uint256 tokenIdBatchHead){ require(_exists(tokenId), "ERC721Psi: owner query for nonexistent token"); tokenIdBatchHead = _getBatchHead(tokenId); owner = _owners[tokenIdBatchHead]; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Psi: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); require(to != owner, "ERC721Psi: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721Psi: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require( _exists(tokenId), "ERC721Psi: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721Psi: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Psi: transfer caller is not owner nor approved" ); _transfer(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 { require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Psi: transfer caller is not owner nor approved" ); _safeTransfer(from, to, tokenId, _data); } /** * @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); require( _checkOnERC721Received(from, to, tokenId, 1,_data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } /** * @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`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _minted; } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require( _exists(tokenId), "ERC721Psi: operator query for nonexistent token" ); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { uint256 startTokenId = _minted; _mint(to, quantity); require( _checkOnERC721Received(address(0), to, startTokenId, quantity, _data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } function _mint( address to, uint256 quantity ) internal virtual { uint256 tokenIdBatchHead = _minted; require(quantity > 0, "ERC721Psi: quantity must be greater 0"); require(to != address(0), "ERC721Psi: mint to the zero address"); _beforeTokenTransfers(address(0), to, tokenIdBatchHead, quantity); _minted += quantity; _owners[tokenIdBatchHead] = to; _batchHead.set(tokenIdBatchHead); _afterTokenTransfers(address(0), to, tokenIdBatchHead, quantity); // Emit events for(uint256 tokenId=tokenIdBatchHead;tokenId < tokenIdBatchHead + quantity; tokenId++){ emit Transfer(address(0), to, tokenId); } } /** * @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 ) internal virtual { (address owner, uint256 tokenIdBatchHead) = _ownerAndBatchHeadOf(tokenId); require( owner == from, "ERC721Psi: transfer of token that is not own" ); require(to != address(0), "ERC721Psi: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId); uint256 nextTokenId = tokenId + 1; if(!_batchHead.get(nextTokenId) && nextTokenId < _minted ) { _owners[nextTokenId] = from; _batchHead.set(nextTokenId); } _owners[tokenId] = to; if(tokenId != tokenIdBatchHead) { _batchHead.set(tokenId); } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param startTokenId uint256 the first ID of the tokens to be transferred * @param quantity uint256 amount of the tokens to be transfered. * @param _data bytes optional data to send along with the call * @return r bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 startTokenId, uint256 quantity, bytes memory _data ) private returns (bool r) { if (to.isContract()) { r = true; for(uint256 tokenId = startTokenId; tokenId < startTokenId + quantity; tokenId++){ try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { r = r && retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721Psi: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } return r; } else { return true; } } function _getBatchHead(uint256 tokenId) internal view returns (uint256 tokenIdBatchHead) { tokenIdBatchHead = _batchHead.scanForward(tokenId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _minted; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256 tokenId) { require(index < totalSupply(), "ERC721Psi: global index out of bounds"); uint count; for(uint i; i < _minted; i++){ if(_exists(i)){ if(count == index) return i; else count++; } } } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) { uint count; for(uint i; i < _minted; i++){ if(_exists(i) && owner == ownerOf(i)){ if(count == index) return i; else count++; } } revert("ERC721Psi: owner index out of bounds"); } /** * @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 * quantity - 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 quantity ) 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 * quantity - 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 quantity ) internal virtual {} }
// 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 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; }
// 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 /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; import "./BitScan.sol"; /** * @dev This Library is a modified version of Openzeppelin's BitMaps library. * Functions of finding the index of the closest set bit from a given index are added. * The indexing of each bucket is modifed to count from the MSB to the LSB instead of from the LSB to the MSB. * The modification of indexing makes finding the closest previous set bit more efficient in gas usage. */ /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { using BitScan for uint256; uint256 private constant MASK_INDEX_ZERO = (1 << 255); uint256 private constant MASK_FULL = type(uint256).max; struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = MASK_INDEX_ZERO >> (index & 0xff); bitmap._data[bucket] &= ~mask; } /** * @dev Consecutively sets `amount` of bits starting from the bit at `startIndex`. */ function setBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] |= MASK_FULL << (256 - amount) >> bucketStartIndex; } else { bitmap._data[bucket] |= MASK_FULL >> bucketStartIndex; amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = MASK_FULL; amount -= 256; bucket++; } bitmap._data[bucket] |= MASK_FULL << (256 - amount); } } } /** * @dev Consecutively unsets `amount` of bits starting from the bit at `startIndex`. */ function unsetBatch(BitMap storage bitmap, uint256 startIndex, uint256 amount) internal { uint256 bucket = startIndex >> 8; uint256 bucketStartIndex = (startIndex & 0xff); unchecked { if(bucketStartIndex + amount < 256) { bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount) >> bucketStartIndex); } else { bitmap._data[bucket] &= ~(MASK_FULL >> bucketStartIndex); amount -= (256 - bucketStartIndex); bucket++; while(amount > 256) { bitmap._data[bucket] = 0; amount -= 256; bucket++; } bitmap._data[bucket] &= ~(MASK_FULL << (256 - amount)); } } } /** * @dev Find the closest index of the set bit before `index`. */ function scanForward(BitMap storage bitmap, uint256 index) internal view returns (uint256 setBitIndex) { uint256 bucket = index >> 8; // index within the bucket uint256 bucketIndex = (index & 0xff); // load a bitboard from the bitmap. uint256 bb = bitmap._data[bucket]; // offset the bitboard to scan from `bucketIndex`. bb = bb >> (0xff ^ bucketIndex); // bb >> (255 - bucketIndex) if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (bucketIndex - bb.bitScanForward256()); } } else { while(true) { require(bucket > 0, "BitMaps: The set bit before the index doesn't exist."); unchecked { bucket--; } // No offset. Always scan from the least significiant bit now. bb = bitmap._data[bucket]; if(bb > 0) { unchecked { setBitIndex = (bucket << 8) | (255 - bb.bitScanForward256()); break; } } } } } function getBucket(BitMap storage bitmap, uint256 bucket) internal view returns (uint256) { return bitmap._data[bucket]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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.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 (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.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - npm: https://www.npmjs.com/package/solidity-bits - github: https://github.com/estarriolvetch/solidity-bits */ pragma solidity ^0.8.0; library BitScan { uint256 constant private DEBRUIJN_256 = 0x818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff; bytes constant private LOOKUP_TABLE_256 = hex"0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8"; /** @dev Isolate the least significant set bit. */ function isolateLS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { return bb & (0 - bb); } } /** @dev Isolate the most significant set bit. */ function isolateMS1B256(uint256 bb) pure internal returns (uint256) { require(bb > 0); unchecked { bb |= bb >> 128; bb |= bb >> 64; bb |= bb >> 32; bb |= bb >> 16; bb |= bb >> 8; bb |= bb >> 4; bb |= bb >> 2; bb |= bb >> 1; return (bb >> 1) + 1; } } /** @dev Find the index of the lest significant set bit. (trailing zero count) */ function bitScanForward256(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateLS1B256(bb) * DEBRUIJN_256) >> 248]); } } /** @dev Find the index of the most significant set bit. */ function bitScanReverse256(uint256 bb) pure internal returns (uint8) { unchecked { return 255 - uint8(LOOKUP_TABLE_256[((isolateMS1B256(bb) * DEBRUIJN_256) >> 248)]); } } function log2(uint256 bb) pure internal returns (uint8) { unchecked { return uint8(LOOKUP_TABLE_256[(isolateMS1B256(bb) * DEBRUIJN_256) >> 248]); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"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":"USER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addUser","outputs":[],"stateMutability":"nonpayable","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":"account","type":"address"}],"name":"isAdmin","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":"account","type":"address"}],"name":"isUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceAdmin","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":"string","name":"newuri","type":"string"}],"name":"setActiveBaseURI","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":"newuri","type":"string"}],"name":"setInactiveBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setStateInactive","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":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","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"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002b0e38038062002b0e833981016040819052620000349162000260565b338282600162000045838262000359565b50600262000054828262000359565b5062000066915060009050826200009c565b620000937f2db9fd3d099848027c2383d0a083396f6c41510d7acfd92adc99b6cffcf31e966000620000ac565b50505062000425565b620000a88282620000f7565b5050565b600082815260076020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff16620000a85760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001573390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001c357600080fd5b81516001600160401b0380821115620001e057620001e06200019b565b604051601f8301601f19908116603f011681019082821181831017156200020b576200020b6200019b565b816040528381526020925086838588010111156200022857600080fd5b600091505b838210156200024c57858201830151818301840152908201906200022d565b600093810190920192909252949350505050565b600080604083850312156200027457600080fd5b82516001600160401b03808211156200028c57600080fd5b6200029a86838701620001b1565b93506020850151915080821115620002b157600080fd5b50620002c085828601620001b1565b9150509250929050565b600181811c90821680620002df57607f821691505b6020821081036200030057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200035457600081815260208120601f850160051c810160208610156200032f5750805b601f850160051c820191505b8181101562000350578281556001016200033b565b5050505b505050565b81516001600160401b038111156200037557620003756200019b565b6200038d81620003868454620002ca565b8462000306565b602080601f831160018114620003c55760008415620003ac5750858301515b600019600386901b1c1916600185901b17855562000350565b600085815260208120601f198616915b82811015620003f657888601518255948401946001909101908401620003d5565b5085821015620004155787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6126d980620004356000396000f3fe6080604052600436106101ee5760003560e01c80634f6ccce71161010d5780639b96e66c116100a0578063b88d4fde1161006f578063b88d4fde1461058b578063c87b56dd146105ab578063d547741f146105cb578063e985e9c5146105eb578063f7342ab21461063457600080fd5b80639b96e66c14610516578063a217fddf14610536578063a22cb4651461054b578063a31b115f1461056b57600080fd5b80638bad0c0a116100dc5780638bad0c0a146104ac57806391d14854146104c157806395d89b41146104e157806398575188146104f657600080fd5b80634f6ccce71461042c5780636352211e1461044c578063704802751461046c57806370a082311461048c57600080fd5b806324d7806c1161018557806340c10f191161015457806340c10f19146103b95780634209fff1146103cc578063421b2d8b146103ec57806342842e0e1461040c57600080fd5b806324d7806c146103395780632f2ff15d146103595780632f745c591461037957806336568abe1461039957600080fd5b806313119161116101c157806313119161146102a457806318160ddd146102d457806323b872dd146102e9578063248a9ca31461030957600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e366004611e36565b610654565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d610665565b60405161021f9190611ea3565b34801561025657600080fd5b5061026a610265366004611eb6565b6106f7565b6040516001600160a01b03909116815260200161021f565b34801561028e57600080fd5b506102a261029d366004611eeb565b610789565b005b3480156102b057600080fd5b506102c660008051602061258483398151915281565b60405190815260200161021f565b3480156102e057600080fd5b506004546102c6565b3480156102f557600080fd5b506102a2610304366004611f15565b6108a0565b34801561031557600080fd5b506102c6610324366004611eb6565b60009081526007602052604090206001015490565b34801561034557600080fd5b50610213610354366004611f51565b6108d1565b34801561036557600080fd5b506102a2610374366004611f6c565b6108dd565b34801561038557600080fd5b506102c6610394366004611eeb565b610902565b3480156103a557600080fd5b506102a26103b4366004611f6c565b6109cc565b6102a26103c7366004611eeb565b610a4a565b3480156103d857600080fd5b506102136103e7366004611f51565b610af2565b3480156103f857600080fd5b506102a2610407366004611f51565b610b0c565b34801561041857600080fd5b506102a2610427366004611f15565b610b4c565b34801561043857600080fd5b506102c6610447366004611eb6565b610b67565b34801561045857600080fd5b5061026a610467366004611eb6565b610c21565b34801561047857600080fd5b506102a2610487366004611f51565b610c35565b34801561049857600080fd5b506102c66104a7366004611f51565b610c65565b3480156104b857600080fd5b506102a2610d35565b3480156104cd57600080fd5b506102136104dc366004611f6c565b610d42565b3480156104ed57600080fd5b5061023d610d6d565b34801561050257600080fd5b506102a2610511366004611f51565b610d7c565b34801561052257600080fd5b506102a2610531366004611eb6565b610db9565b34801561054257600080fd5b506102c6600081565b34801561055757600080fd5b506102a2610566366004611f98565b610e2e565b34801561057757600080fd5b506102a2610586366004612060565b610ef2565b34801561059757600080fd5b506102a26105a63660046120a9565b610f32565b3480156105b757600080fd5b5061023d6105c6366004611eb6565b610f6a565b3480156105d757600080fd5b506102a26105e6366004611f6c565b61107a565b3480156105f757600080fd5b50610213610606366004612125565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561064057600080fd5b506102a261064f366004612060565b61109f565b600061065f826110df565b92915050565b6060600180546106749061214f565b80601f01602080910402602001604051908101604052809291908181526020018280546106a09061214f565b80156106ed5780601f106106c2576101008083540402835291602001916106ed565b820191906000526020600020905b8154815290600101906020018083116106d057829003601f168201915b5050505050905090565b6000610704826004541190565b61076d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061079482610c21565b9050806001600160a01b0316836001600160a01b0316036108035760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610764565b336001600160a01b038216148061081f575061081f8133610606565b6108915760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610764565b61089b8383611104565b505050565b6108aa3382611172565b6108c65760405162461bcd60e51b815260040161076490612189565b61089b838383611261565b600061065f8183610d42565b6000828152600760205260409020600101546108f88161144e565b61089b8383611458565b60008060005b6004548110156109775761091d816004541190565b8015610942575061092d81610c21565b6001600160a01b0316856001600160a01b0316145b156109655783820361095757915061065f9050565b81610961816121f3565b9250505b8061096f816121f3565b915050610908565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b6064820152608401610764565b6001600160a01b0381163314610a3c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610764565b610a4682826114de565b5050565b610a53336108d1565b80610a625750610a6233610af2565b610a7e5760405162461bcd60e51b81526004016107649061220c565b610a888282611545565b60005b8181101561089b5760088054600181018255600091909152602081047ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301805460ff601f9093166101000a9283021916909117905580610aea816121f3565b915050610a8b565b600061065f60008051602061258483398151915283610d42565b610b15336108d1565b610b315760405162461bcd60e51b815260040161076490612243565b610b49600080516020612584833981519152826108dd565b50565b61089b83838360405180602001604052806000815250610f32565b6000610b7260045490565b8210610bce5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b6064820152608401610764565b6000805b600454811015610c1a57610be7816004541190565b15610c0857838203610bfa579392505050565b81610c04816121f3565b9250505b80610c12816121f3565b915050610bd2565b5050919050565b600080610c2d8361155f565b509392505050565b610c3e336108d1565b610c5a5760405162461bcd60e51b815260040161076490612243565b610b496000826108dd565b60006001600160a01b038216610cd35760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610764565b6000805b600454811015610d2e57610cec816004541190565b15610d1e57610cfa81610c21565b6001600160a01b0316846001600160a01b031603610d1e57610d1b826121f3565b91505b610d27816121f3565b9050610cd7565b5092915050565b610d406000336109cc565b565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600280546106749061214f565b610d85336108d1565b610da15760405162461bcd60e51b815260040161076490612243565b610b496000805160206125848339815191528261107a565b610dc2336108d1565b80610dd15750610dd133610af2565b610ded5760405162461bcd60e51b81526004016107649061220c565b600060088281548110610e0257610e02612272565b90600052602060002090602091828204019190066101000a81548160ff02191690831515021790555050565b336001600160a01b03831603610e865760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610764565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610efb336108d1565b80610f0a5750610f0a33610af2565b610f265760405162461bcd60e51b81526004016107649061220c565b600a610a4682826122ce565b610f3c3383611172565b610f585760405162461bcd60e51b815260040161076490612189565b610f64848484846115f8565b50505050565b6060610f77826004541190565b610fd65760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610764565b606060088381548110610feb57610feb612272565b90600052602060002090602091828204019190069054906101000a900460ff161561101f5761101861162d565b905061102a565b61102761163c565b90505b60008151116110485760405180602001604052806000815250611073565b806110528461164b565b60405160200161106392919061238e565b6040516020818303038152906040525b9392505050565b6000828152600760205260409020600101546110958161144e565b61089b83836114de565b6110a8336108d1565b806110b757506110b733610af2565b6110d35760405162461bcd60e51b81526004016107649061220c565b6009610a4682826122ce565b60006001600160e01b03198216637965db0b60e01b148061065f575061065f8261174c565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061113982610c21565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061117f826004541190565b6111e35760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610764565b60006111ee83610c21565b9050806001600160a01b0316846001600160a01b031614806112295750836001600160a01b031661121e846106f7565b6001600160a01b0316145b8061125957506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b60008061126d8361155f565b91509150846001600160a01b0316826001600160a01b0316146112e75760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610764565b6001600160a01b03841661134d5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610764565b611358600084611104565b60006113658460016123cd565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015611395575060045481105b156113cb57600081815260036020526040812080546001600160a01b0319166001600160a01b0389161790556113cb90826117b7565b600084815260036020526040902080546001600160a01b0319166001600160a01b038716179055818414611404576114046000856117b7565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610b4981336117e3565b6114628282610d42565b610a465760008281526007602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561149a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6114e88282610d42565b15610a465760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610a46828260405180602001604052806000815250611847565b60008061156d836004541190565b6115ce5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610764565b6115d783611862565b6000818152600360205260409020546001600160a01b031694909350915050565b611603848484611261565b61161184848460018561186e565b610f645760405162461bcd60e51b8152600401610764906123e0565b6060600980546106749061214f565b6060600a80546106749061214f565b6060816000036116725750506040805180820190915260018152600360fc1b602082015290565b8160005b811561169c5780611686816121f3565b91506116959050600a8361244b565b9150611676565b60008167ffffffffffffffff8111156116b7576116b7611fd4565b6040519080825280601f01601f1916602001820160405280156116e1576020820181803683370190505b5090505b8415611259576116f660018361245f565b9150611703600a86612472565b61170e9060306123cd565b60f81b81838151811061172357611723612272565b60200101906001600160f81b031916908160001a905350611745600a8661244b565b94506116e5565b60006001600160e01b031982166380ac58cd60e01b148061177d57506001600160e01b03198216635b5e139f60e01b145b8061179857506001600160e01b0319821663780e9d6360e01b145b8061065f57506301ffc9a760e01b6001600160e01b031983161461065f565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6117ed8282610d42565b610a4657611805816001600160a01b031660146119a5565b6118108360206119a5565b604051602001611821929190612486565b60408051601f198184030181529082905262461bcd60e51b825261076491600401611ea3565b6004546118548484611b41565b61161160008583868661186e565b600061065f8183611ca6565b60006001600160a01b0385163b1561199857506001835b61188f84866123cd565b81101561199257604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906118c89033908b90869089906004016124fb565b6020604051808303816000875af1925050508015611903575060408051601f3d908101601f1916820190925261190091810190612538565b60015b611960573d808015611931576040519150601f19603f3d011682016040523d82523d6000602084013e611936565b606091505b5080516000036119585760405162461bcd60e51b8152600401610764906123e0565b805181602001fd5b82801561197d57506001600160e01b03198116630a85bd0160e11b145b9250508061198a816121f3565b915050611885565b5061199c565b5060015b95945050505050565b606060006119b4836002612555565b6119bf9060026123cd565b67ffffffffffffffff8111156119d7576119d7611fd4565b6040519080825280601f01601f191660200182016040528015611a01576020820181803683370190505b509050600360fc1b81600081518110611a1c57611a1c612272565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a4b57611a4b612272565b60200101906001600160f81b031916908160001a9053506000611a6f846002612555565b611a7a9060016123cd565b90505b6001811115611af2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611aae57611aae612272565b1a60f81b828281518110611ac457611ac4612272565b60200101906001600160f81b031916908160001a90535060049490941c93611aeb8161256c565b9050611a7d565b5083156110735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610764565b60045481611b9f5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610764565b6001600160a01b038316611c015760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610764565b8160046000828254611c1391906123cd565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b038616179055611c4990826117b7565b805b611c5583836123cd565b811015610f645760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480611c9e816121f3565b915050611c4b565b600881901c60008181526020849052604081205490919060ff808516919082181c8015611ce857611cd681611d9e565b60ff168203600884901b179350611d95565b60008311611d555760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610764565b506000199091016000818152602086905260409020549091908015611d9057611d7d81611d9e565b60ff0360ff16600884901b179350611d95565b611ce8565b50505092915050565b600060405180610120016040528061010081526020016125a4610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff611de785611e08565b02901c81518110611dfa57611dfa612272565b016020015160f81c92915050565b6000808211611e1657600080fd5b5060008190031690565b6001600160e01b031981168114610b4957600080fd5b600060208284031215611e4857600080fd5b813561107381611e20565b60005b83811015611e6e578181015183820152602001611e56565b50506000910152565b60008151808452611e8f816020860160208601611e53565b601f01601f19169290920160200192915050565b6020815260006110736020830184611e77565b600060208284031215611ec857600080fd5b5035919050565b80356001600160a01b0381168114611ee657600080fd5b919050565b60008060408385031215611efe57600080fd5b611f0783611ecf565b946020939093013593505050565b600080600060608486031215611f2a57600080fd5b611f3384611ecf565b9250611f4160208501611ecf565b9150604084013590509250925092565b600060208284031215611f6357600080fd5b61107382611ecf565b60008060408385031215611f7f57600080fd5b82359150611f8f60208401611ecf565b90509250929050565b60008060408385031215611fab57600080fd5b611fb483611ecf565b915060208301358015158114611fc957600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561200557612005611fd4565b604051601f8501601f19908116603f0116810190828211818310171561202d5761202d611fd4565b8160405280935085815286868601111561204657600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561207257600080fd5b813567ffffffffffffffff81111561208957600080fd5b8201601f8101841361209a57600080fd5b61125984823560208401611fea565b600080600080608085870312156120bf57600080fd5b6120c885611ecf565b93506120d660208601611ecf565b925060408501359150606085013567ffffffffffffffff8111156120f957600080fd5b8501601f8101871361210a57600080fd5b61211987823560208401611fea565b91505092959194509250565b6000806040838503121561213857600080fd5b61214183611ecf565b9150611f8f60208401611ecf565b600181811c9082168061216357607f821691505b60208210810361218357634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600060018201612205576122056121dd565b5060010190565b6020808252601e908201527f5265737472696374656420746f2061646d696e73206f722075736572732e0000604082015260600190565b6020808252601590820152742932b9ba3934b1ba32b2103a379030b236b4b7399760591b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b601f82111561089b57600081815260208120601f850160051c810160208610156122af5750805b601f850160051c820191505b81811015611446578281556001016122bb565b815167ffffffffffffffff8111156122e8576122e8611fd4565b6122fc816122f6845461214f565b84612288565b602080601f83116001811461233157600084156123195750858301515b600019600386901b1c1916600185901b178555611446565b600085815260208120601f198616915b8281101561236057888601518255948401946001909101908401612341565b508582101561237e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600083516123a0818460208801611e53565b8351908301906123b4818360208801611e53565b64173539b7b760d91b9101908152600501949350505050565b8082018082111561065f5761065f6121dd565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261245a5761245a612435565b500490565b8181038181111561065f5761065f6121dd565b60008261248157612481612435565b500690565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516124be816017850160208801611e53565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516124ef816028840160208801611e53565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061252e90830184611e77565b9695505050505050565b60006020828403121561254a57600080fd5b815161107381611e20565b808202811582820484141761065f5761065f6121dd565b60008161257b5761257b6121dd565b50600019019056fe2db9fd3d099848027c2383d0a083396f6c41510d7acfd92adc99b6cffcf31e960001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212209a52e94ba902fe78200527dcc5bad9c7eaef062806285ed28f8184b1e551029f64736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000e464c41204365727469626c6f636b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003464c410000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101ee5760003560e01c80634f6ccce71161010d5780639b96e66c116100a0578063b88d4fde1161006f578063b88d4fde1461058b578063c87b56dd146105ab578063d547741f146105cb578063e985e9c5146105eb578063f7342ab21461063457600080fd5b80639b96e66c14610516578063a217fddf14610536578063a22cb4651461054b578063a31b115f1461056b57600080fd5b80638bad0c0a116100dc5780638bad0c0a146104ac57806391d14854146104c157806395d89b41146104e157806398575188146104f657600080fd5b80634f6ccce71461042c5780636352211e1461044c578063704802751461046c57806370a082311461048c57600080fd5b806324d7806c1161018557806340c10f191161015457806340c10f19146103b95780634209fff1146103cc578063421b2d8b146103ec57806342842e0e1461040c57600080fd5b806324d7806c146103395780632f2ff15d146103595780632f745c591461037957806336568abe1461039957600080fd5b806313119161116101c157806313119161146102a457806318160ddd146102d457806323b872dd146102e9578063248a9ca31461030957600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e366004611e36565b610654565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d610665565b60405161021f9190611ea3565b34801561025657600080fd5b5061026a610265366004611eb6565b6106f7565b6040516001600160a01b03909116815260200161021f565b34801561028e57600080fd5b506102a261029d366004611eeb565b610789565b005b3480156102b057600080fd5b506102c660008051602061258483398151915281565b60405190815260200161021f565b3480156102e057600080fd5b506004546102c6565b3480156102f557600080fd5b506102a2610304366004611f15565b6108a0565b34801561031557600080fd5b506102c6610324366004611eb6565b60009081526007602052604090206001015490565b34801561034557600080fd5b50610213610354366004611f51565b6108d1565b34801561036557600080fd5b506102a2610374366004611f6c565b6108dd565b34801561038557600080fd5b506102c6610394366004611eeb565b610902565b3480156103a557600080fd5b506102a26103b4366004611f6c565b6109cc565b6102a26103c7366004611eeb565b610a4a565b3480156103d857600080fd5b506102136103e7366004611f51565b610af2565b3480156103f857600080fd5b506102a2610407366004611f51565b610b0c565b34801561041857600080fd5b506102a2610427366004611f15565b610b4c565b34801561043857600080fd5b506102c6610447366004611eb6565b610b67565b34801561045857600080fd5b5061026a610467366004611eb6565b610c21565b34801561047857600080fd5b506102a2610487366004611f51565b610c35565b34801561049857600080fd5b506102c66104a7366004611f51565b610c65565b3480156104b857600080fd5b506102a2610d35565b3480156104cd57600080fd5b506102136104dc366004611f6c565b610d42565b3480156104ed57600080fd5b5061023d610d6d565b34801561050257600080fd5b506102a2610511366004611f51565b610d7c565b34801561052257600080fd5b506102a2610531366004611eb6565b610db9565b34801561054257600080fd5b506102c6600081565b34801561055757600080fd5b506102a2610566366004611f98565b610e2e565b34801561057757600080fd5b506102a2610586366004612060565b610ef2565b34801561059757600080fd5b506102a26105a63660046120a9565b610f32565b3480156105b757600080fd5b5061023d6105c6366004611eb6565b610f6a565b3480156105d757600080fd5b506102a26105e6366004611f6c565b61107a565b3480156105f757600080fd5b50610213610606366004612125565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561064057600080fd5b506102a261064f366004612060565b61109f565b600061065f826110df565b92915050565b6060600180546106749061214f565b80601f01602080910402602001604051908101604052809291908181526020018280546106a09061214f565b80156106ed5780601f106106c2576101008083540402835291602001916106ed565b820191906000526020600020905b8154815290600101906020018083116106d057829003601f168201915b5050505050905090565b6000610704826004541190565b61076d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061079482610c21565b9050806001600160a01b0316836001600160a01b0316036108035760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610764565b336001600160a01b038216148061081f575061081f8133610606565b6108915760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610764565b61089b8383611104565b505050565b6108aa3382611172565b6108c65760405162461bcd60e51b815260040161076490612189565b61089b838383611261565b600061065f8183610d42565b6000828152600760205260409020600101546108f88161144e565b61089b8383611458565b60008060005b6004548110156109775761091d816004541190565b8015610942575061092d81610c21565b6001600160a01b0316856001600160a01b0316145b156109655783820361095757915061065f9050565b81610961816121f3565b9250505b8061096f816121f3565b915050610908565b5060405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a206f776e657220696e646578206f7574206f6620626f604482015263756e647360e01b6064820152608401610764565b6001600160a01b0381163314610a3c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610764565b610a4682826114de565b5050565b610a53336108d1565b80610a625750610a6233610af2565b610a7e5760405162461bcd60e51b81526004016107649061220c565b610a888282611545565b60005b8181101561089b5760088054600181018255600091909152602081047ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301805460ff601f9093166101000a9283021916909117905580610aea816121f3565b915050610a8b565b600061065f60008051602061258483398151915283610d42565b610b15336108d1565b610b315760405162461bcd60e51b815260040161076490612243565b610b49600080516020612584833981519152826108dd565b50565b61089b83838360405180602001604052806000815250610f32565b6000610b7260045490565b8210610bce5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a20676c6f62616c20696e646578206f7574206f6620626044820152646f756e647360d81b6064820152608401610764565b6000805b600454811015610c1a57610be7816004541190565b15610c0857838203610bfa579392505050565b81610c04816121f3565b9250505b80610c12816121f3565b915050610bd2565b5050919050565b600080610c2d8361155f565b509392505050565b610c3e336108d1565b610c5a5760405162461bcd60e51b815260040161076490612243565b610b496000826108dd565b60006001600160a01b038216610cd35760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610764565b6000805b600454811015610d2e57610cec816004541190565b15610d1e57610cfa81610c21565b6001600160a01b0316846001600160a01b031603610d1e57610d1b826121f3565b91505b610d27816121f3565b9050610cd7565b5092915050565b610d406000336109cc565b565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600280546106749061214f565b610d85336108d1565b610da15760405162461bcd60e51b815260040161076490612243565b610b496000805160206125848339815191528261107a565b610dc2336108d1565b80610dd15750610dd133610af2565b610ded5760405162461bcd60e51b81526004016107649061220c565b600060088281548110610e0257610e02612272565b90600052602060002090602091828204019190066101000a81548160ff02191690831515021790555050565b336001600160a01b03831603610e865760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610764565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610efb336108d1565b80610f0a5750610f0a33610af2565b610f265760405162461bcd60e51b81526004016107649061220c565b600a610a4682826122ce565b610f3c3383611172565b610f585760405162461bcd60e51b815260040161076490612189565b610f64848484846115f8565b50505050565b6060610f77826004541190565b610fd65760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610764565b606060088381548110610feb57610feb612272565b90600052602060002090602091828204019190069054906101000a900460ff161561101f5761101861162d565b905061102a565b61102761163c565b90505b60008151116110485760405180602001604052806000815250611073565b806110528461164b565b60405160200161106392919061238e565b6040516020818303038152906040525b9392505050565b6000828152600760205260409020600101546110958161144e565b61089b83836114de565b6110a8336108d1565b806110b757506110b733610af2565b6110d35760405162461bcd60e51b81526004016107649061220c565b6009610a4682826122ce565b60006001600160e01b03198216637965db0b60e01b148061065f575061065f8261174c565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061113982610c21565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061117f826004541190565b6111e35760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610764565b60006111ee83610c21565b9050806001600160a01b0316846001600160a01b031614806112295750836001600160a01b031661121e846106f7565b6001600160a01b0316145b8061125957506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b60008061126d8361155f565b91509150846001600160a01b0316826001600160a01b0316146112e75760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610764565b6001600160a01b03841661134d5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610764565b611358600084611104565b60006113658460016123cd565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015611395575060045481105b156113cb57600081815260036020526040812080546001600160a01b0319166001600160a01b0389161790556113cb90826117b7565b600084815260036020526040902080546001600160a01b0319166001600160a01b038716179055818414611404576114046000856117b7565b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b610b4981336117e3565b6114628282610d42565b610a465760008281526007602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561149a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6114e88282610d42565b15610a465760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610a46828260405180602001604052806000815250611847565b60008061156d836004541190565b6115ce5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610764565b6115d783611862565b6000818152600360205260409020546001600160a01b031694909350915050565b611603848484611261565b61161184848460018561186e565b610f645760405162461bcd60e51b8152600401610764906123e0565b6060600980546106749061214f565b6060600a80546106749061214f565b6060816000036116725750506040805180820190915260018152600360fc1b602082015290565b8160005b811561169c5780611686816121f3565b91506116959050600a8361244b565b9150611676565b60008167ffffffffffffffff8111156116b7576116b7611fd4565b6040519080825280601f01601f1916602001820160405280156116e1576020820181803683370190505b5090505b8415611259576116f660018361245f565b9150611703600a86612472565b61170e9060306123cd565b60f81b81838151811061172357611723612272565b60200101906001600160f81b031916908160001a905350611745600a8661244b565b94506116e5565b60006001600160e01b031982166380ac58cd60e01b148061177d57506001600160e01b03198216635b5e139f60e01b145b8061179857506001600160e01b0319821663780e9d6360e01b145b8061065f57506301ffc9a760e01b6001600160e01b031983161461065f565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6117ed8282610d42565b610a4657611805816001600160a01b031660146119a5565b6118108360206119a5565b604051602001611821929190612486565b60408051601f198184030181529082905262461bcd60e51b825261076491600401611ea3565b6004546118548484611b41565b61161160008583868661186e565b600061065f8183611ca6565b60006001600160a01b0385163b1561199857506001835b61188f84866123cd565b81101561199257604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906118c89033908b90869089906004016124fb565b6020604051808303816000875af1925050508015611903575060408051601f3d908101601f1916820190925261190091810190612538565b60015b611960573d808015611931576040519150601f19603f3d011682016040523d82523d6000602084013e611936565b606091505b5080516000036119585760405162461bcd60e51b8152600401610764906123e0565b805181602001fd5b82801561197d57506001600160e01b03198116630a85bd0160e11b145b9250508061198a816121f3565b915050611885565b5061199c565b5060015b95945050505050565b606060006119b4836002612555565b6119bf9060026123cd565b67ffffffffffffffff8111156119d7576119d7611fd4565b6040519080825280601f01601f191660200182016040528015611a01576020820181803683370190505b509050600360fc1b81600081518110611a1c57611a1c612272565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611a4b57611a4b612272565b60200101906001600160f81b031916908160001a9053506000611a6f846002612555565b611a7a9060016123cd565b90505b6001811115611af2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611aae57611aae612272565b1a60f81b828281518110611ac457611ac4612272565b60200101906001600160f81b031916908160001a90535060049490941c93611aeb8161256c565b9050611a7d565b5083156110735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610764565b60045481611b9f5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610764565b6001600160a01b038316611c015760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610764565b8160046000828254611c1391906123cd565b9091555050600081815260036020526040812080546001600160a01b0319166001600160a01b038616179055611c4990826117b7565b805b611c5583836123cd565b811015610f645760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480611c9e816121f3565b915050611c4b565b600881901c60008181526020849052604081205490919060ff808516919082181c8015611ce857611cd681611d9e565b60ff168203600884901b179350611d95565b60008311611d555760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610764565b506000199091016000818152602086905260409020549091908015611d9057611d7d81611d9e565b60ff0360ff16600884901b179350611d95565b611ce8565b50505092915050565b600060405180610120016040528061010081526020016125a4610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff611de785611e08565b02901c81518110611dfa57611dfa612272565b016020015160f81c92915050565b6000808211611e1657600080fd5b5060008190031690565b6001600160e01b031981168114610b4957600080fd5b600060208284031215611e4857600080fd5b813561107381611e20565b60005b83811015611e6e578181015183820152602001611e56565b50506000910152565b60008151808452611e8f816020860160208601611e53565b601f01601f19169290920160200192915050565b6020815260006110736020830184611e77565b600060208284031215611ec857600080fd5b5035919050565b80356001600160a01b0381168114611ee657600080fd5b919050565b60008060408385031215611efe57600080fd5b611f0783611ecf565b946020939093013593505050565b600080600060608486031215611f2a57600080fd5b611f3384611ecf565b9250611f4160208501611ecf565b9150604084013590509250925092565b600060208284031215611f6357600080fd5b61107382611ecf565b60008060408385031215611f7f57600080fd5b82359150611f8f60208401611ecf565b90509250929050565b60008060408385031215611fab57600080fd5b611fb483611ecf565b915060208301358015158114611fc957600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561200557612005611fd4565b604051601f8501601f19908116603f0116810190828211818310171561202d5761202d611fd4565b8160405280935085815286868601111561204657600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561207257600080fd5b813567ffffffffffffffff81111561208957600080fd5b8201601f8101841361209a57600080fd5b61125984823560208401611fea565b600080600080608085870312156120bf57600080fd5b6120c885611ecf565b93506120d660208601611ecf565b925060408501359150606085013567ffffffffffffffff8111156120f957600080fd5b8501601f8101871361210a57600080fd5b61211987823560208401611fea565b91505092959194509250565b6000806040838503121561213857600080fd5b61214183611ecf565b9150611f8f60208401611ecf565b600181811c9082168061216357607f821691505b60208210810361218357634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600060018201612205576122056121dd565b5060010190565b6020808252601e908201527f5265737472696374656420746f2061646d696e73206f722075736572732e0000604082015260600190565b6020808252601590820152742932b9ba3934b1ba32b2103a379030b236b4b7399760591b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b601f82111561089b57600081815260208120601f850160051c810160208610156122af5750805b601f850160051c820191505b81811015611446578281556001016122bb565b815167ffffffffffffffff8111156122e8576122e8611fd4565b6122fc816122f6845461214f565b84612288565b602080601f83116001811461233157600084156123195750858301515b600019600386901b1c1916600185901b178555611446565b600085815260208120601f198616915b8281101561236057888601518255948401946001909101908401612341565b508582101561237e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600083516123a0818460208801611e53565b8351908301906123b4818360208801611e53565b64173539b7b760d91b9101908152600501949350505050565b8082018082111561065f5761065f6121dd565b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261245a5761245a612435565b500490565b8181038181111561065f5761065f6121dd565b60008261248157612481612435565b500690565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516124be816017850160208801611e53565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516124ef816028840160208801611e53565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061252e90830184611e77565b9695505050505050565b60006020828403121561254a57600080fd5b815161107381611e20565b808202811582820484141761065f5761065f6121dd565b60008161257b5761257b6121dd565b50600019019056fe2db9fd3d099848027c2383d0a083396f6c41510d7acfd92adc99b6cffcf31e960001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212209a52e94ba902fe78200527dcc5bad9c7eaef062806285ed28f8184b1e551029f64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000e464c41204365727469626c6f636b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003464c410000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): FLA Certiblock
Arg [1] : symbol (string): FLA
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [3] : 464c41204365727469626c6f636b000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 464c410000000000000000000000000000000000000000000000000000000000
[ 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.