ERC-721
Overview
Max Total Supply
1,001 HENPAI
Holders
139
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 HENPAILoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Henpai
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "./SaleTrait.sol"; /////////////////////////////////////////////////////////////////////// // // // .6 9. 6969 .69696 .969696 .969696 .9 // // .69 66. 69696 .69696969 .69696969 .69696969 .69 // // 6%9 6%9 6%9' 6%9 `6%9 6%9 `6%9 6%9 6969 6%9 // // 6%9 6%9 6%9 6%9 6%9 6%9 6%9 6%9 6%9 6%9 // // 6%9 6969%9 6&9 6%9 6&9 6%9 6*6 6%9 6969%9 6&9 // // 6&9 696&9 6&9_69 6&9 6&9 6&9 .6*9 6&9 666%9 6&9 // // 6&9 6&9 6&9~69 6&9 6&9 6&9_69696 6&9 6&9 6&9 // // 6&9 6&9 6&9 6&9 6&9 6&9~69690 6&9 6&9 6&9 // // 6*9 6*9 6*9 6*9 6*9 6*9 6*9 6&9 6*9 // // 6*9 6*9 6*9. 6*9 6*9 6*9 6*9 6*9 6*9 // // 6*9 6*9 69696 6*9 6*9 6*9 6*9 6*9 6*9 // // 696 6*9 6969 6*9 696 6*9 696 6*9 6*9 // // 69 69 69 69 69 // // 9 9 9 9 9 // // // /////////////////////////////////////////////////////////////////////// contract Henpai is Ownable, ERC721, ERC721Enumerable, VRFConsumerBase, SaleTrait, ReentrancyGuard { using Address for address; using SafeMath for uint256; event PermanentURI(string _value, uint256 indexed _id); event RandomseedRequested(uint256 timestamp); event RandomseedFulfilmentSuccess( uint256 timestamp, bytes32 requestId, uint256 seed ); event RandomseedFulfilmentFail(uint256 timestamp, bytes32 requestId); event RandomseedFulfilmentManually(uint256 timestamp); address private beneficiaryAddress; bool public randomseedRequested = false; bool public beneficiaryAssigned = false; bytes32 public keyHash; uint256 private constant MAX_PRESALE_TX = 10; uint256 private constant MAX_PUBLIC_PER_TX = 20; uint256 private constant MAX_PRESALE_PER_WALLET = 10; uint256 public discountBlockSize = 180; uint256 public revealBlock = 0; uint256 public seed = 0; mapping(address => bool) private _airdropAllowed; mapping(address => bool) private _presaleAllowed; mapping(address => uint256) private _presaleClaimed; string public _defaultURI; string public _tokenBaseURI; constructor( address _coordinator, address _linkToken, bytes32 _keyHash, uint256 _presalePrice, uint256 _publicSalePrice, string memory name, string memory symbol, uint256 _maxSupply ) ERC721(name, symbol) VRFConsumerBase(_coordinator, _linkToken) { keyHash = _keyHash; maxSupply = _maxSupply; publicSalePrice = _publicSalePrice; presalePrice = _presalePrice; } modifier airdropRoleOnly() { require(_airdropAllowed[msg.sender], "Only airdrop role allowed."); _; } modifier beneficiaryOnly() { require( beneficiaryAssigned && msg.sender == beneficiaryAddress, "Only beneficiary allowed." ); _; } /*************************************************************/ /* External Functions /*************************************************************/ function airdrop(address[] memory addresses, uint256 amount) external airdropRoleOnly { require( totalSupply().add(addresses.length.mul(amount)) <= maxSupply, "Exceed max supply limit." ); require( totalReserveMinted.add(addresses.length.mul(amount)) <= maxReserve, "Insufficient reserve." ); for (uint256 i = 0; i < addresses.length; i++) { _mintToken(addresses[i], amount); } totalReserveMinted = totalReserveMinted.add( addresses.length.mul(amount) ); } function addAirdropRole(address addr) external onlyOwner { _airdropAllowed[addr] = true; } function updateDiscountBlockSize(uint256 blockNumber) external onlyOwner { discountBlockSize = blockNumber; } function setBeneficiary(address addr) external onlyOwner { require(addr != address(0), "Beneficiary must not be empty."); beneficiaryAddress = addr; beneficiaryAssigned = true; } function setRevealBlock(uint256 blockNumber) external onlyOwner { revealBlock = blockNumber; } function freeze(uint256[] memory ids) external onlyOwner { for (uint256 i = 0; i < ids.length; i += 1) { emit PermanentURI(tokenURI(ids[i]), ids[i]); } } function withdraw() external beneficiaryOnly { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } /*************************************************************/ /* Public Functions group /*************************************************************/ function mintToken(uint256 amount) external payable nonReentrant returns (bool) { require(!msg.sender.isContract(), "Contract is not allowed."); require( getSaleMode() == 1 || getSaleMode() == 3, "Sale not available." ); if (getSaleMode() == 3) { require( amount <= MAX_PUBLIC_PER_TX, "Mint exceed transaction limits." ); require(msg.value >= amount.mul(price()), "Insufficient funds."); require( totalSupply().add(amount).add(availableReserve()) <= maxSupply, "Purchase exceed max supply." ); } if (getSaleMode() == 1) { require(isWhitelisted(msg.sender), "Not whitelisted."); require(amount <= MAX_PRESALE_TX, "Mint exceed transaction limits"); require( _presaleClaimed[msg.sender] + amount <= MAX_PRESALE_PER_WALLET, "Mint limit per wallet exceeded." ); require( totalPresaleMinted.add(amount) <= presaleCapped, "Purchase exceed presale capped." ); require(msg.value >= amount.mul(price()), "Insufficient funds."); } if (getSaleMode() == 1 || getSaleMode() == 3) { _mintToken(msg.sender, amount); if (getSaleMode() == 3) { totalPublicMinted = totalPublicMinted + amount; } if (getSaleMode() == 1) { _presaleClaimed[msg.sender] = _presaleClaimed[msg.sender] + amount; totalPresaleMinted = totalPresaleMinted + amount; } } return true; } function setSeed(uint256 randomNumber) external onlyOwner { randomseedRequested = true; seed = randomNumber; emit RandomseedFulfilmentManually(block.timestamp); } function addAllowlist(address[] memory allowlist) external onlyOwner { for (uint256 i = 0; i < allowlist.length; i += 1) { _presaleAllowed[allowlist[i]] = true; } } function setBaseURI(string memory baseURI) external onlyOwner { _tokenBaseURI = baseURI; } function setDefaultURI(string memory defaultURI) external onlyOwner { _defaultURI = defaultURI; } function requestChainlinkVRF() external onlyOwner { require(!randomseedRequested, "Chainlink VRF already requested"); require( LINK.balanceOf(address(this)) >= 2000000000000000000, "Insufficient LINK" ); requestRandomness(keyHash, 2000000000000000000); randomseedRequested = true; emit RandomseedRequested(block.timestamp); } function getSaleMode() public view returns (uint256) { uint256 supplyWithoutReserve = maxSupply - maxReserve; uint256 mintedWithoutReserve = totalPublicMinted + totalPresaleMinted; if (mintedWithoutReserve == supplyWithoutReserve) return 5; if ( closeSale || (publicSale.endBlock > 0 && block.number > publicSale.endBlock) ) { return 4; } if ( publicSale.beginBlock > 0 && block.number >= publicSale.beginBlock ) { return 3; } if ( totalPresaleMinted == presaleCapped || (presale.endBlock > 0 && block.number > presale.endBlock) ) { return 2; } if (presale.beginBlock > 0 && block.number >= presale.beginBlock) { return 1; } return 0; } function startSaleBlock() external view returns (uint256) { return getSaleMode() <= 1 ? presale.beginBlock : publicSale.beginBlock; } function endSaleBlock() external view returns (uint256) { return getSaleMode() <= 2 ? presale.endBlock : publicSale.endBlock; } function isWhitelisted(address addr) public view returns (bool) { return _presaleAllowed[addr]; } function tokenBaseURI() external view returns (string memory) { return _tokenBaseURI; } function isRevealed() public view returns (bool) { return seed > 0 && revealBlock > 0 && block.number > revealBlock; } function getMetadata(uint256 tokenId) public view returns (string memory) { if (_msgSender() != owner()) { require(tokenId < totalSupply(), "Token not exists."); } if (!isRevealed()) return "default"; uint256[] memory metadata = new uint256[](maxSupply); for (uint256 i = 0; i < maxSupply; i += 1) { metadata[i] = i; } for (uint256 i = 0; i < maxSupply; i += 1) { uint256 j = (uint256(keccak256(abi.encode(seed, i))) % (maxSupply)); (metadata[i], metadata[j]) = (metadata[j], metadata[i]); } return Strings.toString(metadata[tokenId]); } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { require(tokenId < totalSupply(), "Token not exist."); return isRevealed() ? string( abi.encodePacked( _tokenBaseURI, getMetadata(tokenId), ".json" ) ) : _defaultURI; } function availableReserve() public view returns (uint256) { return maxReserve - totalReserveMinted; } function mintedByMode() external view returns (uint256) { if (getSaleMode() == 1) return totalPresaleMinted; if (getSaleMode() == 3) return totalPublicMinted; return 0; } function cappedByMode() external view returns (uint256) { if (getSaleMode() == 1) return presaleCapped; if (getSaleMode() == 3) return maxSupply - totalPresaleMinted - maxReserve; return 0; } function availableForSale() external view returns (uint256) { return maxSupply - totalSupply(); } function maxTokenPerTx() external view returns (uint256) { return getSaleMode() < 3 ? MAX_PRESALE_TX : MAX_PUBLIC_PER_TX; } function price() public view returns (uint256) { if (getSaleMode() == 1) return presalePrice; if (getSaleMode() == 3) { uint256 passedBlock = block.number - publicSale.beginBlock; uint256 discountPrice = passedBlock.div( discountBlockSize ).mul(1337500000000000); if (discountPrice >= publicSalePrice) { return 0; } else { return publicSalePrice.sub(discountPrice); } } return publicSalePrice; } function isBeneficiary(address addr) external view returns (bool) { return beneficiaryAssigned && addr == beneficiaryAddress; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function startPublicSaleBlock() external view returns (uint256) { return publicSale.beginBlock; } function endPublicSaleBlock() external view returns (uint256) { return publicSale.endBlock; } function startPresaleBlock() external view returns (uint256) { return presale.beginBlock; } function endPresaleBlock() external view returns (uint256) { return presale.endBlock; } /*************************************************************/ /* Internal Functions */ /*************************************************************/ function _mintToken(address addr, uint256 amount) internal returns (bool) { for (uint256 i = 0; i < amount; i++) { uint256 tokenIndex = totalSupply(); if (tokenIndex < maxSupply) _safeMint(addr, tokenIndex); } return true; } function fulfillRandomness(bytes32 requestId, uint256 randomNumber) internal override { if (randomNumber > 0) { seed = randomNumber; emit RandomseedFulfilmentSuccess(block.timestamp, requestId, seed); } else { seed = 1; emit RandomseedFulfilmentFail(block.timestamp, requestId); } } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } }
// 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 "./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 "../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; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// 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 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; /** * @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; import "./interfaces/LinkTokenInterface.sol"; import "./VRFRequestIDBase.sol"; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constuctor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator, _link) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash), and have told you the minimum LINK * @dev price for VRF service. Make sure your contract has sufficient LINK, and * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you * @dev want to generate randomness from. * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomness method. * * @dev The randomness argument to fulfillRandomness is the actual random value * @dev generated from your seed. * * @dev The requestId argument is generated from the keyHash and the seed by * @dev makeRequestId(keyHash, seed). If your contract could have concurrent * @dev requests open, you can use the requestId to track which seed is * @dev associated with which randomness. See VRFRequestIDBase.sol for more * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously.) * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. (Which is critical to making unpredictable randomness! See the * @dev next section.) * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the ultimate input to the VRF is mixed with the block hash of the * @dev block in which the request is made, user-provided seeds have no impact * @dev on its economic security properties. They are only included for API * @dev compatability with previous versions of this contract. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. */ abstract contract VRFConsumerBase is VRFRequestIDBase { /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBase expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomness the VRF output */ function fulfillRandomness( bytes32 requestId, uint256 randomness ) internal virtual; /** * @dev In order to keep backwards compatibility we have kept the user * seed field around. We remove the use of it because given that the blockhash * enters later, it overrides whatever randomness the used seed provides. * Given that it adds no security, and can easily lead to misunderstandings, * we have removed it from usage and can now provide a simpler API. */ uint256 constant private USER_SEED_PLACEHOLDER = 0; /** * @notice requestRandomness initiates a request for VRF output given _seed * * @dev The fulfillRandomness method receives the output, once it's provided * @dev by the Oracle, and verified by the vrfCoordinator. * * @dev The _keyHash must already be registered with the VRFCoordinator, and * @dev the _fee must exceed the fee specified during registration of the * @dev _keyHash. * * @dev The _seed parameter is vestigial, and is kept only for API * @dev compatibility with older versions. It can't *hurt* to mix in some of * @dev your own randomness, here, but it's not necessary because the VRF * @dev oracle will mix the hash of the block containing your request into the * @dev VRF seed it ultimately uses. * * @param _keyHash ID of public key against which randomness is generated * @param _fee The amount of LINK to send with the request * * @return requestId unique ID for this request * * @dev The returned requestId can be used to distinguish responses to * @dev concurrent requests. It is passed as the first argument to * @dev fulfillRandomness. */ function requestRandomness( bytes32 _keyHash, uint256 _fee ) internal returns ( bytes32 requestId ) { LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER)); // This is the seed passed to VRFCoordinator. The oracle will mix this with // the hash of the block containing this request to obtain the seed/input // which is finally passed to the VRF cryptographic machinery. uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]); // nonces[_keyHash] must stay in sync with // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest). // This provides protection against the user repeating their input seed, // which would result in a predictable/duplicate output, if multiple such // requests appeared in the same block. nonces[_keyHash] = nonces[_keyHash] + 1; return makeRequestId(_keyHash, vRFSeed); } LinkTokenInterface immutable internal LINK; address immutable private vrfCoordinator; // Nonces for each VRF key from which randomness has been requested. // // Must stay in sync with VRFCoordinator[_keyHash][this] mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces; /** * @param _vrfCoordinator address of VRFCoordinator contract * @param _link address of LINK token contract * * @dev https://docs.chain.link/docs/link-token-contracts */ constructor( address _vrfCoordinator, address _link ) { vrfCoordinator = _vrfCoordinator; LINK = LinkTokenInterface(_link); } // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomness( bytes32 requestId, uint256 randomness ) external { require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill"); fulfillRandomness(requestId, randomness); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract SaleTrait is Ownable { using SafeMath for uint256; bool public closeSale = false; uint256 public totalPresaleMinted = 0; uint256 public totalPublicMinted = 0; uint256 public totalReserveMinted = 0; uint256 public maxSupply = 6969; uint256 public maxReserve = 169; uint256 public presaleCapped = 690; uint256 public presalePrice; uint256 public publicSalePrice; struct SaleConfig { uint256 beginBlock; uint256 endBlock; } SaleConfig public presale; SaleConfig public publicSale; function updatePresaleConfig(SaleConfig memory _presale) external onlyOwner { presale = _presale; } function updatePublicSaleConfig(SaleConfig memory _publicSale) external onlyOwner { publicSale = _publicSale; } function updatePublicSalePrice(uint256 _price) external onlyOwner { publicSalePrice = _price; } function updatePresalePrice(uint256 _price) external onlyOwner { presalePrice = _price; } function setCloseSale() external onlyOwner { closeSale = true; } function unsetCloseSale() external onlyOwner { closeSale = false; } function updateReserve(uint256 reserve) external onlyOwner { maxReserve = reserve; } function updatePresaleCap(uint256 newPresaleCap) external onlyOwner { presaleCapped = newPresaleCap; } function presaleSoldOut() external view returns (bool) { return totalPresaleMinted == presaleCapped; } function publicSaleSoldOut() external view returns (bool) { uint256 supplyWithoutReserve = maxSupply - maxReserve; uint256 mintedWithoutReserve = totalPublicMinted + totalPresaleMinted; return supplyWithoutReserve == mintedWithoutReserve; } }
// 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; 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 "../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; 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); }
// 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; interface LinkTokenInterface { function allowance( address owner, address spender ) external view returns ( uint256 remaining ); function approve( address spender, uint256 value ) external returns ( bool success ); function balanceOf( address owner ) external view returns ( uint256 balance ); function decimals() external view returns ( uint8 decimalPlaces ); function decreaseApproval( address spender, uint256 addedValue ) external returns ( bool success ); function increaseApproval( address spender, uint256 subtractedValue ) external; function name() external view returns ( string memory tokenName ); function symbol() external view returns ( string memory tokenSymbol ); function totalSupply() external view returns ( uint256 totalTokensIssued ); function transfer( address to, uint256 value ) external returns ( bool success ); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns ( bool success ); function transferFrom( address from, address to, uint256 value ) external returns ( bool success ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract VRFRequestIDBase { /** * @notice returns the seed which is actually input to the VRF coordinator * * @dev To prevent repetition of VRF output due to repetition of the * @dev user-supplied seed, that seed is combined in a hash with the * @dev user-specific nonce, and the address of the consuming contract. The * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in * @dev the final seed, but the nonce does protect against repetition in * @dev requests which are included in a single block. * * @param _userSeed VRF seed input provided by user * @param _requester Address of the requesting contract * @param _nonce User-specific nonce at the time of the request */ function makeVRFInputSeed( bytes32 _keyHash, uint256 _userSeed, address _requester, uint256 _nonce ) internal pure returns ( uint256 ) { return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce))); } /** * @notice Returns the id for this request * @param _keyHash The serviceAgreement ID to be used for this request * @param _vRFInputSeed The seed to be passed directly to the VRF * @return The id for this request * * @dev Note that _vRFInputSeed is not the seed passed by the consuming * @dev contract, but the one generated by makeVRFInputSeed */ function makeRequestId( bytes32 _keyHash, uint256 _vRFInputSeed ) internal pure returns ( bytes32 ) { return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_coordinator","type":"address"},{"internalType":"address","name":"_linkToken","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"},{"internalType":"uint256","name":"_presalePrice","type":"uint256"},{"internalType":"uint256","name":"_publicSalePrice","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"RandomseedFulfilmentFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RandomseedFulfilmentManually","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"}],"name":"RandomseedFulfilmentSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RandomseedRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_defaultURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAirdropRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"allowlist","type":"address[]"}],"name":"addAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableForSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiaryAssigned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cappedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closeSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discountBlockSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endPresaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endPublicSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"freeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMetadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleMode","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":"addr","type":"address"}],"name":"isBeneficiary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokenPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomseedRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestChainlinkVRF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seed","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":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setCloseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"defaultURI","type":"string"}],"name":"setDefaultURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"setRevealBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"setSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPresaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startPublicSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"tokenBaseURI","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":"totalPresaleMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPublicMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReserveMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unsetCloseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"updateDiscountBlockSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPresaleCap","type":"uint256"}],"name":"updatePresaleCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct SaleTrait.SaleConfig","name":"_presale","type":"tuple"}],"name":"updatePresaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"updatePresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct SaleTrait.SaleConfig","name":"_publicSale","type":"tuple"}],"name":"updatePublicSaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"updatePublicSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reserve","type":"uint256"}],"name":"updateReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052600c805460ff191690556000600d819055600e819055600f819055611b3960105560a96011556102b2601255601a805461ffff60a01b1916905560b4601c55601d819055601e553480156200005857600080fd5b5060405162004403380380620044038339810160408190526200007b91620002bc565b878784846200008a33620000f6565b81516200009f90600190602085019062000146565b508051620000b590600290602084019062000146565b5050506001600160601b0319606092831b811660a052911b166080526001601955601b95909555505060109290925560149190915560135550620003c49050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620001549062000371565b90600052602060002090601f016020900481019282620001785760008555620001c3565b82601f106200019357805160ff1916838001178555620001c3565b82800160010185558215620001c3579182015b82811115620001c3578251825591602001919060010190620001a6565b50620001d1929150620001d5565b5090565b5b80821115620001d15760008155600101620001d6565b80516001600160a01b03811681146200020457600080fd5b919050565b600082601f8301126200021a578081fd5b81516001600160401b0380821115620002375762000237620003ae565b604051601f8301601f19908116603f01168101908282118183101715620002625762000262620003ae565b816040528381526020925086838588010111156200027e578485fd5b8491505b83821015620002a1578582018301518183018401529082019062000282565b83821115620002b257848385830101525b9695505050505050565b600080600080600080600080610100898b031215620002d9578384fd5b620002e489620001ec565b9750620002f460208a01620001ec565b60408a015160608b015160808c015160a08d0151939a50919850965094506001600160401b038082111562000327578485fd5b620003358c838d0162000209565b945060c08b01519150808211156200034b578384fd5b506200035a8b828c0162000209565b92505060e089015190509295985092959890939650565b600181811c908216806200038657607f821691505b60208210811415620003a857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c614005620003fe600039600081816118100152612fda0152600081816126630152612fab01526140056000f3fe6080604052600436106104725760003560e01c806366bb81c71161024a578063bbc33aa511610139578063da3244b0116100b6578063ee55efee1161007a578063ee55efee14610cdd578063f05e2a7c14610cf7578063f2fde38b14610d0c578063f3b3a9fa14610d2c578063fdea8e0b14610d4257600080fd5b8063da3244b014610c14578063da324a3014610c34578063de6f742514610c54578063e5d1ea4114610c74578063e985e9c514610c9457600080fd5b8063c634d032116100fd578063c634d03214610b96578063c87b56dd14610ba9578063ccc5d84714610bc9578063d5abeb0114610bde578063da1b9e0814610bf457600080fd5b8063bbc33aa514610b0c578063bd0b4b3714610b21578063be008ccb14610b41578063c204642c14610b56578063c32a50f914610b7657600080fd5b80639d19b226116101c7578063a574cea41161018b578063a574cea414610a81578063a734335b14610aa1578063b0471e7c14610ac2578063b73094ac14610ad7578063b88d4fde14610aec57600080fd5b80639d19b226146109ec578063a013895d14610a0c578063a035b1fe14610a2c578063a22cb46514610a41578063a3e271e514610a6157600080fd5b80638da5cb5b1161020e5780638da5cb5b1461096e5780638ea939331461098c57806394985ddd146109a157806395d89b41146109c15780639b6860c8146109d657600080fd5b806366bb81c7146108f857806370a082311461090e578063715018a61461092e57806379940f8a146109435780637d94792a1461095857600080fd5b80633af32abf1161036657806354214f69116102e35780635e9f9613116102a75780635e9f9613146108825780635f0b08441461089757806361728f39146108ac5780636352211e146108c257806363cb3aa5146108e257600080fd5b806354214f691461080957806355f804b31461081e57806356c4aedd1461083e578063579c67aa146108535780635e1626991461086c57600080fd5b806342842e0e1161032a57806342842e0e1461078a57806347326dc2146107aa5780634cc0c160146107bf5780634e99b800146107d45780634f6ccce7146107e957600080fd5b80633af32abf146106e85780633ca4fb76146107205780633ccfd60b14610735578063405571d41461074a578063415377031461076a57600080fd5b80631c31f710116103f45780632f745c59116103b85780632f745c591461064c57806333bc1c5c1461066c57806335a5af451461069c5780633662454d146106b25780633828914a146106d257600080fd5b80631c31f710146105c157806323b872dd146105e15780632617dd4d14610601578063266dab34146106215780632693dc141461063757600080fd5b8063081812fc1161043b578063081812fc14610528578063095ea7b3146105605780630960e71c146105825780630d43ebc21461059757806318160ddd146105ac57600080fd5b80620e7fa81461047757806301d35173146104a057806301ffc9a7146104b557806302410f47146104e557806306fdde0314610506575b600080fd5b34801561048357600080fd5b5061048d60135481565b6040519081526020015b60405180910390f35b3480156104ac57600080fd5b5061048d610d5d565b3480156104c157600080fd5b506104d56104d0366004613acf565b610d7c565b6040519015158152602001610497565b3480156104f157600080fd5b50601a546104d590600160a01b900460ff1681565b34801561051257600080fd5b5061051b610d8d565b6040516104979190613d31565b34801561053457600080fd5b50610548610543366004613b9b565b610e1f565b6040516001600160a01b039091168152602001610497565b34801561056c57600080fd5b5061058061057b366004613960565b610eb9565b005b34801561058e57600080fd5b5060185461048d565b3480156105a357600080fd5b5061048d610fcf565b3480156105b857600080fd5b5060095461048d565b3480156105cd57600080fd5b506105806105dc36600461382a565b6110ad565b3480156105ed57600080fd5b506105806105fc366004613876565b611155565b34801561060d57600080fd5b5061058061061c366004613989565b611186565b34801561062d57600080fd5b5061048d600f5481565b34801561064357600080fd5b506104d561122a565b34801561065857600080fd5b5061048d610667366004613960565b61125b565b34801561067857600080fd5b50601754601854610687919082565b60408051928352602083019190915201610497565b3480156106a857600080fd5b5061048d600d5481565b3480156106be57600080fd5b506105806106cd366004613b9b565b6112f1565b3480156106de57600080fd5b5061048d600e5481565b3480156106f457600080fd5b506104d561070336600461382a565b6001600160a01b0316600090815260208052604090205460ff1690565b34801561072c57600080fd5b5061051b611320565b34801561074157600080fd5b506105806113ae565b34801561075657600080fd5b50610580610765366004613b9b565b61144c565b34801561077657600080fd5b50610580610785366004613b4d565b61147b565b34801561079657600080fd5b506105806107a5366004613876565b6114b3565b3480156107b657600080fd5b5060175461048d565b3480156107cb57600080fd5b5061048d6114ce565b3480156107e057600080fd5b5061051b611504565b3480156107f557600080fd5b5061048d610804366004613b9b565b611513565b34801561081557600080fd5b506104d56115b4565b34801561082a57600080fd5b50610580610839366004613b07565b6115d9565b34801561084a57600080fd5b5061051b611616565b34801561085f57600080fd5b50601254600d54146104d5565b34801561087857600080fd5b5061048d601c5481565b34801561088e57600080fd5b5061048d611623565b3480156108a357600080fd5b5061048d611635565b3480156108b857600080fd5b5061048d601b5481565b3480156108ce57600080fd5b506105486108dd366004613b9b565b61167b565b3480156108ee57600080fd5b5061048d60125481565b34801561090457600080fd5b5061048d601d5481565b34801561091a57600080fd5b5061048d61092936600461382a565b6116f2565b34801561093a57600080fd5b50610580611779565b34801561094f57600080fd5b506105806117af565b34801561096457600080fd5b5061048d601e5481565b34801561097a57600080fd5b506000546001600160a01b0316610548565b34801561099857600080fd5b5061048d6117e5565b3480156109ad57600080fd5b506105806109bc366004613aae565b611805565b3480156109cd57600080fd5b5061051b611887565b3480156109e257600080fd5b5061048d60145481565b3480156109f857600080fd5b506104d5610a0736600461382a565b611896565b348015610a1857600080fd5b50610580610a27366004613b9b565b6118c2565b348015610a3857600080fd5b5061048d6118f1565b348015610a4d57600080fd5b50610580610a5c36600461392a565b611983565b348015610a6d57600080fd5b50610580610a7c366004613b9b565b611a48565b348015610a8d57600080fd5b5061051b610a9c366004613b9b565b611a77565b348015610aad57600080fd5b50601a546104d590600160a81b900460ff1681565b348015610ace57600080fd5b5061048d611d00565b348015610ae357600080fd5b5060165461048d565b348015610af857600080fd5b50610580610b073660046138b1565b611d20565b348015610b1857600080fd5b5061048d611d58565b348015610b2d57600080fd5b50610580610b3c36600461382a565b611d70565b348015610b4d57600080fd5b50610580611dbe565b348015610b6257600080fd5b50610580610b713660046139bc565b611df7565b348015610b8257600080fd5b50610580610b91366004613b9b565b611f8b565b6104d5610ba4366004613b9b565b61200a565b348015610bb557600080fd5b5061051b610bc4366004613b9b565b6124a7565b348015610bd557600080fd5b506105806125c0565b348015610bea57600080fd5b5061048d60105481565b348015610c0057600080fd5b50610580610c0f366004613b07565b61278b565b348015610c2057600080fd5b50610580610c2f366004613b4d565b6127c8565b348015610c4057600080fd5b50610580610c4f366004613b9b565b612800565b348015610c6057600080fd5b50610580610c6f366004613b9b565b61282f565b348015610c8057600080fd5b50610580610c8f3660046139ff565b61285e565b348015610ca057600080fd5b506104d5610caf366004613844565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610ce957600080fd5b50600c546104d59060ff1681565b348015610d0357600080fd5b5060155461048d565b348015610d1857600080fd5b50610580610d2736600461382a565b612934565b348015610d3857600080fd5b5061048d60115481565b348015610d4e57600080fd5b50601554601654610687919082565b60006003610d69610fcf565b10610d745750601490565b600a5b905090565b6000610d87826129cf565b92915050565b606060018054610d9c90613eff565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc890613eff565b8015610e155780601f10610dea57610100808354040283529160200191610e15565b820191906000526020600020905b815481529060010190602001808311610df857829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610e9d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610ec48261167b565b9050806001600160a01b0316836001600160a01b03161415610f325760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610e94565b336001600160a01b0382161480610f4e5750610f4e8133610caf565b610fc05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610e94565b610fca83836129f4565b505050565b600080601154601054610fe29190613ebc565b90506000600d54600e54610ff69190613e71565b9050818114156110095760059250505090565b600c5460ff1680611027575060185415801590611027575060185443115b156110355760049250505090565b6017541580159061104857506017544310155b156110565760039250505090565b601254600d541480611075575060165415801590611075575060165443115b156110835760029250505090565b6015541580159061109657506015544310155b156110a45760019250505090565b60009250505090565b6000546001600160a01b031633146110d75760405162461bcd60e51b8152600401610e9490613d96565b6001600160a01b03811661112d5760405162461bcd60e51b815260206004820152601e60248201527f42656e6566696369617279206d757374206e6f7420626520656d7074792e00006044820152606401610e94565b601a8054600161ff0160a01b0319166001600160a01b0390921691909117600160a81b179055565b61115f3382612a62565b61117b5760405162461bcd60e51b8152600401610e9490613dcb565b610fca838383612b59565b6000546001600160a01b031633146111b05760405162461bcd60e51b8152600401610e9490613d96565b60005b8151811015611226576001602060008484815181106111e257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905561121f600182613e71565b90506111b3565b5050565b60008060115460105461123d9190613ebc565b90506000600d54600e546112519190613e71565b9190911492915050565b6000611266836116f2565b82106112c85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610e94565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000546001600160a01b0316331461131b5760405162461bcd60e51b8152600401610e9490613d96565b601155565b6023805461132d90613eff565b80601f016020809104026020016040519081016040528092919081815260200182805461135990613eff565b80156113a65780601f1061137b576101008083540402835291602001916113a6565b820191906000526020600020905b81548152906001019060200180831161138957829003601f168201915b505050505081565b601a54600160a81b900460ff1680156113d15750601a546001600160a01b031633145b61141d5760405162461bcd60e51b815260206004820152601960248201527f4f6e6c792062656e656669636961727920616c6c6f7765642e000000000000006044820152606401610e94565b6040514790339082156108fc029083906000818181858888f19350505050158015611226573d6000803e3d6000fd5b6000546001600160a01b031633146114765760405162461bcd60e51b8152600401610e9490613d96565b601255565b6000546001600160a01b031633146114a55760405162461bcd60e51b8152600401610e9490613d96565b805160175560200151601855565b610fca83838360405180602001604052806000815250611d20565b60006114d8610fcf565b600114156114e75750600d5490565b6114ef610fcf565b600314156114fe5750600e5490565b50600090565b606060238054610d9c90613eff565b600061151e60095490565b82106115815760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610e94565b600982815481106115a257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600080601e541180156115c957506000601d54115b8015610d77575050601d54431190565b6000546001600160a01b031633146116035760405162461bcd60e51b8152600401610e9490613d96565b80516112269060239060208401906136a7565b6022805461132d90613eff565b6000600f54601154610d779190613ebc565b600061163f610fcf565b6001141561164e575060125490565b611656610fcf565b600314156114fe57601154600d546010546116719190613ebc565b610d779190613ebc565b6000818152600360205260408120546001600160a01b031680610d875760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610e94565b60006001600160a01b03821661175d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610e94565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146117a35760405162461bcd60e51b8152600401610e9490613d96565b6117ad6000612d04565b565b6000546001600160a01b031633146117d95760405162461bcd60e51b8152600401610e9490613d96565b600c805460ff19169055565b600060026117f1610fcf565b11156117fe575060185490565b5060165490565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461187d5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610e94565b6112268282612d54565b606060028054610d9c90613eff565b601a54600090600160a81b900460ff168015610d87575050601a546001600160a01b0390811691161490565b6000546001600160a01b031633146118ec5760405162461bcd60e51b8152600401610e9490613d96565b601c55565b60006118fb610fcf565b6001141561190a575060135490565b611912610fcf565b6003141561197c5760175460009061192a9043613ebc565b905060006119546604c072fc63180061194e601c5485612de090919063ffffffff16565b90612dec565b905060145481106119685760009250505090565b6014546119759082612df8565b9250505090565b5060145490565b6001600160a01b0382163314156119dc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e94565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b03163314611a725760405162461bcd60e51b8152600401610e9490613d96565b601355565b6060611a8b6000546001600160a01b031690565b6001600160a01b0316336001600160a01b031614611ae8576009548210611ae85760405162461bcd60e51b81526020600482015260116024820152702a37b5b2b7103737ba1032bc34b9ba399760791b6044820152606401610e94565b611af06115b4565b611b17575050604080518082019091526007815266191959985d5b1d60ca1b602082015290565b600060105467ffffffffffffffff811115611b4257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b6b578160200160208202803683370190505b50905060005b601054811015611bb95780828281518110611b9c57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152611bb2600182613e71565b9050611b71565b5060005b601054811015611cc8576000601054601e5483604051602001611bea929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c611c0d9190613f55565b9050828181518110611c2f57634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110611c5757634e487b7160e01b600052603260045260246000fd5b6020026020010151848481518110611c7f57634e487b7160e01b600052603260045260246000fd5b60200260200101858481518110611ca657634e487b7160e01b600052603260045260246000fd5b60209081029190910101919091525250611cc1600182613e71565b9050611bbd565b50611cf9818481518110611cec57634e487b7160e01b600052603260045260246000fd5b6020026020010151612e04565b9392505050565b60006001611d0c610fcf565b1115611d19575060175490565b5060155490565b611d2a3383612a62565b611d465760405162461bcd60e51b8152600401610e9490613dcb565b611d5284848484612f1e565b50505050565b6000611d6360095490565b601054610d779190613ebc565b6000546001600160a01b03163314611d9a5760405162461bcd60e51b8152600401610e9490613d96565b6001600160a01b03166000908152601f60205260409020805460ff19166001179055565b6000546001600160a01b03163314611de85760405162461bcd60e51b8152600401610e9490613d96565b600c805460ff19166001179055565b336000908152601f602052604090205460ff16611e565760405162461bcd60e51b815260206004820152601a60248201527f4f6e6c792061697264726f7020726f6c6520616c6c6f7765642e0000000000006044820152606401610e94565b6010548251611e7390611e699084612dec565b6009545b90612f51565b1115611ec15760405162461bcd60e51b815260206004820152601860248201527f457863656564206d617820737570706c79206c696d69742e00000000000000006044820152606401610e94565b6011548251611edd90611ed49084612dec565b600f5490612f51565b1115611f235760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b6044820152606401610e94565b60005b8251811015611f7357611f60838281518110611f5257634e487b7160e01b600052603260045260246000fd5b602002602001015183612f5d565b5080611f6b81613f3a565b915050611f26565b508151611f8490611ed49083612dec565b600f555050565b6000546001600160a01b03163314611fb55760405162461bcd60e51b8152600401610e9490613d96565b601a805460ff60a01b1916600160a01b179055601e8190556040517f2a0c75d184788ec5da6ff9a4518c4dfe7215f45a66470b32947f9b2617fc888490611fff9042815260200190565b60405180910390a150565b60006002601954141561205f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e94565b6002601955333b156120b35760405162461bcd60e51b815260206004820152601860248201527f436f6e7472616374206973206e6f7420616c6c6f7765642e00000000000000006044820152606401610e94565b6120bb610fcf565b600114806120d057506120cc610fcf565b6003145b6121125760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b6044820152606401610e94565b61211a610fcf565b600314156122335760148211156121735760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e006044820152606401610e94565b61218561217e6118f1565b8390612dec565b3410156121ca5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b6044820152606401610e94565b6010546121e56121d8611623565b611e6d85611e6d60095490565b11156122335760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e00000000006044820152606401610e94565b61223b610fcf565b600114156123ff5733600090815260208052604090205460ff166122945760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b6044820152606401610e94565b600a8211156122e55760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d69747300006044820152606401610e94565b33600090815260216020526040902054600a90612303908490613e71565b11156123515760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e006044820152606401610e94565b601254600d546123619084612f51565b11156123af5760405162461bcd60e51b815260206004820152601f60248201527f5075726368617365206578636565642070726573616c65206361707065642e006044820152606401610e94565b6123ba61217e6118f1565b3410156123ff5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b6044820152606401610e94565b612407610fcf565b6001148061241c5750612418610fcf565b6003145b1561249b5761242b3383612f5d565b50612434610fcf565b6003141561244e5781600e5461244a9190613e71565b600e555b612456610fcf565b6001141561249b5733600090815260216020526040902054612479908390613e71565b33600090815260216020526040902055600d54612497908390613e71565b600d555b50600180601955919050565b60606124b260095490565b82106124f35760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b6044820152606401610e94565b6124fb6115b4565b61258f576022805461250c90613eff565b80601f016020809104026020016040519081016040528092919081815260200182805461253890613eff565b80156125855780601f1061255a57610100808354040283529160200191612585565b820191906000526020600020905b81548152906001019060200180831161256857829003601f168201915b5050505050610d87565b602361259a83611a77565b6040516020016125ab929190613c13565b60405160208183030381529060405292915050565b6000546001600160a01b031633146125ea5760405162461bcd60e51b8152600401610e9490613d96565b601a54600160a01b900460ff16156126445760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c726561647920726571756573746564006044820152606401610e94565b6040516370a0823160e01b8152306004820152671bc16d674ec80000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156126ad57600080fd5b505afa1580156126c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e59190613bb3565b10156127275760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b6044820152606401610e94565b61273b601b54671bc16d674ec80000612fa7565b50601a805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f906127819042815260200190565b60405180910390a1565b6000546001600160a01b031633146127b55760405162461bcd60e51b8152600401610e9490613d96565b80516112269060229060208401906136a7565b6000546001600160a01b031633146127f25760405162461bcd60e51b8152600401610e9490613d96565b805160155560200151601655565b6000546001600160a01b0316331461282a5760405162461bcd60e51b8152600401610e9490613d96565b601d55565b6000546001600160a01b031633146128595760405162461bcd60e51b8152600401610e9490613d96565b601455565b6000546001600160a01b031633146128885760405162461bcd60e51b8152600401610e9490613d96565b60005b8151811015611226578181815181106128b457634e487b7160e01b600052603260045260246000fd5b60200260200101517fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b5565720761290d84848151811061290057634e487b7160e01b600052603260045260246000fd5b60200260200101516124a7565b60405161291a9190613d31565b60405180910390a261292d600182613e71565b905061288b565b6000546001600160a01b0316331461295e5760405162461bcd60e51b8152600401610e9490613d96565b6001600160a01b0381166129c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e94565b6129cc81612d04565b50565b60006001600160e01b0319821663780e9d6360e01b1480610d875750610d8782613132565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612a298261167b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b0316612adb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610e94565b6000612ae68361167b565b9050806001600160a01b0316846001600160a01b03161480612b215750836001600160a01b0316612b1684610e1f565b6001600160a01b0316145b80612b5157506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612b6c8261167b565b6001600160a01b031614612bd45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610e94565b6001600160a01b038216612c365760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610e94565b612c41838383613182565b612c4c6000826129f4565b6001600160a01b0383166000908152600460205260408120805460019290612c75908490613ebc565b90915550506001600160a01b0382166000908152600460205260408120805460019290612ca3908490613e71565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015612da557601e81905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa906060015b60405180910390a15050565b6001601e5560408051428152602081018490527fd9b030358bf0114e16959cea6c935e1cb862740b4d1056049f91711662fb3f959101612d99565b6000611cf98284613e89565b6000611cf98284613e9d565b6000611cf98284613ebc565b606081612e285750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612e525780612e3c81613f3a565b9150612e4b9050600a83613e89565b9150612e2c565b60008167ffffffffffffffff811115612e7b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612ea5576020820181803683370190505b5090505b8415612b5157612eba600183613ebc565b9150612ec7600a86613f55565b612ed2906030613e71565b60f81b818381518110612ef557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612f17600a86613e89565b9450612ea9565b612f29848484612b59565b612f358484848461318d565b611d525760405162461bcd60e51b8152600401610e9490613d44565b6000611cf98284613e71565b6000805b82811015612f9d576000612f7460095490565b9050601054811015612f8a57612f8a858261329a565b5080612f9581613f3a565b915050612f61565b5060019392505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001613017929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161304493929190613d0a565b602060405180830381600087803b15801561305e57600080fd5b505af1158015613072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130969190613a92565b506000838152600b6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526130f2906001613e71565b6000858152600b6020526040902055612b518482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60006001600160e01b031982166380ac58cd60e01b148061316357506001600160e01b03198216635b5e139f60e01b145b80610d8757506301ffc9a760e01b6001600160e01b0319831614610d87565b610fca8383836132b4565b60006001600160a01b0384163b1561328f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131d1903390899088908890600401613ccd565b602060405180830381600087803b1580156131eb57600080fd5b505af192505050801561321b575060408051601f3d908101601f1916820190925261321891810190613aeb565b60015b613275573d808015613249576040519150601f19603f3d011682016040523d82523d6000602084013e61324e565b606091505b50805161326d5760405162461bcd60e51b8152600401610e9490613d44565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b51565b506001949350505050565b61122682826040518060200160405280600081525061336c565b6001600160a01b03831661330f5761330a81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613332565b816001600160a01b0316836001600160a01b03161461333257613332838261339f565b6001600160a01b03821661334957610fca8161343c565b826001600160a01b0316826001600160a01b031614610fca57610fca8282613515565b6133768383613559565b613383600084848461318d565b610fca5760405162461bcd60e51b8152600401610e9490613d44565b600060016133ac846116f2565b6133b69190613ebc565b600083815260086020526040902054909150808214613409576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061344e90600190613ebc565b6000838152600a60205260408120546009805493945090928490811061348457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600983815481106134b357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806134f957634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000613520836116f2565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b0382166135af5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e94565b6000818152600360205260409020546001600160a01b0316156136145760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e94565b61362060008383613182565b6001600160a01b0382166000908152600460205260408120805460019290613649908490613e71565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546136b390613eff565b90600052602060002090601f0160209004810192826136d5576000855561371b565b82601f106136ee57805160ff191683800117855561371b565b8280016001018555821561371b579182015b8281111561371b578251825591602001919060010190613700565b5061372792915061372b565b5090565b5b80821115613727576000815560010161372c565b600067ffffffffffffffff83111561375a5761375a613f95565b61376d601f8401601f1916602001613e1c565b905082815283838301111561378157600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146137af57600080fd5b919050565b600082601f8301126137c4578081fd5b813560206137d96137d483613e4d565b613e1c565b80838252828201915082860187848660051b89010111156137f8578586fd5b855b8581101561381d5761380b82613798565b845292840192908401906001016137fa565b5090979650505050505050565b60006020828403121561383b578081fd5b611cf982613798565b60008060408385031215613856578081fd5b61385f83613798565b915061386d60208401613798565b90509250929050565b60008060006060848603121561388a578081fd5b61389384613798565b92506138a160208501613798565b9150604084013590509250925092565b600080600080608085870312156138c6578081fd5b6138cf85613798565b93506138dd60208601613798565b925060408501359150606085013567ffffffffffffffff8111156138ff578182fd5b8501601f8101871361390f578182fd5b61391e87823560208401613740565b91505092959194509250565b6000806040838503121561393c578182fd5b61394583613798565b9150602083013561395581613fab565b809150509250929050565b60008060408385031215613972578182fd5b61397b83613798565b946020939093013593505050565b60006020828403121561399a578081fd5b813567ffffffffffffffff8111156139b0578182fd5b612b51848285016137b4565b600080604083850312156139ce578182fd5b823567ffffffffffffffff8111156139e4578283fd5b6139f0858286016137b4565b95602094909401359450505050565b60006020808385031215613a11578182fd5b823567ffffffffffffffff811115613a27578283fd5b8301601f81018513613a37578283fd5b8035613a456137d482613e4d565b80828252848201915084840188868560051b8701011115613a64578687fd5b8694505b83851015613a86578035835260019490940193918501918501613a68565b50979650505050505050565b600060208284031215613aa3578081fd5b8151611cf981613fab565b60008060408385031215613ac0578182fd5b50508035926020909101359150565b600060208284031215613ae0578081fd5b8135611cf981613fb9565b600060208284031215613afc578081fd5b8151611cf981613fb9565b600060208284031215613b18578081fd5b813567ffffffffffffffff811115613b2e578182fd5b8201601f81018413613b3e578182fd5b612b5184823560208401613740565b600060408284031215613b5e578081fd5b6040516040810181811067ffffffffffffffff82111715613b8157613b81613f95565b604052823581526020928301359281019290925250919050565b600060208284031215613bac578081fd5b5035919050565b600060208284031215613bc4578081fd5b5051919050565b60008151808452613be3816020860160208601613ed3565b601f01601f19169290920160200192915050565b60008151613c09818560208601613ed3565b9290920192915050565b600080845482600182811c915080831680613c2f57607f831692505b6020808410821415613c4f57634e487b7160e01b87526022600452602487fd5b818015613c635760018114613c7457613ca0565b60ff19861689528489019650613ca0565b60008b815260209020885b86811015613c985781548b820152908501908301613c7f565b505084890196505b505050505050613cc4613cb38286613bf7565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d0090830184613bcb565b9695505050505050565b60018060a01b0384168152826020820152606060408201526000613cc46060830184613bcb565b602081526000611cf96020830184613bcb565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613e4557613e45613f95565b604052919050565b600067ffffffffffffffff821115613e6757613e67613f95565b5060051b60200190565b60008219821115613e8457613e84613f69565b500190565b600082613e9857613e98613f7f565b500490565b6000816000190483118215151615613eb757613eb7613f69565b500290565b600082821015613ece57613ece613f69565b500390565b60005b83811015613eee578181015183820152602001613ed6565b83811115611d525750506000910152565b600181811c90821680613f1357607f821691505b60208210811415613f3457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613f4e57613f4e613f69565b5060010190565b600082613f6457613f64613f7f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146129cc57600080fd5b6001600160e01b0319811681146129cc57600080fdfea2646970667358221220f1ebf07cea076320d985693f090552415b62d6db78726217fe86aee9322d58b964736f6c63430008040033000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000000083185ac036400000000000000000000000000000000000000000000000000001562056fbdec000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000001b39000000000000000000000000000000000000000000000000000000000000000b48656e706169204c696665000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648454e5041490000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106104725760003560e01c806366bb81c71161024a578063bbc33aa511610139578063da3244b0116100b6578063ee55efee1161007a578063ee55efee14610cdd578063f05e2a7c14610cf7578063f2fde38b14610d0c578063f3b3a9fa14610d2c578063fdea8e0b14610d4257600080fd5b8063da3244b014610c14578063da324a3014610c34578063de6f742514610c54578063e5d1ea4114610c74578063e985e9c514610c9457600080fd5b8063c634d032116100fd578063c634d03214610b96578063c87b56dd14610ba9578063ccc5d84714610bc9578063d5abeb0114610bde578063da1b9e0814610bf457600080fd5b8063bbc33aa514610b0c578063bd0b4b3714610b21578063be008ccb14610b41578063c204642c14610b56578063c32a50f914610b7657600080fd5b80639d19b226116101c7578063a574cea41161018b578063a574cea414610a81578063a734335b14610aa1578063b0471e7c14610ac2578063b73094ac14610ad7578063b88d4fde14610aec57600080fd5b80639d19b226146109ec578063a013895d14610a0c578063a035b1fe14610a2c578063a22cb46514610a41578063a3e271e514610a6157600080fd5b80638da5cb5b1161020e5780638da5cb5b1461096e5780638ea939331461098c57806394985ddd146109a157806395d89b41146109c15780639b6860c8146109d657600080fd5b806366bb81c7146108f857806370a082311461090e578063715018a61461092e57806379940f8a146109435780637d94792a1461095857600080fd5b80633af32abf1161036657806354214f69116102e35780635e9f9613116102a75780635e9f9613146108825780635f0b08441461089757806361728f39146108ac5780636352211e146108c257806363cb3aa5146108e257600080fd5b806354214f691461080957806355f804b31461081e57806356c4aedd1461083e578063579c67aa146108535780635e1626991461086c57600080fd5b806342842e0e1161032a57806342842e0e1461078a57806347326dc2146107aa5780634cc0c160146107bf5780634e99b800146107d45780634f6ccce7146107e957600080fd5b80633af32abf146106e85780633ca4fb76146107205780633ccfd60b14610735578063405571d41461074a578063415377031461076a57600080fd5b80631c31f710116103f45780632f745c59116103b85780632f745c591461064c57806333bc1c5c1461066c57806335a5af451461069c5780633662454d146106b25780633828914a146106d257600080fd5b80631c31f710146105c157806323b872dd146105e15780632617dd4d14610601578063266dab34146106215780632693dc141461063757600080fd5b8063081812fc1161043b578063081812fc14610528578063095ea7b3146105605780630960e71c146105825780630d43ebc21461059757806318160ddd146105ac57600080fd5b80620e7fa81461047757806301d35173146104a057806301ffc9a7146104b557806302410f47146104e557806306fdde0314610506575b600080fd5b34801561048357600080fd5b5061048d60135481565b6040519081526020015b60405180910390f35b3480156104ac57600080fd5b5061048d610d5d565b3480156104c157600080fd5b506104d56104d0366004613acf565b610d7c565b6040519015158152602001610497565b3480156104f157600080fd5b50601a546104d590600160a01b900460ff1681565b34801561051257600080fd5b5061051b610d8d565b6040516104979190613d31565b34801561053457600080fd5b50610548610543366004613b9b565b610e1f565b6040516001600160a01b039091168152602001610497565b34801561056c57600080fd5b5061058061057b366004613960565b610eb9565b005b34801561058e57600080fd5b5060185461048d565b3480156105a357600080fd5b5061048d610fcf565b3480156105b857600080fd5b5060095461048d565b3480156105cd57600080fd5b506105806105dc36600461382a565b6110ad565b3480156105ed57600080fd5b506105806105fc366004613876565b611155565b34801561060d57600080fd5b5061058061061c366004613989565b611186565b34801561062d57600080fd5b5061048d600f5481565b34801561064357600080fd5b506104d561122a565b34801561065857600080fd5b5061048d610667366004613960565b61125b565b34801561067857600080fd5b50601754601854610687919082565b60408051928352602083019190915201610497565b3480156106a857600080fd5b5061048d600d5481565b3480156106be57600080fd5b506105806106cd366004613b9b565b6112f1565b3480156106de57600080fd5b5061048d600e5481565b3480156106f457600080fd5b506104d561070336600461382a565b6001600160a01b0316600090815260208052604090205460ff1690565b34801561072c57600080fd5b5061051b611320565b34801561074157600080fd5b506105806113ae565b34801561075657600080fd5b50610580610765366004613b9b565b61144c565b34801561077657600080fd5b50610580610785366004613b4d565b61147b565b34801561079657600080fd5b506105806107a5366004613876565b6114b3565b3480156107b657600080fd5b5060175461048d565b3480156107cb57600080fd5b5061048d6114ce565b3480156107e057600080fd5b5061051b611504565b3480156107f557600080fd5b5061048d610804366004613b9b565b611513565b34801561081557600080fd5b506104d56115b4565b34801561082a57600080fd5b50610580610839366004613b07565b6115d9565b34801561084a57600080fd5b5061051b611616565b34801561085f57600080fd5b50601254600d54146104d5565b34801561087857600080fd5b5061048d601c5481565b34801561088e57600080fd5b5061048d611623565b3480156108a357600080fd5b5061048d611635565b3480156108b857600080fd5b5061048d601b5481565b3480156108ce57600080fd5b506105486108dd366004613b9b565b61167b565b3480156108ee57600080fd5b5061048d60125481565b34801561090457600080fd5b5061048d601d5481565b34801561091a57600080fd5b5061048d61092936600461382a565b6116f2565b34801561093a57600080fd5b50610580611779565b34801561094f57600080fd5b506105806117af565b34801561096457600080fd5b5061048d601e5481565b34801561097a57600080fd5b506000546001600160a01b0316610548565b34801561099857600080fd5b5061048d6117e5565b3480156109ad57600080fd5b506105806109bc366004613aae565b611805565b3480156109cd57600080fd5b5061051b611887565b3480156109e257600080fd5b5061048d60145481565b3480156109f857600080fd5b506104d5610a0736600461382a565b611896565b348015610a1857600080fd5b50610580610a27366004613b9b565b6118c2565b348015610a3857600080fd5b5061048d6118f1565b348015610a4d57600080fd5b50610580610a5c36600461392a565b611983565b348015610a6d57600080fd5b50610580610a7c366004613b9b565b611a48565b348015610a8d57600080fd5b5061051b610a9c366004613b9b565b611a77565b348015610aad57600080fd5b50601a546104d590600160a81b900460ff1681565b348015610ace57600080fd5b5061048d611d00565b348015610ae357600080fd5b5060165461048d565b348015610af857600080fd5b50610580610b073660046138b1565b611d20565b348015610b1857600080fd5b5061048d611d58565b348015610b2d57600080fd5b50610580610b3c36600461382a565b611d70565b348015610b4d57600080fd5b50610580611dbe565b348015610b6257600080fd5b50610580610b713660046139bc565b611df7565b348015610b8257600080fd5b50610580610b91366004613b9b565b611f8b565b6104d5610ba4366004613b9b565b61200a565b348015610bb557600080fd5b5061051b610bc4366004613b9b565b6124a7565b348015610bd557600080fd5b506105806125c0565b348015610bea57600080fd5b5061048d60105481565b348015610c0057600080fd5b50610580610c0f366004613b07565b61278b565b348015610c2057600080fd5b50610580610c2f366004613b4d565b6127c8565b348015610c4057600080fd5b50610580610c4f366004613b9b565b612800565b348015610c6057600080fd5b50610580610c6f366004613b9b565b61282f565b348015610c8057600080fd5b50610580610c8f3660046139ff565b61285e565b348015610ca057600080fd5b506104d5610caf366004613844565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610ce957600080fd5b50600c546104d59060ff1681565b348015610d0357600080fd5b5060155461048d565b348015610d1857600080fd5b50610580610d2736600461382a565b612934565b348015610d3857600080fd5b5061048d60115481565b348015610d4e57600080fd5b50601554601654610687919082565b60006003610d69610fcf565b10610d745750601490565b600a5b905090565b6000610d87826129cf565b92915050565b606060018054610d9c90613eff565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc890613eff565b8015610e155780601f10610dea57610100808354040283529160200191610e15565b820191906000526020600020905b815481529060010190602001808311610df857829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610e9d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610ec48261167b565b9050806001600160a01b0316836001600160a01b03161415610f325760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610e94565b336001600160a01b0382161480610f4e5750610f4e8133610caf565b610fc05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610e94565b610fca83836129f4565b505050565b600080601154601054610fe29190613ebc565b90506000600d54600e54610ff69190613e71565b9050818114156110095760059250505090565b600c5460ff1680611027575060185415801590611027575060185443115b156110355760049250505090565b6017541580159061104857506017544310155b156110565760039250505090565b601254600d541480611075575060165415801590611075575060165443115b156110835760029250505090565b6015541580159061109657506015544310155b156110a45760019250505090565b60009250505090565b6000546001600160a01b031633146110d75760405162461bcd60e51b8152600401610e9490613d96565b6001600160a01b03811661112d5760405162461bcd60e51b815260206004820152601e60248201527f42656e6566696369617279206d757374206e6f7420626520656d7074792e00006044820152606401610e94565b601a8054600161ff0160a01b0319166001600160a01b0390921691909117600160a81b179055565b61115f3382612a62565b61117b5760405162461bcd60e51b8152600401610e9490613dcb565b610fca838383612b59565b6000546001600160a01b031633146111b05760405162461bcd60e51b8152600401610e9490613d96565b60005b8151811015611226576001602060008484815181106111e257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905561121f600182613e71565b90506111b3565b5050565b60008060115460105461123d9190613ebc565b90506000600d54600e546112519190613e71565b9190911492915050565b6000611266836116f2565b82106112c85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610e94565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000546001600160a01b0316331461131b5760405162461bcd60e51b8152600401610e9490613d96565b601155565b6023805461132d90613eff565b80601f016020809104026020016040519081016040528092919081815260200182805461135990613eff565b80156113a65780601f1061137b576101008083540402835291602001916113a6565b820191906000526020600020905b81548152906001019060200180831161138957829003601f168201915b505050505081565b601a54600160a81b900460ff1680156113d15750601a546001600160a01b031633145b61141d5760405162461bcd60e51b815260206004820152601960248201527f4f6e6c792062656e656669636961727920616c6c6f7765642e000000000000006044820152606401610e94565b6040514790339082156108fc029083906000818181858888f19350505050158015611226573d6000803e3d6000fd5b6000546001600160a01b031633146114765760405162461bcd60e51b8152600401610e9490613d96565b601255565b6000546001600160a01b031633146114a55760405162461bcd60e51b8152600401610e9490613d96565b805160175560200151601855565b610fca83838360405180602001604052806000815250611d20565b60006114d8610fcf565b600114156114e75750600d5490565b6114ef610fcf565b600314156114fe5750600e5490565b50600090565b606060238054610d9c90613eff565b600061151e60095490565b82106115815760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610e94565b600982815481106115a257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600080601e541180156115c957506000601d54115b8015610d77575050601d54431190565b6000546001600160a01b031633146116035760405162461bcd60e51b8152600401610e9490613d96565b80516112269060239060208401906136a7565b6022805461132d90613eff565b6000600f54601154610d779190613ebc565b600061163f610fcf565b6001141561164e575060125490565b611656610fcf565b600314156114fe57601154600d546010546116719190613ebc565b610d779190613ebc565b6000818152600360205260408120546001600160a01b031680610d875760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610e94565b60006001600160a01b03821661175d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610e94565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146117a35760405162461bcd60e51b8152600401610e9490613d96565b6117ad6000612d04565b565b6000546001600160a01b031633146117d95760405162461bcd60e51b8152600401610e9490613d96565b600c805460ff19169055565b600060026117f1610fcf565b11156117fe575060185490565b5060165490565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952161461187d5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610e94565b6112268282612d54565b606060028054610d9c90613eff565b601a54600090600160a81b900460ff168015610d87575050601a546001600160a01b0390811691161490565b6000546001600160a01b031633146118ec5760405162461bcd60e51b8152600401610e9490613d96565b601c55565b60006118fb610fcf565b6001141561190a575060135490565b611912610fcf565b6003141561197c5760175460009061192a9043613ebc565b905060006119546604c072fc63180061194e601c5485612de090919063ffffffff16565b90612dec565b905060145481106119685760009250505090565b6014546119759082612df8565b9250505090565b5060145490565b6001600160a01b0382163314156119dc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e94565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b03163314611a725760405162461bcd60e51b8152600401610e9490613d96565b601355565b6060611a8b6000546001600160a01b031690565b6001600160a01b0316336001600160a01b031614611ae8576009548210611ae85760405162461bcd60e51b81526020600482015260116024820152702a37b5b2b7103737ba1032bc34b9ba399760791b6044820152606401610e94565b611af06115b4565b611b17575050604080518082019091526007815266191959985d5b1d60ca1b602082015290565b600060105467ffffffffffffffff811115611b4257634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611b6b578160200160208202803683370190505b50905060005b601054811015611bb95780828281518110611b9c57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152611bb2600182613e71565b9050611b71565b5060005b601054811015611cc8576000601054601e5483604051602001611bea929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c611c0d9190613f55565b9050828181518110611c2f57634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110611c5757634e487b7160e01b600052603260045260246000fd5b6020026020010151848481518110611c7f57634e487b7160e01b600052603260045260246000fd5b60200260200101858481518110611ca657634e487b7160e01b600052603260045260246000fd5b60209081029190910101919091525250611cc1600182613e71565b9050611bbd565b50611cf9818481518110611cec57634e487b7160e01b600052603260045260246000fd5b6020026020010151612e04565b9392505050565b60006001611d0c610fcf565b1115611d19575060175490565b5060155490565b611d2a3383612a62565b611d465760405162461bcd60e51b8152600401610e9490613dcb565b611d5284848484612f1e565b50505050565b6000611d6360095490565b601054610d779190613ebc565b6000546001600160a01b03163314611d9a5760405162461bcd60e51b8152600401610e9490613d96565b6001600160a01b03166000908152601f60205260409020805460ff19166001179055565b6000546001600160a01b03163314611de85760405162461bcd60e51b8152600401610e9490613d96565b600c805460ff19166001179055565b336000908152601f602052604090205460ff16611e565760405162461bcd60e51b815260206004820152601a60248201527f4f6e6c792061697264726f7020726f6c6520616c6c6f7765642e0000000000006044820152606401610e94565b6010548251611e7390611e699084612dec565b6009545b90612f51565b1115611ec15760405162461bcd60e51b815260206004820152601860248201527f457863656564206d617820737570706c79206c696d69742e00000000000000006044820152606401610e94565b6011548251611edd90611ed49084612dec565b600f5490612f51565b1115611f235760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b6044820152606401610e94565b60005b8251811015611f7357611f60838281518110611f5257634e487b7160e01b600052603260045260246000fd5b602002602001015183612f5d565b5080611f6b81613f3a565b915050611f26565b508151611f8490611ed49083612dec565b600f555050565b6000546001600160a01b03163314611fb55760405162461bcd60e51b8152600401610e9490613d96565b601a805460ff60a01b1916600160a01b179055601e8190556040517f2a0c75d184788ec5da6ff9a4518c4dfe7215f45a66470b32947f9b2617fc888490611fff9042815260200190565b60405180910390a150565b60006002601954141561205f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e94565b6002601955333b156120b35760405162461bcd60e51b815260206004820152601860248201527f436f6e7472616374206973206e6f7420616c6c6f7765642e00000000000000006044820152606401610e94565b6120bb610fcf565b600114806120d057506120cc610fcf565b6003145b6121125760405162461bcd60e51b815260206004820152601360248201527229b0b632903737ba1030bb30b4b630b136329760691b6044820152606401610e94565b61211a610fcf565b600314156122335760148211156121735760405162461bcd60e51b815260206004820152601f60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d6974732e006044820152606401610e94565b61218561217e6118f1565b8390612dec565b3410156121ca5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b6044820152606401610e94565b6010546121e56121d8611623565b611e6d85611e6d60095490565b11156122335760405162461bcd60e51b815260206004820152601b60248201527f507572636861736520657863656564206d617820737570706c792e00000000006044820152606401610e94565b61223b610fcf565b600114156123ff5733600090815260208052604090205460ff166122945760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b6044820152606401610e94565b600a8211156122e55760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420657863656564207472616e73616374696f6e206c696d69747300006044820152606401610e94565b33600090815260216020526040902054600a90612303908490613e71565b11156123515760405162461bcd60e51b815260206004820152601f60248201527f4d696e74206c696d6974207065722077616c6c65742065786365656465642e006044820152606401610e94565b601254600d546123619084612f51565b11156123af5760405162461bcd60e51b815260206004820152601f60248201527f5075726368617365206578636565642070726573616c65206361707065642e006044820152606401610e94565b6123ba61217e6118f1565b3410156123ff5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a10333ab732399760691b6044820152606401610e94565b612407610fcf565b6001148061241c5750612418610fcf565b6003145b1561249b5761242b3383612f5d565b50612434610fcf565b6003141561244e5781600e5461244a9190613e71565b600e555b612456610fcf565b6001141561249b5733600090815260216020526040902054612479908390613e71565b33600090815260216020526040902055600d54612497908390613e71565b600d555b50600180601955919050565b60606124b260095490565b82106124f35760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b6044820152606401610e94565b6124fb6115b4565b61258f576022805461250c90613eff565b80601f016020809104026020016040519081016040528092919081815260200182805461253890613eff565b80156125855780601f1061255a57610100808354040283529160200191612585565b820191906000526020600020905b81548152906001019060200180831161256857829003601f168201915b5050505050610d87565b602361259a83611a77565b6040516020016125ab929190613c13565b60405160208183030381529060405292915050565b6000546001600160a01b031633146125ea5760405162461bcd60e51b8152600401610e9490613d96565b601a54600160a01b900460ff16156126445760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c726561647920726571756573746564006044820152606401610e94565b6040516370a0823160e01b8152306004820152671bc16d674ec80000907f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a082319060240160206040518083038186803b1580156126ad57600080fd5b505afa1580156126c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126e59190613bb3565b10156127275760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b6044820152606401610e94565b61273b601b54671bc16d674ec80000612fa7565b50601a805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f906127819042815260200190565b60405180910390a1565b6000546001600160a01b031633146127b55760405162461bcd60e51b8152600401610e9490613d96565b80516112269060229060208401906136a7565b6000546001600160a01b031633146127f25760405162461bcd60e51b8152600401610e9490613d96565b805160155560200151601655565b6000546001600160a01b0316331461282a5760405162461bcd60e51b8152600401610e9490613d96565b601d55565b6000546001600160a01b031633146128595760405162461bcd60e51b8152600401610e9490613d96565b601455565b6000546001600160a01b031633146128885760405162461bcd60e51b8152600401610e9490613d96565b60005b8151811015611226578181815181106128b457634e487b7160e01b600052603260045260246000fd5b60200260200101517fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b5565720761290d84848151811061290057634e487b7160e01b600052603260045260246000fd5b60200260200101516124a7565b60405161291a9190613d31565b60405180910390a261292d600182613e71565b905061288b565b6000546001600160a01b0316331461295e5760405162461bcd60e51b8152600401610e9490613d96565b6001600160a01b0381166129c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e94565b6129cc81612d04565b50565b60006001600160e01b0319821663780e9d6360e01b1480610d875750610d8782613132565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612a298261167b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600360205260408120546001600160a01b0316612adb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610e94565b6000612ae68361167b565b9050806001600160a01b0316846001600160a01b03161480612b215750836001600160a01b0316612b1684610e1f565b6001600160a01b0316145b80612b5157506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612b6c8261167b565b6001600160a01b031614612bd45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610e94565b6001600160a01b038216612c365760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610e94565b612c41838383613182565b612c4c6000826129f4565b6001600160a01b0383166000908152600460205260408120805460019290612c75908490613ebc565b90915550506001600160a01b0382166000908152600460205260408120805460019290612ca3908490613e71565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015612da557601e81905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa906060015b60405180910390a15050565b6001601e5560408051428152602081018490527fd9b030358bf0114e16959cea6c935e1cb862740b4d1056049f91711662fb3f959101612d99565b6000611cf98284613e89565b6000611cf98284613e9d565b6000611cf98284613ebc565b606081612e285750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612e525780612e3c81613f3a565b9150612e4b9050600a83613e89565b9150612e2c565b60008167ffffffffffffffff811115612e7b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612ea5576020820181803683370190505b5090505b8415612b5157612eba600183613ebc565b9150612ec7600a86613f55565b612ed2906030613e71565b60f81b818381518110612ef557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612f17600a86613e89565b9450612ea9565b612f29848484612b59565b612f358484848461318d565b611d525760405162461bcd60e51b8152600401610e9490613d44565b6000611cf98284613e71565b6000805b82811015612f9d576000612f7460095490565b9050601054811015612f8a57612f8a858261329a565b5080612f9581613f3a565b915050612f61565b5060019392505050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001613017929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161304493929190613d0a565b602060405180830381600087803b15801561305e57600080fd5b505af1158015613072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130969190613a92565b506000838152600b6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526130f2906001613e71565b6000858152600b6020526040902055612b518482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b60006001600160e01b031982166380ac58cd60e01b148061316357506001600160e01b03198216635b5e139f60e01b145b80610d8757506301ffc9a760e01b6001600160e01b0319831614610d87565b610fca8383836132b4565b60006001600160a01b0384163b1561328f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131d1903390899088908890600401613ccd565b602060405180830381600087803b1580156131eb57600080fd5b505af192505050801561321b575060408051601f3d908101601f1916820190925261321891810190613aeb565b60015b613275573d808015613249576040519150601f19603f3d011682016040523d82523d6000602084013e61324e565b606091505b50805161326d5760405162461bcd60e51b8152600401610e9490613d44565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b51565b506001949350505050565b61122682826040518060200160405280600081525061336c565b6001600160a01b03831661330f5761330a81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613332565b816001600160a01b0316836001600160a01b03161461333257613332838261339f565b6001600160a01b03821661334957610fca8161343c565b826001600160a01b0316826001600160a01b031614610fca57610fca8282613515565b6133768383613559565b613383600084848461318d565b610fca5760405162461bcd60e51b8152600401610e9490613d44565b600060016133ac846116f2565b6133b69190613ebc565b600083815260086020526040902054909150808214613409576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061344e90600190613ebc565b6000838152600a60205260408120546009805493945090928490811061348457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600983815481106134b357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806134f957634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000613520836116f2565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b0382166135af5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e94565b6000818152600360205260409020546001600160a01b0316156136145760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e94565b61362060008383613182565b6001600160a01b0382166000908152600460205260408120805460019290613649908490613e71565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546136b390613eff565b90600052602060002090601f0160209004810192826136d5576000855561371b565b82601f106136ee57805160ff191683800117855561371b565b8280016001018555821561371b579182015b8281111561371b578251825591602001919060010190613700565b5061372792915061372b565b5090565b5b80821115613727576000815560010161372c565b600067ffffffffffffffff83111561375a5761375a613f95565b61376d601f8401601f1916602001613e1c565b905082815283838301111561378157600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146137af57600080fd5b919050565b600082601f8301126137c4578081fd5b813560206137d96137d483613e4d565b613e1c565b80838252828201915082860187848660051b89010111156137f8578586fd5b855b8581101561381d5761380b82613798565b845292840192908401906001016137fa565b5090979650505050505050565b60006020828403121561383b578081fd5b611cf982613798565b60008060408385031215613856578081fd5b61385f83613798565b915061386d60208401613798565b90509250929050565b60008060006060848603121561388a578081fd5b61389384613798565b92506138a160208501613798565b9150604084013590509250925092565b600080600080608085870312156138c6578081fd5b6138cf85613798565b93506138dd60208601613798565b925060408501359150606085013567ffffffffffffffff8111156138ff578182fd5b8501601f8101871361390f578182fd5b61391e87823560208401613740565b91505092959194509250565b6000806040838503121561393c578182fd5b61394583613798565b9150602083013561395581613fab565b809150509250929050565b60008060408385031215613972578182fd5b61397b83613798565b946020939093013593505050565b60006020828403121561399a578081fd5b813567ffffffffffffffff8111156139b0578182fd5b612b51848285016137b4565b600080604083850312156139ce578182fd5b823567ffffffffffffffff8111156139e4578283fd5b6139f0858286016137b4565b95602094909401359450505050565b60006020808385031215613a11578182fd5b823567ffffffffffffffff811115613a27578283fd5b8301601f81018513613a37578283fd5b8035613a456137d482613e4d565b80828252848201915084840188868560051b8701011115613a64578687fd5b8694505b83851015613a86578035835260019490940193918501918501613a68565b50979650505050505050565b600060208284031215613aa3578081fd5b8151611cf981613fab565b60008060408385031215613ac0578182fd5b50508035926020909101359150565b600060208284031215613ae0578081fd5b8135611cf981613fb9565b600060208284031215613afc578081fd5b8151611cf981613fb9565b600060208284031215613b18578081fd5b813567ffffffffffffffff811115613b2e578182fd5b8201601f81018413613b3e578182fd5b612b5184823560208401613740565b600060408284031215613b5e578081fd5b6040516040810181811067ffffffffffffffff82111715613b8157613b81613f95565b604052823581526020928301359281019290925250919050565b600060208284031215613bac578081fd5b5035919050565b600060208284031215613bc4578081fd5b5051919050565b60008151808452613be3816020860160208601613ed3565b601f01601f19169290920160200192915050565b60008151613c09818560208601613ed3565b9290920192915050565b600080845482600182811c915080831680613c2f57607f831692505b6020808410821415613c4f57634e487b7160e01b87526022600452602487fd5b818015613c635760018114613c7457613ca0565b60ff19861689528489019650613ca0565b60008b815260209020885b86811015613c985781548b820152908501908301613c7f565b505084890196505b505050505050613cc4613cb38286613bf7565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613d0090830184613bcb565b9695505050505050565b60018060a01b0384168152826020820152606060408201526000613cc46060830184613bcb565b602081526000611cf96020830184613bcb565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613e4557613e45613f95565b604052919050565b600067ffffffffffffffff821115613e6757613e67613f95565b5060051b60200190565b60008219821115613e8457613e84613f69565b500190565b600082613e9857613e98613f7f565b500490565b6000816000190483118215151615613eb757613eb7613f69565b500290565b600082821015613ece57613ece613f69565b500390565b60005b83811015613eee578181015183820152602001613ed6565b83811115611d525750506000910152565b600181811c90821680613f1357607f821691505b60208210811415613f3457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613f4e57613f4e613f69565b5060010190565b600082613f6457613f64613f7f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146129cc57600080fd5b6001600160e01b0319811681146129cc57600080fdfea2646970667358221220f1ebf07cea076320d985693f090552415b62d6db78726217fe86aee9322d58b964736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000000083185ac036400000000000000000000000000000000000000000000000000001562056fbdec000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000001b39000000000000000000000000000000000000000000000000000000000000000b48656e706169204c696665000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000648454e5041490000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _coordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [1] : _linkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [2] : _keyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [3] : _presalePrice (uint256): 36900000000000000
Arg [4] : _publicSalePrice (uint256): 96300000000000000
Arg [5] : name (string): Henpai Life
Arg [6] : symbol (string): HENPAI
Arg [7] : _maxSupply (uint256): 6969
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [1] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [2] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [3] : 0000000000000000000000000000000000000000000000000083185ac0364000
Arg [4] : 00000000000000000000000000000000000000000000000001562056fbdec000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [7] : 0000000000000000000000000000000000000000000000000000000000001b39
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [9] : 48656e706169204c696665000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [11] : 48454e5041490000000000000000000000000000000000000000000000000000
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.