ERC-721
Overview
Max Total Supply
8,888 EGGS
Holders
783
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 EGGSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ILikeEggs
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; /////// // I // // // // L // // I // // K // // E // // // // E // // G // // G // // S // /////// import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./lib/ERC721Psi.sol"; import "./lib/ERC721PsiBurnable.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; contract ILikeEggs is ERC721PsiBurnable, Ownable, AccessControl, DefaultOperatorFilterer, IERC2981 { uint public mintFee = 3300000000000000; bool public enableMinter = true; uint public royaltyFee = 50; address public royaltyAddress; uint public constant MAX_FREE_MINT_PER_WALLET = 10; uint public constant MAX_MINT_PER_TX = 10; uint public constant FREE = 4444; uint public constant MAX_SUPPLY = 8888; bytes32 public constant BURNER = bytes32("BURNER"); mapping(address => uint) internal mintedByWallet; string private baseURI = "https://i-like-eggs-backend-metadata.herokuapp.com/"; constructor() ERC721Psi ("I like eggs", "EGGS") { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); royaltyAddress = 0xf5CC2CA3553C461aB782207114aFeBd90376dd16; } function setRoyaltiesAddress(address _address) public onlyOwner { royaltyAddress = _address; } function setRoyaltyPercentage(uint _percentage) public onlyOwner { royaltyFee = _percentage; } function getAmountForFreeMint(uint _amountToMint, address _user) public view returns (uint) { uint minted = mintedByWallet[_user]; if (totalSupply() < FREE) { if (minted >= MAX_FREE_MINT_PER_WALLET) { return 0; } uint leftToMint = MAX_FREE_MINT_PER_WALLET - minted; return Math.min(Math.min(_amountToMint, leftToMint), FREE - totalSupply()); } return minted > 0 ? 0 : 1; } function publicMint(uint _amountToMint) public payable { require(enableMinter, "Not enabled"); require(_amountToMint > 0 && _amountToMint <= MAX_MINT_PER_TX, "invalid amount"); require(_amountToMint + totalSupply() <= MAX_SUPPLY, "not enough supply"); uint amountForFree = getAmountForFreeMint(_amountToMint, msg.sender); uint fee = mintFee * (_amountToMint - amountForFree); require(msg.value == fee, "not enough eth"); mintedByWallet[msg.sender] += _amountToMint; _safeMint(msg.sender, _amountToMint); } function burn(uint tokenId) external onlyBurner { _burn(tokenId); } modifier onlyBurner() { require(hasRole(BURNER, msg.sender), "Not a burner"); _; } function setMintFee(uint _mintFee) public onlyOwner { mintFee = _mintFee; } function setMintingEnabled(bool _enabled) public onlyOwner { enableMinter = _enabled; } function ownerMint(uint amount, address to) public onlyOwner { require(amount + totalSupply() <= MAX_SUPPLY, "not enough supply"); _safeMint(to, amount); } receive() external payable {} fallback() external payable {} function getBalance() external view returns (uint) { return address(this).balance; } function _baseURI() internal view override returns (string memory) { return baseURI; } function supportsInterface(bytes4 interfaceId) public view override(AccessControl, ERC721Psi, IERC165) returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } function setBaseURI(string memory newBaseURI) public onlyOwner { baseURI = newBaseURI; } function sweepEthToAddress(address _user) public onlyOwner { payable(_user).transfer(address(this).balance); } function sweepAnyTokensToAddress(address _token, address _user) public onlyOwner { IERC20(_token).transfer(_user, IERC20(_token).balanceOf(address(this))); } function royaltyInfo(uint /*_tokenId*/, uint _salePrice) external view override(IERC2981) returns (address receiver, uint royaltyAmount) { receiver = royaltyAddress; royaltyAmount = _salePrice / 1000 * royaltyFee; } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _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) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _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.8.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(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT /** ______ _____ _____ ______ ___ __ _ _ _ | ____| __ \ / ____|____ |__ \/_ | || || | | |__ | |__) | | / / ) || | \| |/ | | __| | _ /| | / / / / | |\_ _/ | |____| | \ \| |____ / / / /_ | | | | |______|_| \_\\_____|/_/ |____||_| |_| - github: https://github.com/estarriolvetch/ERC721Psi - npm: https://www.npmjs.com/package/erc721psi */ pragma solidity ^0.8.0; import "../interfaces/IERC721.sol"; import "../interfaces/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.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 { 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 private _currentIndex; 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_; _currentIndex = _startTokenId(); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal pure returns (uint256) { // It will become modifiable in the future versions return 1; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { return _currentIndex - _startTokenId(); } /** * @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 || 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 = _startTokenId(); i < _nextTokenId(); ++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 payable 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 payable override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual payable 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 < _nextTokenId() && _startTokenId() <= tokenId; } /** * @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 nextTokenId = _nextTokenId(); _mint(to, quantity); require( _checkOnERC721Received(address(0), to, nextTokenId, quantity, _data), "ERC721Psi: transfer to non ERC721Receiver implementer" ); } function _mint( address to, uint256 quantity ) internal virtual { uint256 nextTokenId = _nextTokenId(); require(quantity > 0, "ERC721Psi: quantity must be greater 0"); require(to != address(0), "ERC721Psi: mint to the zero address"); _beforeTokenTransfers(address(0), to, nextTokenId, quantity); _currentIndex += quantity; _owners[nextTokenId] = to; _batchHead.set(nextTokenId); _afterTokenTransfers(address(0), to, nextTokenId, quantity); // Emit events for(uint256 tokenId=nextTokenId; tokenId < nextTokenId + 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 subsequentTokenId = tokenId + 1; if(!_batchHead.get(subsequentTokenId) && subsequentTokenId < _nextTokenId() ) { _owners[subsequentTokenId] = from; _batchHead.set(subsequentTokenId); } _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); } function totalSupply() public virtual view returns (uint256) { return _totalMinted(); } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * This function is compatiable with ERC721AQueryable. */ function tokensOfOwner(address owner) external view virtual returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { if (_exists(i)) { if (ownerOf(i) == owner) { tokenIds[tokenIdsIdx++] = i; } } } return tokenIds; } } /** * @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 /** ______ _____ _____ ______ ___ __ _ _ _ | ____| __ \ / ____|____ |__ \/_ | || || | | |__ | |__) | | / / ) || | \| |/ | | __| | _ /| | / / / / | |\_ _/ | |____| | \ \| |____ / / / /_ | | | | |______|_| \_\\_____|/_/ |____||_| |_| */ pragma solidity ^0.8.0; import "solidity-bits/contracts/BitMaps.sol"; import "./ERC721Psi.sol"; abstract contract ERC721PsiBurnable is ERC721Psi { using BitMaps for BitMaps.BitMap; BitMaps.BitMap private _burnedToken; /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address from = ownerOf(tokenId); _beforeTokenTransfers(from, address(0), tokenId, 1); _burnedToken.set(tokenId); emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view override virtual returns (bool){ if(_burnedToken.get(tokenId)) { return false; } return super._exists(tokenId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalMinted() - _burned(); } /** * @dev Returns number of token burned. */ function _burned() internal view returns (uint256 burned){ uint256 startBucket = _startTokenId() >> 8; uint256 lastBucket = (_nextTokenId() >> 8) + 1; for(uint256 i=startBucket; i < lastBucket; i++) { uint256 bucket = _burnedToken.getBucket(i); burned += _popcount(bucket); } } /** * @dev Returns number of set bits. */ function _popcount(uint256 x) private pure returns (uint256 count) { unchecked{ for (count=0; x!=0; count++) x &= x - 1; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// 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 // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "@openzeppelin/contracts/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 payable; /** * @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 payable; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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.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 (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - 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 /** _____ ___ ___ __ ____ _ __ / ___/____ / (_)___/ (_) /___ __ / __ )(_) /______ \__ \/ __ \/ / / __ / / __/ / / / / __ / / __/ ___/ ___/ / /_/ / / / /_/ / / /_/ /_/ / / /_/ / / /_(__ ) /____/\____/_/_/\__,_/_/\__/\__, / /_____/_/\__/____/ /____/ - 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]); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BURNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FREE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FREE_MINT_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT_PER_TX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountToMint","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"getAmountForFreeMint","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":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountToMint","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","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":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintFee","type":"uint256"}],"name":"setMintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setMintingEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setRoyaltiesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setRoyaltyPercentage","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":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"sweepAnyTokensToAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"sweepEthToAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
660bb9551fc24000600a55600b805460ff191660011790556032600c5560e060405260336080818152906200363060a03980516200004691600f916020909101906200035d565b503480156200005457600080fd5b50604080518082018252600b81526a49206c696b65206567677360a81b6020808301918252835180850190945260048452634547475360e01b908401528151733cc6cdda760b79bafa08df41ecfa224f810dceb693600193929091620000bc9185916200035d565b508051620000d29060029060208401906200035d565b5050600160045550620000e53362000266565b6daaeb6d7670e522a718067333cd4e3b156200022a5780156200017857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200015957600080fd5b505af11580156200016e573d6000803e3d6000fd5b505050506200022a565b6001600160a01b03821615620001c95760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200013e565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200021057600080fd5b505af115801562000225573d6000803e3d6000fd5b505050505b506200023a9050600033620002b8565b600d80546001600160a01b03191673f5cc2ca3553c461ab782207114afebd90376dd161790556200043f565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620003595760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003183390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b8280546200036b9062000403565b90600052602060002090601f0160209004810192826200038f5760008555620003da565b82601f10620003aa57805160ff1916838001178555620003da565b82800160010185558215620003da579182015b82811115620003da578251825591602001919060010190620003bd565b50620003e8929150620003ec565b5090565b5b80821115620003e85760008155600101620003ed565b600181811c908216806200041857607f821691505b6020821081036200043957634e487b7160e01b600052602260045260246000fd5b50919050565b6131e1806200044f6000396000f3fe6080604052600436106102dc5760003560e01c80636352211e11610182578063a53d14b5116100d5578063d52c57e011610084578063e985e9c511610061578063e985e9c514610852578063eddd0d9c1461089b578063f2fde38b146108bb57005b8063d52c57e0146107f2578063d547741f14610812578063dc95c4a71461083257005b8063b88d4fde116100b2578063b88d4fde146107a9578063b8997a97146107bc578063c87b56dd146107d257005b8063a53d14b514610769578063a6eb27e2146106aa578063ad2f852a1461078957005b80638ecad7211161013157806395d89b411161010e57806395d89b411461071f578063a217fddf14610734578063a22cb4651461074957005b80638ecad721146106aa57806390f2d79b146106bf57806391d14854146106d957005b8063823a3cc01161015f578063823a3cc01461063f5780638462151c1461065f5780638da5cb5b1461068c57005b80636352211e146105ea57806370a082311461060a578063715018a61461062a57005b80632db115441161023a57806342966c68116101e957806355f804b3116101c657806355f804b31461058a578063575428f5146105aa57806361ba27da146105ca57005b806342966c681461053457806347998157146105545780634ea3871a1461056a57005b806336568abe1161021757806336568abe146104df57806341f43434146104ff57806342842e0e1461052157005b80632db11544146104965780632f2ff15d146104a957806332cb6b0c146104c957005b806312065fe01161029657806323b872dd1161027357806323b872dd14610414578063248a9ca3146104275780632a55205a1461045757005b806312065fe0146103d657806313966db5146103e957806318160ddd146103ff57005b8063081812fc116102c4578063081812fc1461033c578063095ea7b314610374578063118c4f131461039457005b806301ffc9a7146102e557806306fdde031461031a57005b366102e357005b005b3480156102f157600080fd5b50610305610300366004612ac7565b6108db565b60405190151581526020015b60405180910390f35b34801561032657600080fd5b5061032f610906565b6040516103119190612b3c565b34801561034857600080fd5b5061035c610357366004612b4f565b610998565b6040516001600160a01b039091168152602001610311565b34801561038057600080fd5b506102e361038f366004612b7f565b610a36565b3480156103a057600080fd5b506103c87f4255524e4552000000000000000000000000000000000000000000000000000081565b604051908152602001610311565b3480156103e257600080fd5b50476103c8565b3480156103f557600080fd5b506103c8600a5481565b34801561040b57600080fd5b506103c8610b66565b6102e3610422366004612ba9565b610b87565b34801561043357600080fd5b506103c8610442366004612b4f565b60009081526009602052604090206001015490565b34801561046357600080fd5b50610477610472366004612be5565b610bb2565b604080516001600160a01b039093168352602083019190915201610311565b6102e36104a4366004612b4f565b610be6565b3480156104b557600080fd5b506102e36104c4366004612c07565b610d9f565b3480156104d557600080fd5b506103c86122b881565b3480156104eb57600080fd5b506102e36104fa366004612c07565b610dc4565b34801561050b57600080fd5b5061035c6daaeb6d7670e522a718067333cd4e81565b6102e361052f366004612ba9565b610e50565b34801561054057600080fd5b506102e361054f366004612b4f565b610e75565b34801561056057600080fd5b506103c861115c81565b34801561057657600080fd5b506102e3610585366004612c38565b610eff565b34801561059657600080fd5b506102e36105a5366004612ce1565b610f1a565b3480156105b657600080fd5b506102e36105c5366004612d2a565b610f35565b3480156105d657600080fd5b506102e36105e5366004612b4f565b610f72565b3480156105f657600080fd5b5061035c610605366004612b4f565b610f7f565b34801561061657600080fd5b506103c8610625366004612d2a565b610f93565b34801561063657600080fd5b506102e3611072565b34801561064b57600080fd5b506103c861065a366004612c07565b611086565b34801561066b57600080fd5b5061067f61067a366004612d2a565b61111d565b6040516103119190612d45565b34801561069857600080fd5b506008546001600160a01b031661035c565b3480156106b657600080fd5b506103c8600a81565b3480156106cb57600080fd5b50600b546103059060ff1681565b3480156106e557600080fd5b506103056106f4366004612c07565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561072b57600080fd5b5061032f6111e4565b34801561074057600080fd5b506103c8600081565b34801561075557600080fd5b506102e3610764366004612d89565b6111f3565b34801561077557600080fd5b506102e3610784366004612dc0565b6112b7565b34801561079557600080fd5b50600d5461035c906001600160a01b031681565b6102e36107b7366004612dea565b6113b9565b3480156107c857600080fd5b506103c8600c5481565b3480156107de57600080fd5b5061032f6107ed366004612b4f565b6113e6565b3480156107fe57600080fd5b506102e361080d366004612c07565b6114bf565b34801561081e57600080fd5b506102e361082d366004612c07565b611534565b34801561083e57600080fd5b506102e361084d366004612d2a565b611559565b34801561085e57600080fd5b5061030561086d366004612dc0565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108a757600080fd5b506102e36108b6366004612b4f565b611583565b3480156108c757600080fd5b506102e36108d6366004612d2a565b611590565b60006001600160e01b03198216637965db0b60e01b148061090057506109008261161d565b92915050565b60606001805461091590612e66565b80601f016020809104026020016040519081016040528092919081815260200182805461094190612e66565b801561098e5780601f106109635761010080835404028352916020019161098e565b820191906000526020600020905b81548152906001019060200180831161097157829003601f168201915b5050505050905090565b60006109a382611642565b610a1a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a4182610f7f565b9050806001600160a01b0316836001600160a01b031603610ac95760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f60448201527f776e6572000000000000000000000000000000000000000000000000000000006064820152608401610a11565b336001600160a01b0382161480610ae55750610ae5813361086d565b610b575760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610a11565b610b618383611677565b505050565b6000610b706116e5565b610b78611747565b610b829190612eb6565b905090565b826001600160a01b0381163314610ba157610ba133611758565b610bac848484611843565b50505050565b600d54600c546001600160a01b0390911690600090610bd36103e885612ecd565b610bdd9190612eef565b90509250929050565b600b5460ff16610c385760405162461bcd60e51b815260206004820152600b60248201527f4e6f7420656e61626c65640000000000000000000000000000000000000000006044820152606401610a11565b600081118015610c495750600a8111155b610c955760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e740000000000000000000000000000000000006044820152606401610a11565b6122b8610ca0610b66565b610caa9083612f0e565b1115610cf85760405162461bcd60e51b815260206004820152601160248201527f6e6f7420656e6f75676820737570706c790000000000000000000000000000006044820152606401610a11565b6000610d048233611086565b90506000610d128284612eb6565b600a54610d1f9190612eef565b9050803414610d705760405162461bcd60e51b815260206004820152600e60248201527f6e6f7420656e6f756768206574680000000000000000000000000000000000006044820152606401610a11565b336000908152600e602052604081208054859290610d8f908490612f0e565b90915550610b61905033846118ca565b600082815260096020526040902060010154610dba816118e4565b610b6183836118ee565b6001600160a01b0381163314610e425760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a11565b610e4c8282611990565b5050565b826001600160a01b0381163314610e6a57610e6a33611758565b610bac848484611a13565b3360009081527fec71955aa0e2cc446ea21e0c8dfeaf26a8eda69aa908832fdc106bff179abadf602052604090205460ff16610ef35760405162461bcd60e51b815260206004820152600c60248201527f4e6f742061206275726e657200000000000000000000000000000000000000006044820152606401610a11565b610efc81611a2e565b50565b610f07611a96565b600b805460ff1916911515919091179055565b610f22611a96565b8051610e4c90600f906020840190612a18565b610f3d611a96565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610e4c573d6000803e3d6000fd5b610f7a611a96565b600c55565b600080610f8b83611af0565b509392505050565b60006001600160a01b0382166110115760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f2061646472657373000000000000000000000000000000000000006064820152608401610a11565b600060015b60045481101561106b5761102981611642565b1561105b5761103781610f7f565b6001600160a01b0316846001600160a01b03160361105b5761105882612f26565b91505b61106481612f26565b9050611016565b5092915050565b61107a611a96565b6110846000611b98565b565b6001600160a01b0381166000908152600e602052604081205461115c6110aa610b66565b101561110057600a81106110c2576000915050610900565b60006110cf82600a612eb6565b90506110f76110de8683611bea565b6110e6610b66565b6110f29061115c612eb6565b611bea565b92505050610900565b6000811161110f576001611112565b60005b60ff16949350505050565b606060008061112b84610f93565b905060008167ffffffffffffffff81111561114857611148612c55565b604051908082528060200260200182016040528015611171578160200160208202803683370190505b50905060015b8284146111db5761118781611642565b156111d357856001600160a01b031661119f82610f7f565b6001600160a01b0316036111d357808285806001019650815181106111c6576111c6612f3f565b6020026020010181815250505b600101611177565b50949350505050565b60606002805461091590612e66565b336001600160a01b0383160361124b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610a11565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112bf611a96565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015611326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134a9190612f55565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611395573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b619190612f6e565b836001600160a01b03811633146113d3576113d333611758565b6113df85858585611c00565b5050505050565b60606113f182611642565b6114635760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e000000000000000000000000000000000000000000006064820152608401610a11565b600061146d611c88565b9050600081511161148d57604051806020016040528060008152506114b8565b8061149784611c97565b6040516020016114a8929190612f8b565b6040516020818303038152906040525b9392505050565b6114c7611a96565b6122b86114d2610b66565b6114dc9084612f0e565b111561152a5760405162461bcd60e51b815260206004820152601160248201527f6e6f7420656e6f75676820737570706c790000000000000000000000000000006044820152606401610a11565b610e4c81836118ca565b60008281526009602052604090206001015461154f816118e4565b610b618383611990565b611561611a96565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b61158b611a96565b600a55565b611598611a96565b6001600160a01b0381166116145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a11565b610efc81611b98565b60006001600160e01b03198216637965db0b60e01b1480610900575061090082611d37565b600881901c600090815260076020526040812054600160ff1b60ff84161c161561166e57506000919050565b61090082611dd2565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116ac82610f7f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600454600090819081906116fd9060081c6001612f0e565b9050815b818110156117415760008181526007602052604090205461172181611dee565b61172b9086612f0e565b945050808061173990612f26565b915050611701565b50505090565b60006001600454610b829190612eb6565b6daaeb6d7670e522a718067333cd4e3b15610efc576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156117de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118029190612f6e565b610efc576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610a11565b61184d3382611e0d565b6118bf5760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610a11565b610b61838383611f08565b610e4c828260405180602001604052806000815250612149565b610efc81336121e0565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e4c5760008281526009602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561194c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff1615610e4c5760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610b61838383604051806020016040528060008152506113b9565b6000611a3982610f7f565b600883901c6000908152600760205260408082208054600160ff1b60ff88161c1790555191925083916001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6008546001600160a01b031633146110845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a11565b600080611afc83611642565b611b6e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a11565b611b7783612255565b6000818152600360205260409020546001600160a01b031694909350915050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000818310611bf957816114b8565b5090919050565b611c0a3383611e0d565b611c7c5760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610a11565b610bac84848484612261565b6060600f805461091590612e66565b60606000611ca48361227a565b600101905060008167ffffffffffffffff811115611cc457611cc4612c55565b6040519080825280601f01601f191660200182016040528015611cee576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084611cf857509392505050565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611d9a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061090057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610900565b6000611ddd60045490565b821080156109005750506001111590565b60005b8115611e0857600019820190911690600101611df1565b919050565b6000611e1882611642565b611e8a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610a11565b6000611e9583610f7f565b9050806001600160a01b0316846001600160a01b03161480611ed05750836001600160a01b0316611ec584610998565b6001600160a01b0316145b80611f0057506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b600080611f1483611af0565b91509150846001600160a01b0316826001600160a01b031614611f9f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e00000000000000000000000000000000000000006064820152608401610a11565b6001600160a01b03841661201b5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152608401610a11565b612026600084611677565b6000612033846001612f0e565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015612063575060045481105b156120af57600081815260036020908152604080832080546001600160a01b0319166001600160a01b038b16179055600884901c83529082905290208054600160ff1b60ff84161c1790555b600084815260036020526040902080546001600160a01b0319166001600160a01b03871617905581841461210057600884901c60009081526020819052604090208054600160ff1b60ff87161c1790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600061215460045490565b9050612160848461235c565b61216e600085838686612515565b610bac5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610a11565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e4c57612213816126a2565b61221e8360206126b4565b60405160200161222f929190612fba565b60408051601f198184030181529082905262461bcd60e51b8252610a1191600401612b3c565b60006109008183612895565b61226c848484611f08565b61216e848484600185612515565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106122c3577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106122ef576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061230d57662386f26fc10000830492506010015b6305f5e1008310612325576305f5e100830492506008015b612710831061233957612710830492506004015b6064831061234b576064830492506002015b600a83106109005760010192915050565b600061236760045490565b9050600082116123df5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f74657220300000000000000000000000000000000000000000000000000000006064820152608401610a11565b6001600160a01b03831661245b5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610a11565b816004600082825461246d9190612f0e565b9091555050600081815260036020908152604080832080546001600160a01b0319166001600160a01b038816179055600884901c83529082905290208054600160ff1b60ff84161c179055805b6124c48383612f0e565b811015610bac5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48061250d81612f26565b9150506124ba565b60006001600160a01b0385163b1561269557506001835b6125368486612f0e565b81101561268f57604051630a85bd0160e11b81526001600160a01b0387169063150b7a029061256f9033908b908690899060040161303b565b6020604051808303816000875af19250505080156125aa575060408051601f3d908101601f191682019092526125a791810190613077565b60015b61265d573d8080156125d8576040519150601f19603f3d011682016040523d82523d6000602084013e6125dd565b606091505b5080516000036126555760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610a11565b805181602001fd5b82801561267a57506001600160e01b03198116630a85bd0160e11b145b9250508061268781612f26565b91505061252c565b50612699565b5060015b95945050505050565b60606109006001600160a01b03831660145b606060006126c3836002612eef565b6126ce906002612f0e565b67ffffffffffffffff8111156126e6576126e6612c55565b6040519080825280601f01601f191660200182016040528015612710576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061274757612747612f3f565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061279257612792612f3f565b60200101906001600160f81b031916908160001a90535060006127b6846002612eef565b6127c1906001612f0e565b90505b6001811115612846577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061280257612802612f3f565b1a60f81b82828151811061281857612818612f3f565b60200101906001600160f81b031916908160001a90535060049490941c9361283f81613094565b90506127c4565b5083156114b85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a11565b600881901c60008181526020849052604081205490919060ff808516919082181c80156128d7576128c581612996565b60ff168203600884901b17935061298d565b6000831161294d5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e0000000000000000000000006064820152608401610a11565b5060001990910160008181526020869052604090205490919080156129885761297581612996565b60ff0360ff16600884901b17935061298d565b6128d7565b50505092915050565b600060405180610120016040528061010081526020016130ac610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff6129df85612a00565b02901c815181106129f2576129f2612f3f565b016020015160f81c92915050565b6000808211612a0e57600080fd5b5060008190031690565b828054612a2490612e66565b90600052602060002090601f016020900481019282612a465760008555612a8c565b82601f10612a5f57805160ff1916838001178555612a8c565b82800160010185558215612a8c579182015b82811115612a8c578251825591602001919060010190612a71565b50612a98929150612a9c565b5090565b5b80821115612a985760008155600101612a9d565b6001600160e01b031981168114610efc57600080fd5b600060208284031215612ad957600080fd5b81356114b881612ab1565b60005b83811015612aff578181015183820152602001612ae7565b83811115610bac5750506000910152565b60008151808452612b28816020860160208601612ae4565b601f01601f19169290920160200192915050565b6020815260006114b86020830184612b10565b600060208284031215612b6157600080fd5b5035919050565b80356001600160a01b0381168114611e0857600080fd5b60008060408385031215612b9257600080fd5b612b9b83612b68565b946020939093013593505050565b600080600060608486031215612bbe57600080fd5b612bc784612b68565b9250612bd560208501612b68565b9150604084013590509250925092565b60008060408385031215612bf857600080fd5b50508035926020909101359150565b60008060408385031215612c1a57600080fd5b82359150610bdd60208401612b68565b8015158114610efc57600080fd5b600060208284031215612c4a57600080fd5b81356114b881612c2a565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612c8657612c86612c55565b604051601f8501601f19908116603f01168101908282118183101715612cae57612cae612c55565b81604052809350858152868686011115612cc757600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612cf357600080fd5b813567ffffffffffffffff811115612d0a57600080fd5b8201601f81018413612d1b57600080fd5b611f0084823560208401612c6b565b600060208284031215612d3c57600080fd5b6114b882612b68565b6020808252825182820181905260009190848201906040850190845b81811015612d7d57835183529284019291840191600101612d61565b50909695505050505050565b60008060408385031215612d9c57600080fd5b612da583612b68565b91506020830135612db581612c2a565b809150509250929050565b60008060408385031215612dd357600080fd5b612ddc83612b68565b9150610bdd60208401612b68565b60008060008060808587031215612e0057600080fd5b612e0985612b68565b9350612e1760208601612b68565b925060408501359150606085013567ffffffffffffffff811115612e3a57600080fd5b8501601f81018713612e4b57600080fd5b612e5a87823560208401612c6b565b91505092959194509250565b600181811c90821680612e7a57607f821691505b602082108103612e9a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612ec857612ec8612ea0565b500390565b600082612eea57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612f0957612f09612ea0565b500290565b60008219821115612f2157612f21612ea0565b500190565b600060018201612f3857612f38612ea0565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612f6757600080fd5b5051919050565b600060208284031215612f8057600080fd5b81516114b881612c2a565b60008351612f9d818460208801612ae4565b835190830190612fb1818360208801612ae4565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ff2816017850160208801612ae4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302f816028840160208801612ae4565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261306d6080830184612b10565b9695505050505050565b60006020828403121561308957600080fd5b81516114b881612ab1565b6000816130a3576130a3612ea0565b50600019019056fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212204e446be7575d392212b58e8584d57bad13f8ae00639f57f90022d07d51e9513664736f6c634300080d003368747470733a2f2f692d6c696b652d656767732d6261636b656e642d6d657461646174612e6865726f6b756170702e636f6d2f
Deployed Bytecode
0x6080604052600436106102dc5760003560e01c80636352211e11610182578063a53d14b5116100d5578063d52c57e011610084578063e985e9c511610061578063e985e9c514610852578063eddd0d9c1461089b578063f2fde38b146108bb57005b8063d52c57e0146107f2578063d547741f14610812578063dc95c4a71461083257005b8063b88d4fde116100b2578063b88d4fde146107a9578063b8997a97146107bc578063c87b56dd146107d257005b8063a53d14b514610769578063a6eb27e2146106aa578063ad2f852a1461078957005b80638ecad7211161013157806395d89b411161010e57806395d89b411461071f578063a217fddf14610734578063a22cb4651461074957005b80638ecad721146106aa57806390f2d79b146106bf57806391d14854146106d957005b8063823a3cc01161015f578063823a3cc01461063f5780638462151c1461065f5780638da5cb5b1461068c57005b80636352211e146105ea57806370a082311461060a578063715018a61461062a57005b80632db115441161023a57806342966c68116101e957806355f804b3116101c657806355f804b31461058a578063575428f5146105aa57806361ba27da146105ca57005b806342966c681461053457806347998157146105545780634ea3871a1461056a57005b806336568abe1161021757806336568abe146104df57806341f43434146104ff57806342842e0e1461052157005b80632db11544146104965780632f2ff15d146104a957806332cb6b0c146104c957005b806312065fe01161029657806323b872dd1161027357806323b872dd14610414578063248a9ca3146104275780632a55205a1461045757005b806312065fe0146103d657806313966db5146103e957806318160ddd146103ff57005b8063081812fc116102c4578063081812fc1461033c578063095ea7b314610374578063118c4f131461039457005b806301ffc9a7146102e557806306fdde031461031a57005b366102e357005b005b3480156102f157600080fd5b50610305610300366004612ac7565b6108db565b60405190151581526020015b60405180910390f35b34801561032657600080fd5b5061032f610906565b6040516103119190612b3c565b34801561034857600080fd5b5061035c610357366004612b4f565b610998565b6040516001600160a01b039091168152602001610311565b34801561038057600080fd5b506102e361038f366004612b7f565b610a36565b3480156103a057600080fd5b506103c87f4255524e4552000000000000000000000000000000000000000000000000000081565b604051908152602001610311565b3480156103e257600080fd5b50476103c8565b3480156103f557600080fd5b506103c8600a5481565b34801561040b57600080fd5b506103c8610b66565b6102e3610422366004612ba9565b610b87565b34801561043357600080fd5b506103c8610442366004612b4f565b60009081526009602052604090206001015490565b34801561046357600080fd5b50610477610472366004612be5565b610bb2565b604080516001600160a01b039093168352602083019190915201610311565b6102e36104a4366004612b4f565b610be6565b3480156104b557600080fd5b506102e36104c4366004612c07565b610d9f565b3480156104d557600080fd5b506103c86122b881565b3480156104eb57600080fd5b506102e36104fa366004612c07565b610dc4565b34801561050b57600080fd5b5061035c6daaeb6d7670e522a718067333cd4e81565b6102e361052f366004612ba9565b610e50565b34801561054057600080fd5b506102e361054f366004612b4f565b610e75565b34801561056057600080fd5b506103c861115c81565b34801561057657600080fd5b506102e3610585366004612c38565b610eff565b34801561059657600080fd5b506102e36105a5366004612ce1565b610f1a565b3480156105b657600080fd5b506102e36105c5366004612d2a565b610f35565b3480156105d657600080fd5b506102e36105e5366004612b4f565b610f72565b3480156105f657600080fd5b5061035c610605366004612b4f565b610f7f565b34801561061657600080fd5b506103c8610625366004612d2a565b610f93565b34801561063657600080fd5b506102e3611072565b34801561064b57600080fd5b506103c861065a366004612c07565b611086565b34801561066b57600080fd5b5061067f61067a366004612d2a565b61111d565b6040516103119190612d45565b34801561069857600080fd5b506008546001600160a01b031661035c565b3480156106b657600080fd5b506103c8600a81565b3480156106cb57600080fd5b50600b546103059060ff1681565b3480156106e557600080fd5b506103056106f4366004612c07565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561072b57600080fd5b5061032f6111e4565b34801561074057600080fd5b506103c8600081565b34801561075557600080fd5b506102e3610764366004612d89565b6111f3565b34801561077557600080fd5b506102e3610784366004612dc0565b6112b7565b34801561079557600080fd5b50600d5461035c906001600160a01b031681565b6102e36107b7366004612dea565b6113b9565b3480156107c857600080fd5b506103c8600c5481565b3480156107de57600080fd5b5061032f6107ed366004612b4f565b6113e6565b3480156107fe57600080fd5b506102e361080d366004612c07565b6114bf565b34801561081e57600080fd5b506102e361082d366004612c07565b611534565b34801561083e57600080fd5b506102e361084d366004612d2a565b611559565b34801561085e57600080fd5b5061030561086d366004612dc0565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108a757600080fd5b506102e36108b6366004612b4f565b611583565b3480156108c757600080fd5b506102e36108d6366004612d2a565b611590565b60006001600160e01b03198216637965db0b60e01b148061090057506109008261161d565b92915050565b60606001805461091590612e66565b80601f016020809104026020016040519081016040528092919081815260200182805461094190612e66565b801561098e5780601f106109635761010080835404028352916020019161098e565b820191906000526020600020905b81548152906001019060200180831161097157829003601f168201915b5050505050905090565b60006109a382611642565b610a1a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a4182610f7f565b9050806001600160a01b0316836001600160a01b031603610ac95760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f60448201527f776e6572000000000000000000000000000000000000000000000000000000006064820152608401610a11565b336001600160a01b0382161480610ae55750610ae5813361086d565b610b575760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610a11565b610b618383611677565b505050565b6000610b706116e5565b610b78611747565b610b829190612eb6565b905090565b826001600160a01b0381163314610ba157610ba133611758565b610bac848484611843565b50505050565b600d54600c546001600160a01b0390911690600090610bd36103e885612ecd565b610bdd9190612eef565b90509250929050565b600b5460ff16610c385760405162461bcd60e51b815260206004820152600b60248201527f4e6f7420656e61626c65640000000000000000000000000000000000000000006044820152606401610a11565b600081118015610c495750600a8111155b610c955760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e740000000000000000000000000000000000006044820152606401610a11565b6122b8610ca0610b66565b610caa9083612f0e565b1115610cf85760405162461bcd60e51b815260206004820152601160248201527f6e6f7420656e6f75676820737570706c790000000000000000000000000000006044820152606401610a11565b6000610d048233611086565b90506000610d128284612eb6565b600a54610d1f9190612eef565b9050803414610d705760405162461bcd60e51b815260206004820152600e60248201527f6e6f7420656e6f756768206574680000000000000000000000000000000000006044820152606401610a11565b336000908152600e602052604081208054859290610d8f908490612f0e565b90915550610b61905033846118ca565b600082815260096020526040902060010154610dba816118e4565b610b6183836118ee565b6001600160a01b0381163314610e425760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a11565b610e4c8282611990565b5050565b826001600160a01b0381163314610e6a57610e6a33611758565b610bac848484611a13565b3360009081527fec71955aa0e2cc446ea21e0c8dfeaf26a8eda69aa908832fdc106bff179abadf602052604090205460ff16610ef35760405162461bcd60e51b815260206004820152600c60248201527f4e6f742061206275726e657200000000000000000000000000000000000000006044820152606401610a11565b610efc81611a2e565b50565b610f07611a96565b600b805460ff1916911515919091179055565b610f22611a96565b8051610e4c90600f906020840190612a18565b610f3d611a96565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610e4c573d6000803e3d6000fd5b610f7a611a96565b600c55565b600080610f8b83611af0565b509392505050565b60006001600160a01b0382166110115760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201527f207a65726f2061646472657373000000000000000000000000000000000000006064820152608401610a11565b600060015b60045481101561106b5761102981611642565b1561105b5761103781610f7f565b6001600160a01b0316846001600160a01b03160361105b5761105882612f26565b91505b61106481612f26565b9050611016565b5092915050565b61107a611a96565b6110846000611b98565b565b6001600160a01b0381166000908152600e602052604081205461115c6110aa610b66565b101561110057600a81106110c2576000915050610900565b60006110cf82600a612eb6565b90506110f76110de8683611bea565b6110e6610b66565b6110f29061115c612eb6565b611bea565b92505050610900565b6000811161110f576001611112565b60005b60ff16949350505050565b606060008061112b84610f93565b905060008167ffffffffffffffff81111561114857611148612c55565b604051908082528060200260200182016040528015611171578160200160208202803683370190505b50905060015b8284146111db5761118781611642565b156111d357856001600160a01b031661119f82610f7f565b6001600160a01b0316036111d357808285806001019650815181106111c6576111c6612f3f565b6020026020010181815250505b600101611177565b50949350505050565b60606002805461091590612e66565b336001600160a01b0383160361124b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732315073693a20617070726f766520746f2063616c6c6572000000006044820152606401610a11565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112bf611a96565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015611326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134a9190612f55565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611395573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b619190612f6e565b836001600160a01b03811633146113d3576113d333611758565b6113df85858585611c00565b5050505050565b60606113f182611642565b6114635760405162461bcd60e51b815260206004820152602a60248201527f4552433732315073693a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e000000000000000000000000000000000000000000006064820152608401610a11565b600061146d611c88565b9050600081511161148d57604051806020016040528060008152506114b8565b8061149784611c97565b6040516020016114a8929190612f8b565b6040516020818303038152906040525b9392505050565b6114c7611a96565b6122b86114d2610b66565b6114dc9084612f0e565b111561152a5760405162461bcd60e51b815260206004820152601160248201527f6e6f7420656e6f75676820737570706c790000000000000000000000000000006044820152606401610a11565b610e4c81836118ca565b60008281526009602052604090206001015461154f816118e4565b610b618383611990565b611561611a96565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b61158b611a96565b600a55565b611598611a96565b6001600160a01b0381166116145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a11565b610efc81611b98565b60006001600160e01b03198216637965db0b60e01b1480610900575061090082611d37565b600881901c600090815260076020526040812054600160ff1b60ff84161c161561166e57506000919050565b61090082611dd2565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116ac82610f7f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600454600090819081906116fd9060081c6001612f0e565b9050815b818110156117415760008181526007602052604090205461172181611dee565b61172b9086612f0e565b945050808061173990612f26565b915050611701565b50505090565b60006001600454610b829190612eb6565b6daaeb6d7670e522a718067333cd4e3b15610efc576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156117de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118029190612f6e565b610efc576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610a11565b61184d3382611e0d565b6118bf5760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610a11565b610b61838383611f08565b610e4c828260405180602001604052806000815250612149565b610efc81336121e0565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e4c5760008281526009602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561194c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff1615610e4c5760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610b61838383604051806020016040528060008152506113b9565b6000611a3982610f7f565b600883901c6000908152600760205260408082208054600160ff1b60ff88161c1790555191925083916001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6008546001600160a01b031633146110845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a11565b600080611afc83611642565b611b6e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610a11565b611b7783612255565b6000818152600360205260409020546001600160a01b031694909350915050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000818310611bf957816114b8565b5090919050565b611c0a3383611e0d565b611c7c5760405162461bcd60e51b815260206004820152603460248201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f60448201527f74206f776e6572206e6f7220617070726f7665640000000000000000000000006064820152608401610a11565b610bac84848484612261565b6060600f805461091590612e66565b60606000611ca48361227a565b600101905060008167ffffffffffffffff811115611cc457611cc4612c55565b6040519080825280601f01601f191660200182016040528015611cee576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084611cf857509392505050565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611d9a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061090057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610900565b6000611ddd60045490565b821080156109005750506001111590565b60005b8115611e0857600019820190911690600101611df1565b919050565b6000611e1882611642565b611e8a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610a11565b6000611e9583610f7f565b9050806001600160a01b0316846001600160a01b03161480611ed05750836001600160a01b0316611ec584610998565b6001600160a01b0316145b80611f0057506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b600080611f1483611af0565b91509150846001600160a01b0316826001600160a01b031614611f9f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201527f74206973206e6f74206f776e00000000000000000000000000000000000000006064820152608401610a11565b6001600160a01b03841661201b5760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f2060448201527f61646472657373000000000000000000000000000000000000000000000000006064820152608401610a11565b612026600084611677565b6000612033846001612f0e565b600881901c600090815260208190526040902054909150600160ff1b60ff83161c16158015612063575060045481105b156120af57600081815260036020908152604080832080546001600160a01b0319166001600160a01b038b16179055600884901c83529082905290208054600160ff1b60ff84161c1790555b600084815260036020526040902080546001600160a01b0319166001600160a01b03871617905581841461210057600884901c60009081526020819052604090208054600160ff1b60ff87161c1790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600061215460045490565b9050612160848461235c565b61216e600085838686612515565b610bac5760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610a11565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16610e4c57612213816126a2565b61221e8360206126b4565b60405160200161222f929190612fba565b60408051601f198184030181529082905262461bcd60e51b8252610a1191600401612b3c565b60006109008183612895565b61226c848484611f08565b61216e848484600185612515565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106122c3577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106122ef576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061230d57662386f26fc10000830492506010015b6305f5e1008310612325576305f5e100830492506008015b612710831061233957612710830492506004015b6064831061234b576064830492506002015b600a83106109005760010192915050565b600061236760045490565b9050600082116123df5760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d757374206265206772656160448201527f74657220300000000000000000000000000000000000000000000000000000006064820152608401610a11565b6001600160a01b03831661245b5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610a11565b816004600082825461246d9190612f0e565b9091555050600081815260036020908152604080832080546001600160a01b0319166001600160a01b038816179055600884901c83529082905290208054600160ff1b60ff84161c179055805b6124c48383612f0e565b811015610bac5760405181906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48061250d81612f26565b9150506124ba565b60006001600160a01b0385163b1561269557506001835b6125368486612f0e565b81101561268f57604051630a85bd0160e11b81526001600160a01b0387169063150b7a029061256f9033908b908690899060040161303b565b6020604051808303816000875af19250505080156125aa575060408051601f3d908101601f191682019092526125a791810190613077565b60015b61265d573d8080156125d8576040519150601f19603f3d011682016040523d82523d6000602084013e6125dd565b606091505b5080516000036126555760405162461bcd60e51b815260206004820152603560248201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260448201527f31526563656976657220696d706c656d656e74657200000000000000000000006064820152608401610a11565b805181602001fd5b82801561267a57506001600160e01b03198116630a85bd0160e11b145b9250508061268781612f26565b91505061252c565b50612699565b5060015b95945050505050565b60606109006001600160a01b03831660145b606060006126c3836002612eef565b6126ce906002612f0e565b67ffffffffffffffff8111156126e6576126e6612c55565b6040519080825280601f01601f191660200182016040528015612710576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061274757612747612f3f565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061279257612792612f3f565b60200101906001600160f81b031916908160001a90535060006127b6846002612eef565b6127c1906001612f0e565b90505b6001811115612846577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061280257612802612f3f565b1a60f81b82828151811061281857612818612f3f565b60200101906001600160f81b031916908160001a90535060049490941c9361283f81613094565b90506127c4565b5083156114b85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a11565b600881901c60008181526020849052604081205490919060ff808516919082181c80156128d7576128c581612996565b60ff168203600884901b17935061298d565b6000831161294d5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527f696e64657820646f65736e27742065786973742e0000000000000000000000006064820152608401610a11565b5060001990910160008181526020869052604090205490919080156129885761297581612996565b60ff0360ff16600884901b17935061298d565b6128d7565b50505092915050565b600060405180610120016040528061010081526020016130ac610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff6129df85612a00565b02901c815181106129f2576129f2612f3f565b016020015160f81c92915050565b6000808211612a0e57600080fd5b5060008190031690565b828054612a2490612e66565b90600052602060002090601f016020900481019282612a465760008555612a8c565b82601f10612a5f57805160ff1916838001178555612a8c565b82800160010185558215612a8c579182015b82811115612a8c578251825591602001919060010190612a71565b50612a98929150612a9c565b5090565b5b80821115612a985760008155600101612a9d565b6001600160e01b031981168114610efc57600080fd5b600060208284031215612ad957600080fd5b81356114b881612ab1565b60005b83811015612aff578181015183820152602001612ae7565b83811115610bac5750506000910152565b60008151808452612b28816020860160208601612ae4565b601f01601f19169290920160200192915050565b6020815260006114b86020830184612b10565b600060208284031215612b6157600080fd5b5035919050565b80356001600160a01b0381168114611e0857600080fd5b60008060408385031215612b9257600080fd5b612b9b83612b68565b946020939093013593505050565b600080600060608486031215612bbe57600080fd5b612bc784612b68565b9250612bd560208501612b68565b9150604084013590509250925092565b60008060408385031215612bf857600080fd5b50508035926020909101359150565b60008060408385031215612c1a57600080fd5b82359150610bdd60208401612b68565b8015158114610efc57600080fd5b600060208284031215612c4a57600080fd5b81356114b881612c2a565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612c8657612c86612c55565b604051601f8501601f19908116603f01168101908282118183101715612cae57612cae612c55565b81604052809350858152868686011115612cc757600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612cf357600080fd5b813567ffffffffffffffff811115612d0a57600080fd5b8201601f81018413612d1b57600080fd5b611f0084823560208401612c6b565b600060208284031215612d3c57600080fd5b6114b882612b68565b6020808252825182820181905260009190848201906040850190845b81811015612d7d57835183529284019291840191600101612d61565b50909695505050505050565b60008060408385031215612d9c57600080fd5b612da583612b68565b91506020830135612db581612c2a565b809150509250929050565b60008060408385031215612dd357600080fd5b612ddc83612b68565b9150610bdd60208401612b68565b60008060008060808587031215612e0057600080fd5b612e0985612b68565b9350612e1760208601612b68565b925060408501359150606085013567ffffffffffffffff811115612e3a57600080fd5b8501601f81018713612e4b57600080fd5b612e5a87823560208401612c6b565b91505092959194509250565b600181811c90821680612e7a57607f821691505b602082108103612e9a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612ec857612ec8612ea0565b500390565b600082612eea57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612f0957612f09612ea0565b500290565b60008219821115612f2157612f21612ea0565b500190565b600060018201612f3857612f38612ea0565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612f6757600080fd5b5051919050565b600060208284031215612f8057600080fd5b81516114b881612c2a565b60008351612f9d818460208801612ae4565b835190830190612fb1818360208801612ae4565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612ff2816017850160208801612ae4565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161302f816028840160208801612ae4565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261306d6080830184612b10565b9695505050505050565b60006020828403121561308957600080fd5b81516114b881612ab1565b6000816130a3576130a3612ea0565b50600019019056fe0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212204e446be7575d392212b58e8584d57bad13f8ae00639f57f90022d07d51e9513664736f6c634300080d0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.