ERC-721
NFT
Overview
Max Total Supply
10,000 GenX
Holders
2,990
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 GenXLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HOK
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity Standard Json-Input format)
//Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import '@openzeppelin/contracts/interfaces/IERC20.sol'; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import '@openzeppelin/contracts/interfaces/IERC165.sol'; import '@openzeppelin/contracts/interfaces/IERC2981.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; contract HOK is ERC721Enumerable, Ownable, Pausable, ReentrancyGuard, IERC2981 { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _redeemIds; Counters.Counter private _tokenIds; bool public saleActive = false; string private baseURI; string private tokenSuffixURI; string private contractMetadata = 'contract.json'; uint256 public constant TICK_PERIOD = 30 minutes; // Time period to decrease price uint256 public constant PUBLIC_SALE_PERIOD = 3 hours; // Dutch Auction Time Period uint256 public constant STARTING_PRICE = 200000000000000000; // 0.2 ETH uint256 public constant BOTTOM_PRICE = 80000000000000000; // 0.08 ETH uint256 public constant SALE_PRICE_STEP = 20000000000000000; // 0.02 ETH uint256 public constant MINT_BATCH_LIMIT = 5; // Max number of Tokens minted in a txn uint256 public constant TOKEN_ID_OFFSET = 809; // Tokens reserved for Membership holders uint256 public saleStartsAt; uint256 public publicsaleStartsAt; uint256 public publicsaleEndsAt; uint256 public privatesaleStartsAt; uint256 public privatesaleEndsAt; uint256 public redemptionEndsAt; uint256 public constant MAX_PRIVATE_SALE_SUPPLY = 3000; // Cap for tokens to be sold in private sale is 2191 in addition to 809 for redmeption by members uint256 public constant MAX_TOKENS = 10000; // Max number of token sold in sale address private hokWithdrawAddress = address(0xa489363add22E44f1e6B8352aBaC2db6507bbFE3); // schema of the member record struct memberRecord { uint8 balance; bool exists; bool redeemed; } mapping (address => memberRecord) public _memberslist; mapping (address => bool) public _partnerslist; event TokenMinted(address indexed owner, uint256 indexed quantity); event SaleStatusChange(address indexed issuer, bool indexed status); event ContractWithdraw(address indexed initiator, address indexed hokWithdrawAddress, uint256 amount); event WithdrawAddressChanged(address indexed initiator,address indexed previousAddress, address indexed newAddress); uint16 internal royalty = 500; // base 10000, 5% uint16 public constant BASE = 10000; constructor(uint256 _saleStartTime, string memory _baseContractURI, string memory _tokenSuffixURI) ERC721("GenX by HOK", "GenX") { baseURI = _baseContractURI; tokenSuffixURI = _tokenSuffixURI; saleStartsAt = _saleStartTime; // Unix Timestamp Sep 28, 2021 12:00:00 pm PST privatesaleStartsAt = saleStartsAt; // Start of Day 1, Sep 28, 2021 12:00:00 pm PST privatesaleEndsAt = saleStartsAt + 24 hours; // End of Day 1, Sep 29, 2021 11:59:59 am PST publicsaleStartsAt = saleStartsAt + 48 hours; // Start of Day 3, Sep 30, 2021 12:00:00 pm PST publicsaleEndsAt = saleStartsAt + 72 hours; // End of Day 3, Oct 1, 2021 11:59:59 am PST redemptionEndsAt = saleStartsAt + 30 days; // Oct 28, 2021 12:00:00 pm PST, End of period for members to redeem from the 809 free tokens } function mintNFT(address recipient, uint256 numTokens) public onlyOwner { uint256 time = (block.timestamp); require(time > privatesaleEndsAt && time < publicsaleStartsAt, "Not Day 2"); require((_tokenIds.current() + numTokens+TOKEN_ID_OFFSET) <= MAX_PRIVATE_SALE_SUPPLY, "Private sale over"); for(uint256 i = 0; i < numTokens; i++){ _tokenIds.increment(); _safeMint(recipient, _tokenIds.current() + TOKEN_ID_OFFSET); } emit TokenMinted(recipient, numTokens); } function claimUnredeemed(address recipient, uint256 numTokens) public onlyOwner { uint256 time = (block.timestamp); require(time > redemptionEndsAt, "Redemption still active"); require((_redeemIds.current()+numTokens) <= TOKEN_ID_OFFSET, "Tokens Redeemed"); for(uint256 i = 0; i < numTokens; i++){ _redeemIds.increment(); _safeMint(recipient, _redeemIds.current() ); } emit TokenMinted(recipient, numTokens); } /** * @dev mints equivalent of `msg.sender` whitelisted balance of HOK token and assigns it to * `msg.sender` by calling _safeMint function. Dedicated for free redemotion for HOK members. * * Emits a {TokenMinted} event. * Emits two {TransferSingle} events via ERC721 Contract. * * Requirements: * - `saleActive` must be set to true. * - Current timestamp must greater than or equal `saleStartsAt`. * - `msg.sender` is among whitelisted HOK memebrs and hasn't redeemed the token before. * - Max number of tokens assigned for free redemption not reahced */ function memberRedeem() public { require(block.timestamp >= saleStartsAt && block.timestamp < redemptionEndsAt, "Redeem not active"); uint256 userBalance = _memberslist[msg.sender].balance; require((_redeemIds.current()) + userBalance <= TOKEN_ID_OFFSET, "Tokens Redeemed"); require(_memberslist[msg.sender].exists,"Restricted access"); require(!_memberslist[msg.sender].redeemed,"Tokens redeemed"); _memberslist[msg.sender].redeemed = true; for(uint256 i = 0; i < userBalance; i++){ _redeemIds.increment(); _safeMint(msg.sender, _redeemIds.current()); } emit TokenMinted(msg.sender, userBalance); } /** * @dev mints `numTokens` tokens of HOK token and assigns it to * `msg.sender` by calling _safeMint function. * * Emits a {TokenMinted} event. * Emits two {TransferSingle} events via ERC721 Contract. * * Requirements: * - `saleActive` must be set to true. * - Current timestamp must greater than or equal `saleStartsAt`. * - Current timestamp must within period of private sale `privatesaleStartsAt` - `privatesaleEndsAt`. * - `msg.sender` is among whitelisted HOK memebrs or partners * - Ether amount sent greater or equal the base price multipled by `numTokens`. * - `numTokens` within limits of max number of tokens minted in single txn. * - Max number of tokens for the private sale not reahced * @param numTokens - Number of tokens to be minted */ function mintPrivateSale(uint256 numTokens) public payable { require(saleActive && block.timestamp >= saleStartsAt, "Sale not active"); uint256 time = (block.timestamp); require(time > privatesaleStartsAt && time < privatesaleEndsAt, "Private sale over"); require(_memberslist[msg.sender].exists || _partnerslist[msg.sender],"Restricted access"); require((_tokenIds.current() + numTokens+TOKEN_ID_OFFSET) <= MAX_PRIVATE_SALE_SUPPLY, "Private sale sold"); require(msg.value >= BOTTOM_PRICE * numTokens, "Insuffiecint Eth"); require(numTokens <= MINT_BATCH_LIMIT && numTokens > 0, "Wrong Num Token"); for(uint256 i = 0; i < numTokens; i++){ _tokenIds.increment(); _safeMint(msg.sender, _tokenIds.current() + TOKEN_ID_OFFSET); } emit TokenMinted(msg.sender, numTokens); } /** * @dev mints `numTokens` tokens of HOK token and assigns it to * `msg.sender` by calling _safeMint function. * * Emits a {TokenMinted} event. * Emits two {TransferSingle} events via ERC721 Contract. * * Requirements: * - `saleActive` must be set to true. * - Current timestamp must greater than or equal `saleStartsAt`. * - Current timestamp must within period of public sale `publicsaleStartsAt` - `publicsaleEndsAt`. * - Ether amount sent greater or equal the current price multipled by `numTokens`. * - `numTokens` within limits of max number of tokens minted in single txn. * - Max number of tokens for the sale not reahced * @param numTokens - Number of tokens to be minted */ function mintPublicSale(uint256 numTokens) public payable { require(saleActive && block.timestamp >= saleStartsAt, "Sale not active"); uint256 time = (block.timestamp); require(time > publicsaleStartsAt && time < publicsaleEndsAt, "Public sale over"); uint256 currentPrice = _getCurrentPrice(); require(msg.value >= currentPrice * numTokens, "Insuffiecint Eth"); require(numTokens <= MINT_BATCH_LIMIT && numTokens > 0, "Wrong Num Token"); require((_tokenIds.current() + numTokens+TOKEN_ID_OFFSET) <= MAX_TOKENS, "Public sale sold"); for(uint256 i = 0; i < numTokens; i++){ _tokenIds.increment(); _safeMint(msg.sender, _tokenIds.current() + TOKEN_ID_OFFSET); } emit TokenMinted(msg.sender, numTokens); } function _getCurrentPrice() internal view returns (uint256 ){ uint256 time = (block.timestamp); uint256 price = BOTTOM_PRICE; if(time > (PUBLIC_SALE_PERIOD + publicsaleStartsAt)) { return price; } uint256 timeSlot = (time-publicsaleStartsAt) / TICK_PERIOD; price = STARTING_PRICE - (SALE_PRICE_STEP * timeSlot); return price; } function getCurrentPrice() public view returns (uint256 ){ uint256 time = (block.timestamp); if(time < publicsaleStartsAt) { return BOTTOM_PRICE; } return _getCurrentPrice(); } /** * @dev function that overrides safeTransferFrom to ensure no transfer till sale is over * see {IERC721-safeTransferFrom}. * Requirements: * - `saleActive` must be set to false. */ function safeTransferFrom( address from, address to, uint256 id, bytes memory _data) public virtual override { require(!saleActive,"No Transfer during sale"); super.safeTransferFrom(from,to,id, _data); } /** * @dev function that overrides safeTransferFrom to ensure no transfer till sale is over * see {IERC721-safeTransferFrom}. * Requirements: * - `saleActive` must be set to false. */ function safeTransferFrom( address from, address to, uint256 id) public virtual override { require(!saleActive,"No Transfer during sale"); super.safeTransferFrom(from,to,id); } /** * @dev function that overrides safeTransferFrom to ensure no transfer till sale is over * see {IERC721-transferFrom}. * Requirements: * - `saleActive` must be set to false. */ function transferFrom( address from, address to, uint256 id) public virtual override { require(!saleActive,"No Transfer during sale"); super.transferFrom(from,to,id); } /** * @dev Adds list of wallet addresses and their HOK membership card balances to whitelsited members in '_memberslist'. * * @param users - List of wallet addresses * @param balances - Users HOK membership card balances */ function whitelistMembers (address[] memory users, uint8[] memory balances) public onlyOwner { require(!saleActive, "Cant whitelist"); for (uint i = 0; i < users.length; i++) { _memberslist[users[i]].exists = true; _memberslist[users[i]].balance = balances[i]; } } /** * @dev Adds list of wallet addresses to whitelsited partenrs in '_partnerslist'. * * @param users - List of wallet addresses */ function whitelistPartners (address[] memory users) public onlyOwner { require(!saleActive, "Cant whitelist"); for (uint i = 0; i < users.length; i++) { _partnerslist[users[i]] = true; } } /** * @dev removes list of wallet addresses of already whitelsited members from '_memberslist'. * * @param users - List of wallet addresses */ function removeWhitelistMembers (address[] memory users) public onlyOwner { for (uint i = 0; i < users.length; i++) { delete _memberslist[users[i]]; } } /** * @dev removes list of wallet addresses of already whitelsited partners from '_partnerslist'. * * @param users - List of wallet addresses */ function removeWhitelistPartners (address[] memory users) public onlyOwner { for (uint i = 0; i < users.length; i++) { delete _partnerslist[users[i]]; } } function setBaseURI(string memory baseContractURI) public onlyOwner { baseURI = baseContractURI; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseContractURI = _baseURI(); return bytes(baseContractURI).length > 0 ? string(abi.encodePacked(baseContractURI, tokenId.toString(), tokenSuffixURI)) : ""; } /** * @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 override returns (string memory) { return baseURI; } /** * @dev returns the base contract metadata json object * this metadat file is used by OpenSea see {https://docs.opensea.io/docs/contract-level-metadata} * */ function contractURI() public view returns (string memory) { string memory baseContractURI = _baseURI(); return string(abi.encodePacked(baseContractURI, contractMetadata)); } /** * @dev Changes the sale status 'saleActive' from active to not active and vice versa * * Only Contract Owner can execute * * Emits a {SaleStatusChange} event. */ function changeSaleStatus() public onlyOwner { saleActive = !saleActive; emit SaleStatusChange(msg.sender, saleActive); } /** * @dev withdraws the specified '_amount' from contract balance and send it to the withdraw Addresses based on split ratio. * * Emits a {ContractWithdraw} event. * @param _amount - Amount to be withdrawn */ function withdraw(uint256 _amount) public nonReentrant { require(msg.sender == hokWithdrawAddress, "Not allowed"); uint256 balance = address(this).balance; require(_amount <= balance,"Insufficient funds"); bool success; (success, ) = payable(hokWithdrawAddress).call{value: _amount}(''); require(success, 'Withdraw Failed'); emit ContractWithdraw(msg.sender, hokWithdrawAddress, _amount); } /** * @dev Queries `_memberslist` and returns if '_address' exists or not. * * @param _address - user address */ function isWhitelisted(address _address) public view returns(bool) { return (_memberslist[_address].exists || _partnerslist[_address]); } /// @notice Calculate the royalty payment /// @param _salePrice the sale price of the token function royaltyInfo(uint256, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { return (address(this), (_salePrice * royalty) / BASE); } /// @dev set the royalty /// @param _royalty the royalty in base 10000, 500 = 5% function setRoyalty(uint16 _royalty) public virtual onlyOwner { require(_royalty >= 0 && _royalty <= 1000, 'Royalty must be between 0% and 10%.'); royalty = _royalty; } /// @dev withdraw ERC20 tokens divided by splits function withdrawTokens(address _tokenContract) external onlyOwner nonReentrant { IERC20 tokenContract = IERC20(_tokenContract); // transfer the token from address of hok address uint256 _amount = tokenContract.balanceOf(address(this)); tokenContract.transfer(hokWithdrawAddress, _amount); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable,IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } function changeWithdrawAddress(address _newAddress) public onlyOwner { require(_newAddress != address(0),'Non Zero Address'); emit WithdrawAddressChanged(msg.sender, hokWithdrawAddress, _newAddress); hokWithdrawAddress = _newAddress; } function getRemPrivateSaleSupply() public view returns (uint256) { return (MAX_PRIVATE_SALE_SUPPLY - TOKEN_ID_OFFSET - _tokenIds.current() ); } function getRemPublicSaleSupply() public view returns (uint256) { return (MAX_TOKENS - TOKEN_ID_OFFSET - _tokenIds.current() ); } }
// SPDX-License-Identifier: MIT 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() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard */ interface IERC2981 is IERC165 { /** * @dev Called with the sale price to determine how much royalty is owed and to whom. * @param tokenId - the NFT asset queried for royalty information * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @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), "ERC721Metadata: 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 = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: 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), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: 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, _data), "ERC721: 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`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @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), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @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 owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), 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 { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.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 tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT 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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT 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 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); }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 1000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_saleStartTime","type":"uint256"},{"internalType":"string","name":"_baseContractURI","type":"string"},{"internalType":"string","name":"_tokenSuffixURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"hokWithdrawAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ContractWithdraw","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"issuer","type":"address"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"SaleStatusChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"TokenMinted","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"previousAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"WithdrawAddressChanged","type":"event"},{"inputs":[],"name":"BASE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOTTOM_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PRIVATE_SALE_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_BATCH_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SALE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_PRICE_STEP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STARTING_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TICK_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ID_OFFSET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_memberslist","outputs":[{"internalType":"uint8","name":"balance","type":"uint8"},{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"bool","name":"redeemed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_partnerslist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"changeSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newAddress","type":"address"}],"name":"changeWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"claimUnredeemed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"getCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRemPrivateSaleSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRemPublicSaleSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"memberRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"mintNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"mintPrivateSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"mintPublicSale","outputs":[],"stateMutability":"payable","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":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privatesaleEndsAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privatesaleStartsAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicsaleEndsAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicsaleStartsAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redemptionEndsAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"removeWhitelistMembers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"removeWhitelistPartners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStartsAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"baseContractURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_royalty","type":"uint16"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint8[]","name":"balances","type":"uint8[]"}],"name":"whitelistMembers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"whitelistPartners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
600e805460ff1916905560c0604052600d60808190526c31b7b73a3930b1ba173539b7b760991b60a09081526200003a91601191906200021b565b50601880546001600160a01b03191673a489363add22e44f1e6b8352abac2db6507bbfe3179055601b805461ffff19166101f41790553480156200007d57600080fd5b506040516200445038038062004450833981016040819052620000a09162000378565b604080518082018252600b81526a47656e5820627920484f4b60a81b60208083019182528351808501909452600484526308ecadcb60e31b908401528151919291620000ef916000916200021b565b508051620001059060019060208401906200021b565b505050620001226200011c620001c560201b60201c565b620001c9565b600a805460ff60a01b191690556001600b5581516200014990600f9060208501906200021b565b5080516200015f9060109060208401906200021b565b5060128390556015839055620001798362015180620003ec565b6016556012546200018e906202a300620003ec565b601355601254620001a3906203f480620003ec565b601455601254620001b89062278d00620003ec565b6017555062000466915050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002299062000413565b90600052602060002090601f0160209004810192826200024d576000855562000298565b82601f106200026857805160ff191683800117855562000298565b8280016001018555821562000298579182015b82811115620002985782518255916020019190600101906200027b565b50620002a6929150620002aa565b5090565b5b80821115620002a65760008155600101620002ab565b600082601f830112620002d357600080fd5b81516001600160401b0380821115620002f057620002f062000450565b604051601f8301601f19908116603f011681019082821181831017156200031b576200031b62000450565b816040528381526020925086838588010111156200033857600080fd5b600091505b838210156200035c57858201830151818301840152908201906200033d565b838211156200036e5760008385830101525b9695505050505050565b6000806000606084860312156200038e57600080fd5b835160208501519093506001600160401b0380821115620003ae57600080fd5b620003bc87838801620002c1565b93506040860151915080821115620003d357600080fd5b50620003e286828701620002c1565b9150509250925092565b600082198211156200040e57634e487b7160e01b600052601160045260246000fd5b500190565b600181811c908216806200042857607f821691505b602082108114156200044a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b613fda80620004766000396000f3fe6080604052600436106103975760003560e01c80635c975abb116101dc578063a6797d5711610102578063e8a3d485116100a0578063f2fde38b1161006f578063f2fde38b14610a9e578063f47c84c514610abe578063f79dc6f714610ad4578063fc8ff57914610aef57600080fd5b8063e8a3d48514610a02578063e985e9c514610a17578063eb91d37e14610a60578063ec342ad014610a7557600080fd5b8063c87b56dd116100dc578063c87b56dd1461094d578063ca1d953c1461096d578063d12f702914610982578063dd9ef9a91461099e57600080fd5b8063a6797d57146108e7578063b1a139c814610917578063b88d4fde1461092d57600080fd5b8063834763851161017a5780639f34835e116101495780639f34835e14610887578063a13976221461089c578063a22cb465146108b1578063a5b16f51146108d157600080fd5b806383476385146108145780638da5cb5b146108345780638f19c76b1461085257806395d89b411461087257600080fd5b80636dd478e3116101b65780636dd478e3146107b657806370a08231146107c9578063715018a6146107e957806375d4f952146107fe57600080fd5b80635c975abb1461074c5780636352211e1461077c57806368428a1b1461079c57600080fd5b80632f745c59116102c157806345763d0c1161025f57806355f804b31161022e57806355f804b3146106ed57806358194bca1461070d578063583e88ab146107235780635a5e5d581461073957600080fd5b806345763d0c1461068157806349df728c146106975780634bc9684a146106b75780634f6ccce7146106cd57600080fd5b80633b1d2ab31161029b5780633b1d2ab31461060b5780633c168eab1461062b57806342842e0e1461064b57806344c943dd1461066b57600080fd5b80632f745c59146105ab57806336e79a5a146105cb5780633af32abf146105eb57600080fd5b8063143a3f92116103395780632a55205a116103085780632a55205a146105165780632c68ba80146105555780632dc04e46146105755780632e1a7d4d1461058b57600080fd5b8063143a3f92146104ac5780631453671d146104c157806318160ddd146104e157806323b872dd146104f657600080fd5b8063081812fc11610375578063081812fc14610415578063095ea7b31461044d5780631146e6021461046d578063138a6cf61461048257600080fd5b806301ffc9a71461039c57806306fdde03146103d157806307a0fac8146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004613b31565b610b05565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103e6610b49565b6040516103c89190613d92565b3480156103ff57600080fd5b5061041361040e3660046139e6565b610bdb565b005b34801561042157600080fd5b50610435610430366004613bd8565b610d59565b6040516001600160a01b0390911681526020016103c8565b34801561045957600080fd5b506104136104683660046139e6565b610dee565b34801561047957600080fd5b50610413610f20565b34801561048e57600080fd5b5061049e67011c37937e08000081565b6040519081526020016103c8565b3480156104b857600080fd5b5061049e600581565b3480156104cd57600080fd5b506104136104dc3660046138a9565b611146565b3480156104ed57600080fd5b5060085461049e565b34801561050257600080fd5b506104136105113660046138f7565b611242565b34801561052257600080fd5b50610536610531366004613c0a565b6112a0565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561056157600080fd5b50610413610570366004613a10565b6112d1565b34801561058157600080fd5b5061049e60155481565b34801561059757600080fd5b506104136105a6366004613bd8565b6113d8565b3480156105b757600080fd5b5061049e6105c63660046139e6565b6115ce565b3480156105d757600080fd5b506104136105e6366004613bb4565b611676565b3480156105f757600080fd5b506103bc6106063660046138a9565b611752565b34801561061757600080fd5b50610413610626366004613a10565b611798565b34801561063757600080fd5b506104136106463660046139e6565b61183f565b34801561065757600080fd5b506104136106663660046138f7565b61199e565b34801561067757600080fd5b5061049e61032981565b34801561068d57600080fd5b5061049e60125481565b3480156106a357600080fd5b506104136106b23660046138a9565b6119fc565b3480156106c357600080fd5b5061049e61070881565b3480156106d957600080fd5b5061049e6106e8366004613bd8565b611bdd565b3480156106f957600080fd5b50610413610708366004613b6b565b611c81565b34801561071957600080fd5b5061049e60145481565b34801561072f57600080fd5b5061049e60135481565b610413610747366004613bd8565b611cdc565b34801561075857600080fd5b50600a5474010000000000000000000000000000000000000000900460ff166103bc565b34801561078857600080fd5b50610435610797366004613bd8565b611f3e565b3480156107a857600080fd5b50600e546103bc9060ff1681565b6104136107c4366004613bd8565b611fc9565b3480156107d557600080fd5b5061049e6107e43660046138a9565b6122a4565b3480156107f557600080fd5b5061041361233e565b34801561080a57600080fd5b5061049e610bb881565b34801561082057600080fd5b5061041361082f366004613a10565b612392565b34801561084057600080fd5b50600a546001600160a01b0316610435565b34801561085e57600080fd5b5061041361086d366004613a45565b61243b565b34801561087e57600080fd5b506103e66125b3565b34801561089357600080fd5b5061049e6125c2565b3480156108a857600080fd5b5061049e6125ea565b3480156108bd57600080fd5b506104136108cc3660046139af565b612603565b3480156108dd57600080fd5b5061049e612a3081565b3480156108f357600080fd5b506103bc6109023660046138a9565b601a6020526000908152604090205460ff1681565b34801561092357600080fd5b5061049e60175481565b34801561093957600080fd5b50610413610948366004613933565b6126c8565b34801561095957600080fd5b506103e6610968366004613bd8565b61272d565b34801561097957600080fd5b50610413612819565b34801561098e57600080fd5b5061049e6702c68af0bb14000081565b3480156109aa57600080fd5b506109e16109b93660046138a9565b60196020526000908152604090205460ff808216916101008104821691620100009091041683565b6040805160ff909416845291151560208401521515908201526060016103c8565b348015610a0e57600080fd5b506103e66128a8565b348015610a2357600080fd5b506103bc610a323660046138c4565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a6c57600080fd5b5061049e6128df565b348015610a8157600080fd5b50610a8b61271081565b60405161ffff90911681526020016103c8565b348015610aaa57600080fd5b50610413610ab93660046138a9565b61290b565b348015610aca57600080fd5b5061049e61271081565b348015610ae057600080fd5b5061049e66470de4df82000081565b348015610afb57600080fd5b5061049e60165481565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610b435750610b43826129db565b92915050565b606060008054610b5890613e88565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8490613e88565b8015610bd15780601f10610ba657610100808354040283529160200191610bd1565b820191906000526020600020905b815481529060010190602001808311610bb457829003601f168201915b5050505050905090565b600a546001600160a01b03163314610c285760405162461bcd60e51b81526020600482018190526024820152600080516020613f8583398151915260448201526064015b60405180910390fd5b60175442908111610c7b5760405162461bcd60e51b815260206004820152601760248201527f526564656d7074696f6e207374696c6c206163746976650000000000000000006044820152606401610c1f565b61032982610c88600c5490565b610c929190613dfa565b1115610ce05760405162461bcd60e51b815260206004820152600f60248201527f546f6b656e732052656465656d656400000000000000000000000000000000006044820152606401610c1f565b60005b82811015610d1d57610cf9600c80546001019055565b610d0b84610d06600c5490565b612a19565b80610d1581613ec3565b915050610ce3565b5060405182906001600160a01b038516907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a3505050565b6000818152600260205260408120546001600160a01b0316610dd25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c1f565b506000908152600460205260409020546001600160a01b031690565b6000610df982611f3e565b9050806001600160a01b0316836001600160a01b03161415610e835760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c1f565b336001600160a01b0382161480610e9f5750610e9f8133610a32565b610f115760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c1f565b610f1b8383612a33565b505050565b6012544210158015610f33575060175442105b610f7f5760405162461bcd60e51b815260206004820152601160248201527f52656465656d206e6f74206163746976650000000000000000000000000000006044820152606401610c1f565b3360009081526019602052604090205460ff1661032981610f9f600c5490565b610fa99190613dfa565b1115610ff75760405162461bcd60e51b815260206004820152600f60248201527f546f6b656e732052656465656d656400000000000000000000000000000000006044820152606401610c1f565b33600090815260196020526040902054610100900460ff1661105b5760405162461bcd60e51b815260206004820152601160248201527f52657374726963746564206163636573730000000000000000000000000000006044820152606401610c1f565b3360009081526019602052604090205462010000900460ff16156110c15760405162461bcd60e51b815260206004820152600f60248201527f546f6b656e732072656465656d656400000000000000000000000000000000006044820152606401610c1f565b336000908152601960205260408120805462ff00001916620100001790555b81811015611115576110f6600c80546001019055565b61110333610d06600c5490565b8061110d81613ec3565b9150506110e0565b50604051819033907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a350565b600a546001600160a01b0316331461118e5760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6001600160a01b0381166111e45760405162461bcd60e51b815260206004820152601060248201527f4e6f6e205a65726f2041646472657373000000000000000000000000000000006044820152606401610c1f565b6018546040516001600160a01b0380841692169033907fe4835a96c34288994ead192162f76ebe82ffdb50721a3e0e8a0695a2790f3b4890600090a4601880546001600160a01b0319166001600160a01b0392909216919091179055565b600e5460ff16156112955760405162461bcd60e51b815260206004820152601760248201527f4e6f205472616e7366657220647572696e672073616c650000000000000000006044820152606401610c1f565b610f1b838383612aa1565b601b5460009081903090612710906112bc9061ffff1686613e26565b6112c69190613e12565b915091509250929050565b600a546001600160a01b031633146113195760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b600e5460ff161561136c5760405162461bcd60e51b815260206004820152600e60248201527f43616e742077686974656c6973740000000000000000000000000000000000006044820152606401610c1f565b60005b81518110156113d4576001601a600084848151811061139057611390613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806113cc81613ec3565b91505061136f565b5050565b6002600b54141561142b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c1f565b6002600b556018546001600160a01b0316331461148a5760405162461bcd60e51b815260206004820152600b60248201527f4e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610c1f565b47808211156114db5760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742066756e647300000000000000000000000000006044820152606401610c1f565b6018546040516000916001600160a01b03169084908381818185875af1925050503d8060008114611528576040519150601f19603f3d011682016040523d82523d6000602084013e61152d565b606091505b505080915050806115805760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177204661696c656400000000000000000000000000000000006044820152606401610c1f565b6018546040518481526001600160a01b039091169033907f33717283d41d9137bab8be49fdc145ea8d670d8b79619253b50defe346d31bc89060200160405180910390a350506001600b5550565b60006115d9836122a4565b821061164d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c1f565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b031633146116be5760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6103e88161ffff16111561173a5760405162461bcd60e51b815260206004820152602360248201527f526f79616c7479206d757374206265206265747765656e20302520616e64203160448201527f30252e00000000000000000000000000000000000000000000000000000000006064820152608401610c1f565b601b805461ffff191661ffff92909216919091179055565b6001600160a01b038116600090815260196020526040812054610100900460ff1680610b435750506001600160a01b03166000908152601a602052604090205460ff1690565b600a546001600160a01b031633146117e05760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b60005b81518110156113d457601a600083838151811061180257611802613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191690558061183781613ec3565b9150506117e3565b600a546001600160a01b031633146118875760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b60165442908111801561189b575060135481105b6118e75760405162461bcd60e51b815260206004820152600960248201527f4e6f7420446179203200000000000000000000000000000000000000000000006044820152606401610c1f565b610bb8610329836118f7600d5490565b6119019190613dfa565b61190b9190613dfa565b11156119595760405162461bcd60e51b815260206004820152601160248201527f507269766174652073616c65206f7665720000000000000000000000000000006044820152606401610c1f565b60005b82811015610d1d57611972600d80546001019055565b61198c84610329611982600d5490565b610d069190613dfa565b8061199681613ec3565b91505061195c565b600e5460ff16156119f15760405162461bcd60e51b815260206004820152601760248201527f4e6f205472616e7366657220647572696e672073616c650000000000000000006044820152606401610c1f565b610f1b838383612b28565b600a546001600160a01b03163314611a445760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6002600b541415611a975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c1f565b6002600b556040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a082319060240160206040518083038186803b158015611af957600080fd5b505afa158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b319190613bf1565b6018546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0391821660048201526024810183905291925083169063a9059cbb90604401602060405180830381600087803b158015611b9a57600080fd5b505af1158015611bae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd29190613b14565b50506001600b555050565b6000611be860085490565b8210611c5c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c1f565b60088281548110611c6f57611c6f613f34565b90600052602060002001549050919050565b600a546001600160a01b03163314611cc95760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b80516113d490600f906020840190613723565b600e5460ff168015611cf057506012544210155b611d3c5760405162461bcd60e51b815260206004820152600f60248201527f53616c65206e6f742061637469766500000000000000000000000000000000006044820152606401610c1f565b601354429081118015611d50575060145481105b611d9c5760405162461bcd60e51b815260206004820152601060248201527f5075626c69632073616c65206f766572000000000000000000000000000000006044820152606401610c1f565b6000611da6612b43565b9050611db28382613e26565b341015611e015760405162461bcd60e51b815260206004820152601060248201527f496e73756666696563696e7420457468000000000000000000000000000000006044820152606401610c1f565b60058311158015611e125750600083115b611e5e5760405162461bcd60e51b815260206004820152600f60248201527f57726f6e67204e756d20546f6b656e00000000000000000000000000000000006044820152606401610c1f565b61271061032984611e6e600d5490565b611e789190613dfa565b611e829190613dfa565b1115611ed05760405162461bcd60e51b815260206004820152601060248201527f5075626c69632073616c6520736f6c64000000000000000000000000000000006044820152606401610c1f565b60005b83811015611f0b57611ee9600d80546001019055565b611ef933610329611982600d5490565b80611f0381613ec3565b915050611ed3565b50604051839033907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a3505050565b6000818152600260205260408120546001600160a01b031680610b435760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c1f565b600e5460ff168015611fdd57506012544210155b6120295760405162461bcd60e51b815260206004820152600f60248201527f53616c65206e6f742061637469766500000000000000000000000000000000006044820152606401610c1f565b60155442908111801561203d575060165481105b6120895760405162461bcd60e51b815260206004820152601160248201527f507269766174652073616c65206f7665720000000000000000000000000000006044820152606401610c1f565b33600090815260196020526040902054610100900460ff16806120bb5750336000908152601a602052604090205460ff165b6121075760405162461bcd60e51b815260206004820152601160248201527f52657374726963746564206163636573730000000000000000000000000000006044820152606401610c1f565b610bb861032983612117600d5490565b6121219190613dfa565b61212b9190613dfa565b11156121795760405162461bcd60e51b815260206004820152601160248201527f507269766174652073616c6520736f6c640000000000000000000000000000006044820152606401610c1f565b61218b8267011c37937e080000613e26565b3410156121da5760405162461bcd60e51b815260206004820152601060248201527f496e73756666696563696e7420457468000000000000000000000000000000006044820152606401610c1f565b600582111580156121eb5750600082115b6122375760405162461bcd60e51b815260206004820152600f60248201527f57726f6e67204e756d20546f6b656e00000000000000000000000000000000006044820152606401610c1f565b60005b8281101561227257612250600d80546001019055565b61226033610329611982600d5490565b8061226a81613ec3565b91505061223a565b50604051829033907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a35050565b60006001600160a01b0382166123225760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c1f565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146123865760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6123906000612bb8565b565b600a546001600160a01b031633146123da5760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b60005b81518110156113d457601960008383815181106123fc576123fc613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805462ffffff191690558061243381613ec3565b9150506123dd565b600a546001600160a01b031633146124835760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b600e5460ff16156124d65760405162461bcd60e51b815260206004820152600e60248201527f43616e742077686974656c6973740000000000000000000000000000000000006044820152606401610c1f565b60005b8251811015610f1b576001601960008584815181106124fa576124fa613f34565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160016101000a81548160ff02191690831515021790555081818151811061254e5761254e613f34565b60200260200101516019600085848151811061256c5761256c613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191660ff92909216919091179055806125ab81613ec3565b9150506124d9565b606060018054610b5890613e88565b60006125cd600d5490565b6125db610329610bb8613e45565b6125e59190613e45565b905090565b60006125f5600d5490565b6125db610329612710613e45565b6001600160a01b03821633141561265c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c1f565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600e5460ff161561271b5760405162461bcd60e51b815260206004820152601760248201527f4e6f205472616e7366657220647572696e672073616c650000000000000000006044820152606401610c1f565b61272784848484612c0a565b50505050565b6000818152600260205260409020546060906001600160a01b03166127ba5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610c1f565b60006127c4612c92565b905060008151116127e45760405180602001604052806000815250612812565b806127ee84612ca1565b601060405160200161280293929190613cf2565b6040516020818303038152906040525b9392505050565b600a546001600160a01b031633146128615760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b600e805460ff19811660ff91821615908117909255604051911615159033907fe3f6649f5bc36b8b8c13782cfdb234a2f34ea0a28e750e23ea10b14d550f643590600090a3565b606060006128b4612c92565b90508060116040516020016128ca929190613d2f565b60405160208183030381529060405291505090565b60135460009042908110156128fd5767011c37937e08000091505090565b612905612b43565b91505090565b600a546001600160a01b031633146129535760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6001600160a01b0381166129cf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c1f565b6129d881612bb8565b50565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610b435750610b4382612dd3565b6113d4828260405180602001604052806000815250612e6e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612a6882611f3e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612aab3382612eec565b612b1d5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c1f565b610f1b838383612fdf565b610f1b838383604051806020016040528060008152506126c8565b601354600090429067011c37937e08000090612b6190612a30613dfa565b821115612b6e5792915050565b600061070860135484612b819190613e45565b612b8b9190613e12565b9050612b9e8166470de4df820000613e26565b612bb0906702c68af0bb140000613e45565b949350505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612c143383612eec565b612c865760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c1f565b612727848484846131b7565b6060600f8054610b5890613e88565b606081612ce157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612d0b5780612cf581613ec3565b9150612d049050600a83613e12565b9150612ce5565b60008167ffffffffffffffff811115612d2657612d26613f4a565b6040519080825280601f01601f191660200182016040528015612d50576020820181803683370190505b5090505b8415612bb057612d65600183613e45565b9150612d72600a86613ede565b612d7d906030613dfa565b60f81b818381518110612d9257612d92613f34565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612dcc600a86613e12565b9450612d54565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612e3657506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b4357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610b43565b612e788383613235565b612e856000848484613383565b610f1b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c1f565b6000818152600260205260408120546001600160a01b0316612f655760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c1f565b6000612f7083611f3e565b9050806001600160a01b0316846001600160a01b03161480612fab5750836001600160a01b0316612fa084610d59565b6001600160a01b0316145b80612bb057506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16612bb0565b826001600160a01b0316612ff282611f3e565b6001600160a01b03161461306e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c1f565b6001600160a01b0382166130e95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c1f565b6130f48383836134db565b6130ff600082612a33565b6001600160a01b0383166000908152600360205260408120805460019290613128908490613e45565b90915550506001600160a01b0382166000908152600360205260408120805460019290613156908490613dfa565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6131c2848484612fdf565b6131ce84848484613383565b6127275760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c1f565b6001600160a01b03821661328b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c1f565b6000818152600260205260409020546001600160a01b0316156132f05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c1f565b6132fc600083836134db565b6001600160a01b0382166000908152600360205260408120805460019290613325908490613dfa565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156134d057604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906133c7903390899088908890600401613d56565b602060405180830381600087803b1580156133e157600080fd5b505af1925050508015613411575060408051601f3d908101601f1916820190925261340e91810190613b4e565b60015b6134b6573d80801561343f576040519150601f19603f3d011682016040523d82523d6000602084013e613444565b606091505b5080516134ae5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c1f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612bb0565b506001949350505050565b6001600160a01b0383166135365761353181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613559565b816001600160a01b0316836001600160a01b031614613559576135598382613593565b6001600160a01b03821661357057610f1b81613630565b826001600160a01b0316826001600160a01b031614610f1b57610f1b82826136df565b600060016135a0846122a4565b6135aa9190613e45565b6000838152600760205260409020549091508082146135fd576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061364290600190613e45565b6000838152600960205260408120546008805493945090928490811061366a5761366a613f34565b90600052602060002001549050806008838154811061368b5761368b613f34565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806136c3576136c3613f1e565b6001900381819060005260206000200160009055905550505050565b60006136ea836122a4565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461372f90613e88565b90600052602060002090601f0160209004810192826137515760008555613797565b82601f1061376a57805160ff1916838001178555613797565b82800160010185558215613797579182015b8281111561379757825182559160200191906001019061377c565b506137a39291506137a7565b5090565b5b808211156137a357600081556001016137a8565b600067ffffffffffffffff8311156137d6576137d6613f4a565b6137e9601f8401601f1916602001613da5565b90508281528383830111156137fd57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461382b57600080fd5b919050565b600082601f83011261384157600080fd5b8135602061385661385183613dd6565b613da5565b80838252828201915082860187848660051b890101111561387657600080fd5b60005b8581101561389c5761388a82613814565b84529284019290840190600101613879565b5090979650505050505050565b6000602082840312156138bb57600080fd5b61281282613814565b600080604083850312156138d757600080fd5b6138e083613814565b91506138ee60208401613814565b90509250929050565b60008060006060848603121561390c57600080fd5b61391584613814565b925061392360208501613814565b9150604084013590509250925092565b6000806000806080858703121561394957600080fd5b61395285613814565b935061396060208601613814565b925060408501359150606085013567ffffffffffffffff81111561398357600080fd5b8501601f8101871361399457600080fd5b6139a3878235602084016137bc565b91505092959194509250565b600080604083850312156139c257600080fd5b6139cb83613814565b915060208301356139db81613f60565b809150509250929050565b600080604083850312156139f957600080fd5b613a0283613814565b946020939093013593505050565b600060208284031215613a2257600080fd5b813567ffffffffffffffff811115613a3957600080fd5b612bb084828501613830565b60008060408385031215613a5857600080fd5b823567ffffffffffffffff80821115613a7057600080fd5b613a7c86838701613830565b9350602091508185013581811115613a9357600080fd5b85019050601f81018613613aa657600080fd5b8035613ab461385182613dd6565b80828252848201915084840189868560051b8701011115613ad457600080fd5b60009450845b84811015613b0457813560ff81168114613af2578687fd5b84529286019290860190600101613ada565b5096999098509650505050505050565b600060208284031215613b2657600080fd5b815161281281613f60565b600060208284031215613b4357600080fd5b813561281281613f6e565b600060208284031215613b6057600080fd5b815161281281613f6e565b600060208284031215613b7d57600080fd5b813567ffffffffffffffff811115613b9457600080fd5b8201601f81018413613ba557600080fd5b612bb0848235602084016137bc565b600060208284031215613bc657600080fd5b813561ffff8116811461281257600080fd5b600060208284031215613bea57600080fd5b5035919050565b600060208284031215613c0357600080fd5b5051919050565b60008060408385031215613c1d57600080fd5b50508035926020909101359150565b60008151808452613c44816020860160208601613e5c565b601f01601f19169290920160200192915050565b8054600090600181811c9080831680613c7257607f831692505b6020808410821415613c9457634e487b7160e01b600052602260045260246000fd5b818015613ca85760018114613cb957613ce6565b60ff19861689528489019650613ce6565b60008881526020902060005b86811015613cde5781548b820152908501908301613cc5565b505084890196505b50505050505092915050565b60008451613d04818460208901613e5c565b845190830190613d18818360208901613e5c565b613d2481830186613c58565b979650505050505050565b60008351613d41818460208801613e5c565b613d4d81840185613c58565b95945050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d886080830184613c2c565b9695505050505050565b6020815260006128126020830184613c2c565b604051601f8201601f1916810167ffffffffffffffff81118282101715613dce57613dce613f4a565b604052919050565b600067ffffffffffffffff821115613df057613df0613f4a565b5060051b60200190565b60008219821115613e0d57613e0d613ef2565b500190565b600082613e2157613e21613f08565b500490565b6000816000190483118215151615613e4057613e40613ef2565b500290565b600082821015613e5757613e57613ef2565b500390565b60005b83811015613e77578181015183820152602001613e5f565b838111156127275750506000910152565b600181811c90821680613e9c57607f821691505b60208210811415613ebd57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613ed757613ed7613ef2565b5060010190565b600082613eed57613eed613f08565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146129d857600080fd5b6001600160e01b0319811681146129d857600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e6bae8cc377422f277442ce94b42d0005cb185cb3f33b693ed208d2bed5cda8764736f6c63430008070033000000000000000000000000000000000000000000000000000000006153ba90000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000005268747470733a2f2f6e667467656e2e6d7970696e6174612e636c6f75642f697066732f516d6168683273664a336370473744556552347961313577754c4d6836376f7376663357624e51727831565633712f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052e6a736f6e000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103975760003560e01c80635c975abb116101dc578063a6797d5711610102578063e8a3d485116100a0578063f2fde38b1161006f578063f2fde38b14610a9e578063f47c84c514610abe578063f79dc6f714610ad4578063fc8ff57914610aef57600080fd5b8063e8a3d48514610a02578063e985e9c514610a17578063eb91d37e14610a60578063ec342ad014610a7557600080fd5b8063c87b56dd116100dc578063c87b56dd1461094d578063ca1d953c1461096d578063d12f702914610982578063dd9ef9a91461099e57600080fd5b8063a6797d57146108e7578063b1a139c814610917578063b88d4fde1461092d57600080fd5b8063834763851161017a5780639f34835e116101495780639f34835e14610887578063a13976221461089c578063a22cb465146108b1578063a5b16f51146108d157600080fd5b806383476385146108145780638da5cb5b146108345780638f19c76b1461085257806395d89b411461087257600080fd5b80636dd478e3116101b65780636dd478e3146107b657806370a08231146107c9578063715018a6146107e957806375d4f952146107fe57600080fd5b80635c975abb1461074c5780636352211e1461077c57806368428a1b1461079c57600080fd5b80632f745c59116102c157806345763d0c1161025f57806355f804b31161022e57806355f804b3146106ed57806358194bca1461070d578063583e88ab146107235780635a5e5d581461073957600080fd5b806345763d0c1461068157806349df728c146106975780634bc9684a146106b75780634f6ccce7146106cd57600080fd5b80633b1d2ab31161029b5780633b1d2ab31461060b5780633c168eab1461062b57806342842e0e1461064b57806344c943dd1461066b57600080fd5b80632f745c59146105ab57806336e79a5a146105cb5780633af32abf146105eb57600080fd5b8063143a3f92116103395780632a55205a116103085780632a55205a146105165780632c68ba80146105555780632dc04e46146105755780632e1a7d4d1461058b57600080fd5b8063143a3f92146104ac5780631453671d146104c157806318160ddd146104e157806323b872dd146104f657600080fd5b8063081812fc11610375578063081812fc14610415578063095ea7b31461044d5780631146e6021461046d578063138a6cf61461048257600080fd5b806301ffc9a71461039c57806306fdde03146103d157806307a0fac8146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004613b31565b610b05565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103e6610b49565b6040516103c89190613d92565b3480156103ff57600080fd5b5061041361040e3660046139e6565b610bdb565b005b34801561042157600080fd5b50610435610430366004613bd8565b610d59565b6040516001600160a01b0390911681526020016103c8565b34801561045957600080fd5b506104136104683660046139e6565b610dee565b34801561047957600080fd5b50610413610f20565b34801561048e57600080fd5b5061049e67011c37937e08000081565b6040519081526020016103c8565b3480156104b857600080fd5b5061049e600581565b3480156104cd57600080fd5b506104136104dc3660046138a9565b611146565b3480156104ed57600080fd5b5060085461049e565b34801561050257600080fd5b506104136105113660046138f7565b611242565b34801561052257600080fd5b50610536610531366004613c0a565b6112a0565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561056157600080fd5b50610413610570366004613a10565b6112d1565b34801561058157600080fd5b5061049e60155481565b34801561059757600080fd5b506104136105a6366004613bd8565b6113d8565b3480156105b757600080fd5b5061049e6105c63660046139e6565b6115ce565b3480156105d757600080fd5b506104136105e6366004613bb4565b611676565b3480156105f757600080fd5b506103bc6106063660046138a9565b611752565b34801561061757600080fd5b50610413610626366004613a10565b611798565b34801561063757600080fd5b506104136106463660046139e6565b61183f565b34801561065757600080fd5b506104136106663660046138f7565b61199e565b34801561067757600080fd5b5061049e61032981565b34801561068d57600080fd5b5061049e60125481565b3480156106a357600080fd5b506104136106b23660046138a9565b6119fc565b3480156106c357600080fd5b5061049e61070881565b3480156106d957600080fd5b5061049e6106e8366004613bd8565b611bdd565b3480156106f957600080fd5b50610413610708366004613b6b565b611c81565b34801561071957600080fd5b5061049e60145481565b34801561072f57600080fd5b5061049e60135481565b610413610747366004613bd8565b611cdc565b34801561075857600080fd5b50600a5474010000000000000000000000000000000000000000900460ff166103bc565b34801561078857600080fd5b50610435610797366004613bd8565b611f3e565b3480156107a857600080fd5b50600e546103bc9060ff1681565b6104136107c4366004613bd8565b611fc9565b3480156107d557600080fd5b5061049e6107e43660046138a9565b6122a4565b3480156107f557600080fd5b5061041361233e565b34801561080a57600080fd5b5061049e610bb881565b34801561082057600080fd5b5061041361082f366004613a10565b612392565b34801561084057600080fd5b50600a546001600160a01b0316610435565b34801561085e57600080fd5b5061041361086d366004613a45565b61243b565b34801561087e57600080fd5b506103e66125b3565b34801561089357600080fd5b5061049e6125c2565b3480156108a857600080fd5b5061049e6125ea565b3480156108bd57600080fd5b506104136108cc3660046139af565b612603565b3480156108dd57600080fd5b5061049e612a3081565b3480156108f357600080fd5b506103bc6109023660046138a9565b601a6020526000908152604090205460ff1681565b34801561092357600080fd5b5061049e60175481565b34801561093957600080fd5b50610413610948366004613933565b6126c8565b34801561095957600080fd5b506103e6610968366004613bd8565b61272d565b34801561097957600080fd5b50610413612819565b34801561098e57600080fd5b5061049e6702c68af0bb14000081565b3480156109aa57600080fd5b506109e16109b93660046138a9565b60196020526000908152604090205460ff808216916101008104821691620100009091041683565b6040805160ff909416845291151560208401521515908201526060016103c8565b348015610a0e57600080fd5b506103e66128a8565b348015610a2357600080fd5b506103bc610a323660046138c4565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a6c57600080fd5b5061049e6128df565b348015610a8157600080fd5b50610a8b61271081565b60405161ffff90911681526020016103c8565b348015610aaa57600080fd5b50610413610ab93660046138a9565b61290b565b348015610aca57600080fd5b5061049e61271081565b348015610ae057600080fd5b5061049e66470de4df82000081565b348015610afb57600080fd5b5061049e60165481565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610b435750610b43826129db565b92915050565b606060008054610b5890613e88565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8490613e88565b8015610bd15780601f10610ba657610100808354040283529160200191610bd1565b820191906000526020600020905b815481529060010190602001808311610bb457829003601f168201915b5050505050905090565b600a546001600160a01b03163314610c285760405162461bcd60e51b81526020600482018190526024820152600080516020613f8583398151915260448201526064015b60405180910390fd5b60175442908111610c7b5760405162461bcd60e51b815260206004820152601760248201527f526564656d7074696f6e207374696c6c206163746976650000000000000000006044820152606401610c1f565b61032982610c88600c5490565b610c929190613dfa565b1115610ce05760405162461bcd60e51b815260206004820152600f60248201527f546f6b656e732052656465656d656400000000000000000000000000000000006044820152606401610c1f565b60005b82811015610d1d57610cf9600c80546001019055565b610d0b84610d06600c5490565b612a19565b80610d1581613ec3565b915050610ce3565b5060405182906001600160a01b038516907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a3505050565b6000818152600260205260408120546001600160a01b0316610dd25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c1f565b506000908152600460205260409020546001600160a01b031690565b6000610df982611f3e565b9050806001600160a01b0316836001600160a01b03161415610e835760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c1f565b336001600160a01b0382161480610e9f5750610e9f8133610a32565b610f115760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c1f565b610f1b8383612a33565b505050565b6012544210158015610f33575060175442105b610f7f5760405162461bcd60e51b815260206004820152601160248201527f52656465656d206e6f74206163746976650000000000000000000000000000006044820152606401610c1f565b3360009081526019602052604090205460ff1661032981610f9f600c5490565b610fa99190613dfa565b1115610ff75760405162461bcd60e51b815260206004820152600f60248201527f546f6b656e732052656465656d656400000000000000000000000000000000006044820152606401610c1f565b33600090815260196020526040902054610100900460ff1661105b5760405162461bcd60e51b815260206004820152601160248201527f52657374726963746564206163636573730000000000000000000000000000006044820152606401610c1f565b3360009081526019602052604090205462010000900460ff16156110c15760405162461bcd60e51b815260206004820152600f60248201527f546f6b656e732072656465656d656400000000000000000000000000000000006044820152606401610c1f565b336000908152601960205260408120805462ff00001916620100001790555b81811015611115576110f6600c80546001019055565b61110333610d06600c5490565b8061110d81613ec3565b9150506110e0565b50604051819033907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a350565b600a546001600160a01b0316331461118e5760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6001600160a01b0381166111e45760405162461bcd60e51b815260206004820152601060248201527f4e6f6e205a65726f2041646472657373000000000000000000000000000000006044820152606401610c1f565b6018546040516001600160a01b0380841692169033907fe4835a96c34288994ead192162f76ebe82ffdb50721a3e0e8a0695a2790f3b4890600090a4601880546001600160a01b0319166001600160a01b0392909216919091179055565b600e5460ff16156112955760405162461bcd60e51b815260206004820152601760248201527f4e6f205472616e7366657220647572696e672073616c650000000000000000006044820152606401610c1f565b610f1b838383612aa1565b601b5460009081903090612710906112bc9061ffff1686613e26565b6112c69190613e12565b915091509250929050565b600a546001600160a01b031633146113195760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b600e5460ff161561136c5760405162461bcd60e51b815260206004820152600e60248201527f43616e742077686974656c6973740000000000000000000000000000000000006044820152606401610c1f565b60005b81518110156113d4576001601a600084848151811061139057611390613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806113cc81613ec3565b91505061136f565b5050565b6002600b54141561142b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c1f565b6002600b556018546001600160a01b0316331461148a5760405162461bcd60e51b815260206004820152600b60248201527f4e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610c1f565b47808211156114db5760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742066756e647300000000000000000000000000006044820152606401610c1f565b6018546040516000916001600160a01b03169084908381818185875af1925050503d8060008114611528576040519150601f19603f3d011682016040523d82523d6000602084013e61152d565b606091505b505080915050806115805760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177204661696c656400000000000000000000000000000000006044820152606401610c1f565b6018546040518481526001600160a01b039091169033907f33717283d41d9137bab8be49fdc145ea8d670d8b79619253b50defe346d31bc89060200160405180910390a350506001600b5550565b60006115d9836122a4565b821061164d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c1f565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b031633146116be5760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6103e88161ffff16111561173a5760405162461bcd60e51b815260206004820152602360248201527f526f79616c7479206d757374206265206265747765656e20302520616e64203160448201527f30252e00000000000000000000000000000000000000000000000000000000006064820152608401610c1f565b601b805461ffff191661ffff92909216919091179055565b6001600160a01b038116600090815260196020526040812054610100900460ff1680610b435750506001600160a01b03166000908152601a602052604090205460ff1690565b600a546001600160a01b031633146117e05760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b60005b81518110156113d457601a600083838151811061180257611802613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191690558061183781613ec3565b9150506117e3565b600a546001600160a01b031633146118875760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b60165442908111801561189b575060135481105b6118e75760405162461bcd60e51b815260206004820152600960248201527f4e6f7420446179203200000000000000000000000000000000000000000000006044820152606401610c1f565b610bb8610329836118f7600d5490565b6119019190613dfa565b61190b9190613dfa565b11156119595760405162461bcd60e51b815260206004820152601160248201527f507269766174652073616c65206f7665720000000000000000000000000000006044820152606401610c1f565b60005b82811015610d1d57611972600d80546001019055565b61198c84610329611982600d5490565b610d069190613dfa565b8061199681613ec3565b91505061195c565b600e5460ff16156119f15760405162461bcd60e51b815260206004820152601760248201527f4e6f205472616e7366657220647572696e672073616c650000000000000000006044820152606401610c1f565b610f1b838383612b28565b600a546001600160a01b03163314611a445760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6002600b541415611a975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c1f565b6002600b556040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a082319060240160206040518083038186803b158015611af957600080fd5b505afa158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b319190613bf1565b6018546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0391821660048201526024810183905291925083169063a9059cbb90604401602060405180830381600087803b158015611b9a57600080fd5b505af1158015611bae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd29190613b14565b50506001600b555050565b6000611be860085490565b8210611c5c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c1f565b60088281548110611c6f57611c6f613f34565b90600052602060002001549050919050565b600a546001600160a01b03163314611cc95760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b80516113d490600f906020840190613723565b600e5460ff168015611cf057506012544210155b611d3c5760405162461bcd60e51b815260206004820152600f60248201527f53616c65206e6f742061637469766500000000000000000000000000000000006044820152606401610c1f565b601354429081118015611d50575060145481105b611d9c5760405162461bcd60e51b815260206004820152601060248201527f5075626c69632073616c65206f766572000000000000000000000000000000006044820152606401610c1f565b6000611da6612b43565b9050611db28382613e26565b341015611e015760405162461bcd60e51b815260206004820152601060248201527f496e73756666696563696e7420457468000000000000000000000000000000006044820152606401610c1f565b60058311158015611e125750600083115b611e5e5760405162461bcd60e51b815260206004820152600f60248201527f57726f6e67204e756d20546f6b656e00000000000000000000000000000000006044820152606401610c1f565b61271061032984611e6e600d5490565b611e789190613dfa565b611e829190613dfa565b1115611ed05760405162461bcd60e51b815260206004820152601060248201527f5075626c69632073616c6520736f6c64000000000000000000000000000000006044820152606401610c1f565b60005b83811015611f0b57611ee9600d80546001019055565b611ef933610329611982600d5490565b80611f0381613ec3565b915050611ed3565b50604051839033907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a3505050565b6000818152600260205260408120546001600160a01b031680610b435760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c1f565b600e5460ff168015611fdd57506012544210155b6120295760405162461bcd60e51b815260206004820152600f60248201527f53616c65206e6f742061637469766500000000000000000000000000000000006044820152606401610c1f565b60155442908111801561203d575060165481105b6120895760405162461bcd60e51b815260206004820152601160248201527f507269766174652073616c65206f7665720000000000000000000000000000006044820152606401610c1f565b33600090815260196020526040902054610100900460ff16806120bb5750336000908152601a602052604090205460ff165b6121075760405162461bcd60e51b815260206004820152601160248201527f52657374726963746564206163636573730000000000000000000000000000006044820152606401610c1f565b610bb861032983612117600d5490565b6121219190613dfa565b61212b9190613dfa565b11156121795760405162461bcd60e51b815260206004820152601160248201527f507269766174652073616c6520736f6c640000000000000000000000000000006044820152606401610c1f565b61218b8267011c37937e080000613e26565b3410156121da5760405162461bcd60e51b815260206004820152601060248201527f496e73756666696563696e7420457468000000000000000000000000000000006044820152606401610c1f565b600582111580156121eb5750600082115b6122375760405162461bcd60e51b815260206004820152600f60248201527f57726f6e67204e756d20546f6b656e00000000000000000000000000000000006044820152606401610c1f565b60005b8281101561227257612250600d80546001019055565b61226033610329611982600d5490565b8061226a81613ec3565b91505061223a565b50604051829033907fb9144c96c86541f6fa89c9f2f02495cccf4b08cd6643e26d34ee00aa586558a890600090a35050565b60006001600160a01b0382166123225760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c1f565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146123865760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6123906000612bb8565b565b600a546001600160a01b031633146123da5760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b60005b81518110156113d457601960008383815181106123fc576123fc613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805462ffffff191690558061243381613ec3565b9150506123dd565b600a546001600160a01b031633146124835760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b600e5460ff16156124d65760405162461bcd60e51b815260206004820152600e60248201527f43616e742077686974656c6973740000000000000000000000000000000000006044820152606401610c1f565b60005b8251811015610f1b576001601960008584815181106124fa576124fa613f34565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160016101000a81548160ff02191690831515021790555081818151811061254e5761254e613f34565b60200260200101516019600085848151811061256c5761256c613f34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191660ff92909216919091179055806125ab81613ec3565b9150506124d9565b606060018054610b5890613e88565b60006125cd600d5490565b6125db610329610bb8613e45565b6125e59190613e45565b905090565b60006125f5600d5490565b6125db610329612710613e45565b6001600160a01b03821633141561265c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c1f565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600e5460ff161561271b5760405162461bcd60e51b815260206004820152601760248201527f4e6f205472616e7366657220647572696e672073616c650000000000000000006044820152606401610c1f565b61272784848484612c0a565b50505050565b6000818152600260205260409020546060906001600160a01b03166127ba5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610c1f565b60006127c4612c92565b905060008151116127e45760405180602001604052806000815250612812565b806127ee84612ca1565b601060405160200161280293929190613cf2565b6040516020818303038152906040525b9392505050565b600a546001600160a01b031633146128615760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b600e805460ff19811660ff91821615908117909255604051911615159033907fe3f6649f5bc36b8b8c13782cfdb234a2f34ea0a28e750e23ea10b14d550f643590600090a3565b606060006128b4612c92565b90508060116040516020016128ca929190613d2f565b60405160208183030381529060405291505090565b60135460009042908110156128fd5767011c37937e08000091505090565b612905612b43565b91505090565b600a546001600160a01b031633146129535760405162461bcd60e51b81526020600482018190526024820152600080516020613f858339815191526044820152606401610c1f565b6001600160a01b0381166129cf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c1f565b6129d881612bb8565b50565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610b435750610b4382612dd3565b6113d4828260405180602001604052806000815250612e6e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612a6882611f3e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612aab3382612eec565b612b1d5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c1f565b610f1b838383612fdf565b610f1b838383604051806020016040528060008152506126c8565b601354600090429067011c37937e08000090612b6190612a30613dfa565b821115612b6e5792915050565b600061070860135484612b819190613e45565b612b8b9190613e12565b9050612b9e8166470de4df820000613e26565b612bb0906702c68af0bb140000613e45565b949350505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612c143383612eec565b612c865760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c1f565b612727848484846131b7565b6060600f8054610b5890613e88565b606081612ce157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612d0b5780612cf581613ec3565b9150612d049050600a83613e12565b9150612ce5565b60008167ffffffffffffffff811115612d2657612d26613f4a565b6040519080825280601f01601f191660200182016040528015612d50576020820181803683370190505b5090505b8415612bb057612d65600183613e45565b9150612d72600a86613ede565b612d7d906030613dfa565b60f81b818381518110612d9257612d92613f34565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612dcc600a86613e12565b9450612d54565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612e3657506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b4357507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610b43565b612e788383613235565b612e856000848484613383565b610f1b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c1f565b6000818152600260205260408120546001600160a01b0316612f655760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c1f565b6000612f7083611f3e565b9050806001600160a01b0316846001600160a01b03161480612fab5750836001600160a01b0316612fa084610d59565b6001600160a01b0316145b80612bb057506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16612bb0565b826001600160a01b0316612ff282611f3e565b6001600160a01b03161461306e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c1f565b6001600160a01b0382166130e95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c1f565b6130f48383836134db565b6130ff600082612a33565b6001600160a01b0383166000908152600360205260408120805460019290613128908490613e45565b90915550506001600160a01b0382166000908152600360205260408120805460019290613156908490613dfa565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6131c2848484612fdf565b6131ce84848484613383565b6127275760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c1f565b6001600160a01b03821661328b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c1f565b6000818152600260205260409020546001600160a01b0316156132f05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c1f565b6132fc600083836134db565b6001600160a01b0382166000908152600360205260408120805460019290613325908490613dfa565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b156134d057604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906133c7903390899088908890600401613d56565b602060405180830381600087803b1580156133e157600080fd5b505af1925050508015613411575060408051601f3d908101601f1916820190925261340e91810190613b4e565b60015b6134b6573d80801561343f576040519150601f19603f3d011682016040523d82523d6000602084013e613444565b606091505b5080516134ae5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610c1f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612bb0565b506001949350505050565b6001600160a01b0383166135365761353181600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613559565b816001600160a01b0316836001600160a01b031614613559576135598382613593565b6001600160a01b03821661357057610f1b81613630565b826001600160a01b0316826001600160a01b031614610f1b57610f1b82826136df565b600060016135a0846122a4565b6135aa9190613e45565b6000838152600760205260409020549091508082146135fd576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061364290600190613e45565b6000838152600960205260408120546008805493945090928490811061366a5761366a613f34565b90600052602060002001549050806008838154811061368b5761368b613f34565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806136c3576136c3613f1e565b6001900381819060005260206000200160009055905550505050565b60006136ea836122a4565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461372f90613e88565b90600052602060002090601f0160209004810192826137515760008555613797565b82601f1061376a57805160ff1916838001178555613797565b82800160010185558215613797579182015b8281111561379757825182559160200191906001019061377c565b506137a39291506137a7565b5090565b5b808211156137a357600081556001016137a8565b600067ffffffffffffffff8311156137d6576137d6613f4a565b6137e9601f8401601f1916602001613da5565b90508281528383830111156137fd57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461382b57600080fd5b919050565b600082601f83011261384157600080fd5b8135602061385661385183613dd6565b613da5565b80838252828201915082860187848660051b890101111561387657600080fd5b60005b8581101561389c5761388a82613814565b84529284019290840190600101613879565b5090979650505050505050565b6000602082840312156138bb57600080fd5b61281282613814565b600080604083850312156138d757600080fd5b6138e083613814565b91506138ee60208401613814565b90509250929050565b60008060006060848603121561390c57600080fd5b61391584613814565b925061392360208501613814565b9150604084013590509250925092565b6000806000806080858703121561394957600080fd5b61395285613814565b935061396060208601613814565b925060408501359150606085013567ffffffffffffffff81111561398357600080fd5b8501601f8101871361399457600080fd5b6139a3878235602084016137bc565b91505092959194509250565b600080604083850312156139c257600080fd5b6139cb83613814565b915060208301356139db81613f60565b809150509250929050565b600080604083850312156139f957600080fd5b613a0283613814565b946020939093013593505050565b600060208284031215613a2257600080fd5b813567ffffffffffffffff811115613a3957600080fd5b612bb084828501613830565b60008060408385031215613a5857600080fd5b823567ffffffffffffffff80821115613a7057600080fd5b613a7c86838701613830565b9350602091508185013581811115613a9357600080fd5b85019050601f81018613613aa657600080fd5b8035613ab461385182613dd6565b80828252848201915084840189868560051b8701011115613ad457600080fd5b60009450845b84811015613b0457813560ff81168114613af2578687fd5b84529286019290860190600101613ada565b5096999098509650505050505050565b600060208284031215613b2657600080fd5b815161281281613f60565b600060208284031215613b4357600080fd5b813561281281613f6e565b600060208284031215613b6057600080fd5b815161281281613f6e565b600060208284031215613b7d57600080fd5b813567ffffffffffffffff811115613b9457600080fd5b8201601f81018413613ba557600080fd5b612bb0848235602084016137bc565b600060208284031215613bc657600080fd5b813561ffff8116811461281257600080fd5b600060208284031215613bea57600080fd5b5035919050565b600060208284031215613c0357600080fd5b5051919050565b60008060408385031215613c1d57600080fd5b50508035926020909101359150565b60008151808452613c44816020860160208601613e5c565b601f01601f19169290920160200192915050565b8054600090600181811c9080831680613c7257607f831692505b6020808410821415613c9457634e487b7160e01b600052602260045260246000fd5b818015613ca85760018114613cb957613ce6565b60ff19861689528489019650613ce6565b60008881526020902060005b86811015613cde5781548b820152908501908301613cc5565b505084890196505b50505050505092915050565b60008451613d04818460208901613e5c565b845190830190613d18818360208901613e5c565b613d2481830186613c58565b979650505050505050565b60008351613d41818460208801613e5c565b613d4d81840185613c58565b95945050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d886080830184613c2c565b9695505050505050565b6020815260006128126020830184613c2c565b604051601f8201601f1916810167ffffffffffffffff81118282101715613dce57613dce613f4a565b604052919050565b600067ffffffffffffffff821115613df057613df0613f4a565b5060051b60200190565b60008219821115613e0d57613e0d613ef2565b500190565b600082613e2157613e21613f08565b500490565b6000816000190483118215151615613e4057613e40613ef2565b500290565b600082821015613e5757613e57613ef2565b500390565b60005b83811015613e77578181015183820152602001613e5f565b838111156127275750506000910152565b600181811c90821680613e9c57607f821691505b60208210811415613ebd57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613ed757613ed7613ef2565b5060010190565b600082613eed57613eed613f08565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146129d857600080fd5b6001600160e01b0319811681146129d857600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e6bae8cc377422f277442ce94b42d0005cb185cb3f33b693ed208d2bed5cda8764736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000006153ba90000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000005268747470733a2f2f6e667467656e2e6d7970696e6174612e636c6f75642f697066732f516d6168683273664a336370473744556552347961313577754c4d6836376f7376663357624e51727831565633712f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052e6a736f6e000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _saleStartTime (uint256): 1632877200
Arg [1] : _baseContractURI (string): https://nftgen.mypinata.cloud/ipfs/Qmahh2sfJ3cpG7DUeR4ya15wuLMh67osvf3WbNQrx1VV3q/
Arg [2] : _tokenSuffixURI (string): .json
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000006153ba90
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000052
Arg [4] : 68747470733a2f2f6e667467656e2e6d7970696e6174612e636c6f75642f6970
Arg [5] : 66732f516d6168683273664a336370473744556552347961313577754c4d6836
Arg [6] : 376f7376663357624e51727831565633712f0000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 2e6a736f6e000000000000000000000000000000000000000000000000000000
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.