Token Halloween Ghoulie
Overview ERC-721
Total Supply:
603 HGHOUL
Holders:
503 addresses
Profile Summary
Contract:
Balance
1 HGHOUL
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xb39cB4Ca66Eb26DD43438450F360894a4d7f6FdF
Contract Name:
HalloweenGhoulieNFT
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// ██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗░█████╗░██╗░░██╗░█████╗░██╗███╗░░██╗ // ██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝██╔══██╗██║░░██║██╔══██╗██║████╗░██║ // ██████╦╝██║░░░░░██║░░██║██║░░╚═╝█████═╝░██║░░╚═╝███████║███████║██║██╔██╗██║ // ██╔══██╗██║░░░░░██║░░██║██║░░██╗██╔═██╗░██║░░██╗██╔══██║██╔══██║██║██║╚████║ // ██████╦╝███████╗╚█████╔╝╚█████╔╝██║░╚██╗╚█████╔╝██║░░██║██║░░██║██║██║░╚███║ // ╚═════╝░╚══════╝░╚════╝░░╚════╝░╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝╚═╝░░╚══╝ // ░█████╗░██╗░░░██╗░██████╗████████╗██████╗░░█████╗░██╗░░░░░██╗░█████╗░ // ██╔══██╗██║░░░██║██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║░░░░░██║██╔══██╗ // ███████║██║░░░██║╚█████╗░░░░██║░░░██████╔╝███████║██║░░░░░██║███████║ // ██╔══██║██║░░░██║░╚═══██╗░░░██║░░░██╔══██╗██╔══██║██║░░░░░██║██╔══██║ // ██║░░██║╚██████╔╝██████╔╝░░░██║░░░██║░░██║██║░░██║███████╗██║██║░░██║ // ╚═╝░░╚═╝░╚═════╝░╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚══════╝╚═╝╚═╝░░╚═╝ // Blockchainaustralia.com.au // ███╗░░██╗███████╗░█████╗░ ██╗░░░░░███████╗░██████╗░░█████╗░██╗░░░░░ // ████╗░██║██╔════╝██╔══██╗ ██║░░░░░██╔════╝██╔════╝░██╔══██╗██║░░░░░ // ██╔██╗██║█████╗░░██║░░██║ ██║░░░░░█████╗░░██║░░██╗░███████║██║░░░░░ // ██║╚████║██╔══╝░░██║░░██║ ██║░░░░░██╔══╝░░██║░░╚██╗██╔══██║██║░░░░░ // ██║░╚███║███████╗╚█████╔╝ ███████╗███████╗╚██████╔╝██║░░██║███████╗ // ╚═╝░░╚══╝╚══════╝░╚════╝░ ╚══════╝╚══════╝░╚═════╝░╚═╝░░╚═╝╚══════╝ // Neolegal.com.au // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; contract HalloweenGhoulieNFT is ERC721Enumerable, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using SafeMath for uint256; using Strings for uint256; Counters.Counter private _tokenIdTracker; string private baseTokenURI; uint256 public REVEAL_TIMESTAMP; // Main Settings uint256 public halloweenGhouliePrice; uint256 public maxHalloweenGhouliePerWallet; uint256 public maxHalloweenGhoulies; // Normal Mint Index uint256 public mintIndex; // Leather Face uint256 public maxLeatherFaceGhoulies; uint256 public nextLeatherFaceGhoulie = 1; uint256 public freeLeatherFaceClaimExpires; mapping(address => bool) public leatherFaceWhitelist; mapping(address => bool) public leatherFaceMinted; bool public saleIsActive; bool public baseURICommitted; // V1 address public ghouliesV1; constructor( string memory _name, string memory _symbol, string memory _baseTokenURI, uint256 _maxNFTSupply, uint256 _maxNFTPerWallet, uint256 _price, uint256 _freeLeatherFaceClaimExpires, address _ghouliesV1, uint256 _maxLeatherFaceGhoulies ) ERC721(_name, _symbol) { baseTokenURI = _baseTokenURI; maxHalloweenGhoulies = _maxNFTSupply; maxHalloweenGhouliePerWallet = _maxNFTPerWallet; halloweenGhouliePrice = _price; maxLeatherFaceGhoulies = _maxLeatherFaceGhoulies; mintIndex = maxLeatherFaceGhoulies.add(1); freeLeatherFaceClaimExpires = _freeLeatherFaceClaimExpires; ghouliesV1 = _ghouliesV1; } // EVENTS event Received(address, uint256); event SaleStatus(bool); event GhoulieMinted(address indexed, uint256); event Whitelisted(address indexed, bool); event RevealTimestamp(uint256); receive() external payable { emit Received(msg.sender, msg.value); } function baseURI() public view returns (string memory) { return _baseURI(); } function _baseURI() internal view virtual override returns (string memory) { return baseTokenURI; } function setRevealTimestamp(uint256 revealTimeStamp) public onlyOwner { require(REVEAL_TIMESTAMP == 0, "Already Reviled"); REVEAL_TIMESTAMP = revealTimeStamp; emit RevealTimestamp(revealTimeStamp); } function flipSaleIsActive() external onlyOwner { saleIsActive = !saleIsActive; emit SaleStatus(saleIsActive); } function commitBaseURI() external onlyOwner { require(baseURICommitted == false, "Can't Change base URI anymore!"); baseURICommitted = !baseURICommitted; } function setBaseURI(string memory _newBaseURI) external onlyOwner { require(baseURICommitted == false, "Can't Change base URI anymore!"); baseTokenURI = _newBaseURI; } function adjustSettings(uint256 _price, uint256 _maxNFTPerWallet) external onlyOwner { halloweenGhouliePrice = _price; maxHalloweenGhouliePerWallet = _maxNFTPerWallet; } function whitelistForLeatherFace( address[] calldata _addresses, bool _whiteList ) public onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { leatherFaceWhitelist[_addresses[i]] = _whiteList; emit Whitelisted(_addresses[i], _whiteList); } } function reserveGhoulie(uint256 _amount) public onlyOwner { require( totalSupply().add(_amount) <= maxHalloweenGhoulies, "Maximum Supply Reached!" ); for (uint256 i = 0; i < _amount; i++) { _safeMint(msg.sender, mintIndex); mintIndex++; emit GhoulieMinted(msg.sender, mintIndex); } } function mintLeatherFaceGhoulie() public payable { require( block.timestamp < freeLeatherFaceClaimExpires, "Claim Has Expired!" ); require( leatherFaceWhitelist[msg.sender] == true, "Address Not Whitelisted!" ); require( leatherFaceMinted[msg.sender] == false, "Address Already Minted a Leather Face!" ); require( nextLeatherFaceGhoulie <= maxLeatherFaceGhoulies, "All Leather Faces Claimed!" ); require( balanceOf(msg.sender).add(1) <= maxHalloweenGhouliePerWallet, "Over Max per wallet!" ); require(totalSupply().add(1) <= maxHalloweenGhoulies, "Limit reached"); require(halloweenGhouliePrice <= msg.value, "Not Enough ETH"); leatherFaceMinted[msg.sender] = true; _safeMint(msg.sender, nextLeatherFaceGhoulie); nextLeatherFaceGhoulie++; emit GhoulieMinted(msg.sender, nextLeatherFaceGhoulie); } function airdropHalloweenGhoulies(address[] calldata _addresses) external onlyOwner { require( mintIndex.add(_addresses.length) <= maxHalloweenGhoulies, "Maximum Supply Reached!" ); for (uint256 i = 0; i < _addresses.length; i++) { _safeMint(_addresses[i], mintIndex); mintIndex++; } } function mintHalloweenGhoulies(uint256 numberOfTokens) public payable { require(saleIsActive, "Sale not Active"); require( numberOfTokens.add(balanceOf(msg.sender)) <= maxHalloweenGhouliePerWallet, "Over Max per wallet!" ); require( mintIndex.add(numberOfTokens) <= maxHalloweenGhoulies, "Maximum Supply Reached!" ); require( halloweenGhouliePrice.mul(numberOfTokens) <= msg.value, "Not Enough ETH!" ); for (uint256 i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, mintIndex); mintIndex++; } } function withdraw() external onlyOwner { payable(owner()).transfer(address(this).balance); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); return bytes(_baseURI()).length > 0 ? string( abi.encodePacked(_baseURI(), tokenId.toString(), ".json") ) : ""; } }
// 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 "../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; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../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; /** * @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 "./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 "../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; /** * @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; /** * @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; 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); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"uint256","name":"_maxNFTSupply","type":"uint256"},{"internalType":"uint256","name":"_maxNFTPerWallet","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_freeLeatherFaceClaimExpires","type":"uint256"},{"internalType":"address","name":"_ghouliesV1","type":"address"},{"internalType":"uint256","name":"_maxLeatherFaceGhoulies","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":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"GhoulieMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"RevealTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"SaleStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"Whitelisted","type":"event"},{"inputs":[],"name":"REVEAL_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_maxNFTPerWallet","type":"uint256"}],"name":"adjustSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"airdropHalloweenGhoulies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURICommitted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleIsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freeLeatherFaceClaimExpires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ghouliesV1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"halloweenGhouliePrice","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":"","type":"address"}],"name":"leatherFaceMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"leatherFaceWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxHalloweenGhouliePerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxHalloweenGhoulies","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLeatherFaceGhoulies","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintHalloweenGhoulies","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintLeatherFaceGhoulie","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextLeatherFaceGhoulie","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"reserveGhoulie","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"revealTimeStamp","type":"uint256"}],"name":"setRevealTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"bool","name":"_whiteList","type":"bool"}],"name":"whitelistForLeatherFace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405260016014553480156200001657600080fd5b506040516200579f3803806200579f83398181016040528101906200003c91906200037f565b88888160009080519060200190620000569291906200022f565b5080600190805190602001906200006f9291906200022f565b50505062000092620000866200014960201b60201c565b6200015160201b60201c565b6001600b8190555086600d9080519060200190620000b29291906200022f565b50856011819055508460108190555083600f8190555080601381905550620000ec60016013546200021760201b6200254e1790919060201c565b6012819055508260158190555081601860026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050505050620006d2565b600033905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081836200022791906200050a565b905092915050565b8280546200023d90620005db565b90600052602060002090601f016020900481019282620002615760008555620002ad565b82601f106200027c57805160ff1916838001178555620002ad565b82800160010185558215620002ad579182015b82811115620002ac5782518255916020019190600101906200028f565b5b509050620002bc9190620002c0565b5090565b5b80821115620002db576000816000905550600101620002c1565b5090565b6000620002f6620002f084620004d7565b620004a3565b9050828152602081018484840111156200030f57600080fd5b6200031c848285620005a5565b509392505050565b60008151905062000335816200069e565b92915050565b600082601f8301126200034d57600080fd5b81516200035f848260208601620002df565b91505092915050565b6000815190506200037981620006b8565b92915050565b60008060008060008060008060006101208a8c0312156200039f57600080fd5b60008a015167ffffffffffffffff811115620003ba57600080fd5b620003c88c828d016200033b565b99505060208a015167ffffffffffffffff811115620003e657600080fd5b620003f48c828d016200033b565b98505060408a015167ffffffffffffffff8111156200041257600080fd5b620004208c828d016200033b565b9750506060620004338c828d0162000368565b9650506080620004468c828d0162000368565b95505060a0620004598c828d0162000368565b94505060c06200046c8c828d0162000368565b93505060e06200047f8c828d0162000324565b925050610100620004938c828d0162000368565b9150509295985092959850929598565b6000604051905081810181811067ffffffffffffffff82111715620004cd57620004cc6200066f565b5b8060405250919050565b600067ffffffffffffffff821115620004f557620004f46200066f565b5b601f19601f8301169050602081019050919050565b600062000517826200059b565b915062000524836200059b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200055c576200055b62000611565b5b828201905092915050565b600062000574826200057b565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015620005c5578082015181840152602081019050620005a8565b83811115620005d5576000848401525b50505050565b60006002820490506001821680620005f457607f821691505b602082108114156200060b576200060a62000640565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620006a98162000567565b8114620006b557600080fd5b50565b620006c3816200059b565b8114620006cf57600080fd5b50565b6150bd80620006e26000396000f3fe60806040526004361061026b5760003560e01c806370a0823111610144578063b88d4fde116100b6578063e9aaf47f1161007a578063e9aaf47f14610948578063eb8d244414610971578063ed06f66b1461099c578063f155cbf5146109b3578063f2fde38b146109dc578063f74f9bfd14610a05576102ab565b8063b88d4fde1461085e578063c00f8a9d14610887578063c87b56dd146108b2578063c887dccd146108ef578063e985e9c51461090b576102ab565b806389d850d91161010857806389d850d9146107605780638da5cb5b146107775780638efbb977146107a257806395d89b41146107cd578063a22cb465146107f8578063a762f04c14610821576102ab565b806370a082311461068d578063715018a6146106ca578063758f9c2b146106e15780637e51fd701461070c578063899c41aa14610737576102ab565b80633ccfd60b116101dd57806355f804b3116101a157806355f804b31461059c5780636352211e146105c5578063693150d8146106025780636b8ef2dc1461062d5780636c0360eb146106585780636d8d1e6114610683576102ab565b80633ccfd60b146104b75780634243b9a4146104ce57806342842e0e146104f95780634f6ccce71461052257806352dbd1af1461055f576102ab565b806318160ddd1161022f57806318160ddd146103a757806318e20a38146103d257806323b872dd146103fd5780632423e20f146104265780632caa6cd31461044f5780632f745c591461047a576102ab565b8063018a2c37146102b057806301ffc9a7146102d957806306fdde0314610316578063081812fc14610341578063095ea7b31461037e576102ab565b366102ab577f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f8852587433346040516102a19291906147d2565b60405180910390a1005b600080fd5b3480156102bc57600080fd5b506102d760048036038101906102d29190613c0d565b610a30565b005b3480156102e557600080fd5b5061030060048036038101906102fb9190613b7a565b610b32565b60405161030d91906147fb565b60405180910390f35b34801561032257600080fd5b5061032b610bac565b6040516103389190614816565b60405180910390f35b34801561034d57600080fd5b5061036860048036038101906103639190613c0d565b610c3e565b604051610375919061476b565b60405180910390f35b34801561038a57600080fd5b506103a560048036038101906103a09190613aa1565b610cc3565b005b3480156103b357600080fd5b506103bc610ddb565b6040516103c99190614bf8565b60405180910390f35b3480156103de57600080fd5b506103e7610de8565b6040516103f49190614bf8565b60405180910390f35b34801561040957600080fd5b50610424600480360381019061041f919061399b565b610dee565b005b34801561043257600080fd5b5061044d60048036038101906104489190613c36565b610e4e565b005b34801561045b57600080fd5b50610464610edc565b60405161047191906147fb565b60405180910390f35b34801561048657600080fd5b506104a1600480360381019061049c9190613aa1565b610eef565b6040516104ae9190614bf8565b60405180910390f35b3480156104c357600080fd5b506104cc610f94565b005b3480156104da57600080fd5b506104e3611060565b6040516104f09190614bf8565b60405180910390f35b34801561050557600080fd5b50610520600480360381019061051b919061399b565b611066565b005b34801561052e57600080fd5b5061054960048036038101906105449190613c0d565b611086565b6040516105569190614bf8565b60405180910390f35b34801561056b57600080fd5b5061058660048036038101906105819190613936565b61111d565b60405161059391906147fb565b60405180910390f35b3480156105a857600080fd5b506105c360048036038101906105be9190613bcc565b61113d565b005b3480156105d157600080fd5b506105ec60048036038101906105e79190613c0d565b611229565b6040516105f9919061476b565b60405180910390f35b34801561060e57600080fd5b506106176112db565b6040516106249190614bf8565b60405180910390f35b34801561063957600080fd5b506106426112e1565b60405161064f9190614bf8565b60405180910390f35b34801561066457600080fd5b5061066d6112e7565b60405161067a9190614816565b60405180910390f35b61068b6112f6565b005b34801561069957600080fd5b506106b460048036038101906106af9190613936565b611679565b6040516106c19190614bf8565b60405180910390f35b3480156106d657600080fd5b506106df611731565b005b3480156106ed57600080fd5b506106f66117b9565b6040516107039190614bf8565b60405180910390f35b34801561071857600080fd5b506107216117bf565b60405161072e9190614bf8565b60405180910390f35b34801561074357600080fd5b5061075e60048036038101906107599190613b22565b6117c5565b005b34801561076c57600080fd5b506107756119a7565b005b34801561078357600080fd5b5061078c611aa5565b604051610799919061476b565b60405180910390f35b3480156107ae57600080fd5b506107b7611acf565b6040516107c49190614bf8565b60405180910390f35b3480156107d957600080fd5b506107e2611ad5565b6040516107ef9190614816565b60405180910390f35b34801561080457600080fd5b5061081f600480360381019061081a9190613a65565b611b67565b005b34801561082d57600080fd5b5061084860048036038101906108439190613936565b611ce8565b60405161085591906147fb565b60405180910390f35b34801561086a57600080fd5b50610885600480360381019061088091906139ea565b611d08565b005b34801561089357600080fd5b5061089c611d6a565b6040516108a9919061476b565b60405180910390f35b3480156108be57600080fd5b506108d960048036038101906108d49190613c0d565b611d90565b6040516108e69190614816565b60405180910390f35b61090960048036038101906109049190613c0d565b611e38565b005b34801561091757600080fd5b50610932600480360381019061092d919061395f565b611fdc565b60405161093f91906147fb565b60405180910390f35b34801561095457600080fd5b5061096f600480360381019061096a9190613c0d565b612070565b005b34801561097d57600080fd5b506109866121e0565b60405161099391906147fb565b60405180910390f35b3480156109a857600080fd5b506109b16121f3565b005b3480156109bf57600080fd5b506109da60048036038101906109d59190613add565b6122e1565b005b3480156109e857600080fd5b50610a0360048036038101906109fe9190613936565b612450565b005b348015610a1157600080fd5b50610a1a612548565b604051610a279190614bf8565b60405180910390f35b610a38612564565b73ffffffffffffffffffffffffffffffffffffffff16610a56611aa5565b73ffffffffffffffffffffffffffffffffffffffff1614610aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa390614a78565b60405180910390fd5b6000600e5414610af1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae890614958565b60405180910390fd5b80600e819055507fd30d30ffd37d2eab9e96b9237a42a9c5501af62fd34fa03111b4b77c6d29673681604051610b279190614bf8565b60405180910390a150565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ba55750610ba48261256c565b5b9050919050565b606060008054610bbb90614eb2565b80601f0160208091040260200160405190810160405280929190818152602001828054610be790614eb2565b8015610c345780601f10610c0957610100808354040283529160200191610c34565b820191906000526020600020905b815481529060010190602001808311610c1757829003601f168201915b5050505050905090565b6000610c498261264e565b610c88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7f90614a58565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610cce82611229565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3690614af8565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610d5e612564565b73ffffffffffffffffffffffffffffffffffffffff161480610d8d5750610d8c81610d87612564565b611fdc565b5b610dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc390614998565b60405180910390fd5b610dd683836126ba565b505050565b6000600880549050905090565b600e5481565b610dff610df9612564565b82612773565b610e3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3590614b18565b60405180910390fd5b610e49838383612851565b505050565b610e56612564565b73ffffffffffffffffffffffffffffffffffffffff16610e74611aa5565b73ffffffffffffffffffffffffffffffffffffffff1614610eca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec190614a78565b60405180910390fd5b81600f81905550806010819055505050565b601860019054906101000a900460ff1681565b6000610efa83611679565b8210610f3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3290614858565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610f9c612564565b73ffffffffffffffffffffffffffffffffffffffff16610fba611aa5565b73ffffffffffffffffffffffffffffffffffffffff1614611010576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100790614a78565b60405180910390fd5b611018611aa5565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561105d573d6000803e3d6000fd5b50565b60135481565b61108183838360405180602001604052806000815250611d08565b505050565b6000611090610ddb565b82106110d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c890614b58565b60405180910390fd5b6008828154811061110b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001549050919050565b60166020528060005260406000206000915054906101000a900460ff1681565b611145612564565b73ffffffffffffffffffffffffffffffffffffffff16611163611aa5565b73ffffffffffffffffffffffffffffffffffffffff16146111b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b090614a78565b60405180910390fd5b60001515601860019054906101000a900460ff1615151461120f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120690614838565b60405180910390fd5b80600d9080519060200190611225929190613710565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156112d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c9906149d8565b60405180910390fd5b80915050919050565b60145481565b60105481565b60606112f1612aad565b905090565b601554421061133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133190614bb8565b60405180910390fd5b60011515601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146113cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c4906149f8565b60405180910390fd5b60001515601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611460576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145790614b98565b60405180910390fd5b60135460145411156114a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149e90614bd8565b60405180910390fd5b6010546114c660016114b833611679565b61254e90919063ffffffff16565b1115611507576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fe90614b38565b60405180910390fd5b6011546115256001611517610ddb565b61254e90919063ffffffff16565b1115611566576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155d90614938565b60405180910390fd5b34600f5411156115ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a2906148d8565b60405180910390fd5b6001601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061160f33601454612b3f565b6014600081548092919061162290614ee4565b91905055503373ffffffffffffffffffffffffffffffffffffffff167fc20105a18c3209b5714c9cd02d9e13638eb139a734bbf0660e3224050c5371a460145460405161166f9190614bf8565b60405180910390a2565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e1906149b8565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611739612564565b73ffffffffffffffffffffffffffffffffffffffff16611757611aa5565b73ffffffffffffffffffffffffffffffffffffffff16146117ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a490614a78565b60405180910390fd5b6117b76000612b5d565b565b60115481565b600f5481565b6117cd612564565b73ffffffffffffffffffffffffffffffffffffffff166117eb611aa5565b73ffffffffffffffffffffffffffffffffffffffff1614611841576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183890614a78565b60405180910390fd5b60005b838390508110156119a157816016600086868581811061188d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906118a29190613936565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555083838281811061192c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906119419190613936565b73ffffffffffffffffffffffffffffffffffffffff167fa54714518c5d275fdcd3d2a461e4858e4e8cb04fb93cd0bca9d6d34115f264408360405161198691906147fb565b60405180910390a2808061199990614ee4565b915050611844565b50505050565b6119af612564565b73ffffffffffffffffffffffffffffffffffffffff166119cd611aa5565b73ffffffffffffffffffffffffffffffffffffffff1614611a23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1a90614a78565b60405180910390fd5b60001515601860019054906101000a900460ff16151514611a79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7090614838565b60405180910390fd5b601860019054906101000a900460ff1615601860016101000a81548160ff021916908315150217905550565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60155481565b606060018054611ae490614eb2565b80601f0160208091040260200160405190810160405280929190818152602001828054611b1090614eb2565b8015611b5d5780601f10611b3257610100808354040283529160200191611b5d565b820191906000526020600020905b815481529060010190602001808311611b4057829003601f168201915b5050505050905090565b611b6f612564565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611bdd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd490614918565b60405180910390fd5b8060056000611bea612564565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611c97612564565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611cdc91906147fb565b60405180910390a35050565b60176020528060005260406000206000915054906101000a900460ff1681565b611d19611d13612564565b83612773565b611d58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4f90614b18565b60405180910390fd5b611d6484848484612c23565b50505050565b601860029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060611d9b8261264e565b611dda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd190614ab8565b60405180910390fd5b6000611de4612aad565b5111611dff5760405180602001604052806000815250611e31565b611e07612aad565b611e1083612c7f565b604051602001611e2192919061473c565b6040516020818303038152906040525b9050919050565b601860009054906101000a900460ff16611e87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7e90614ad8565b60405180910390fd5b601054611ea5611e9633611679565b8361254e90919063ffffffff16565b1115611ee6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611edd90614b38565b60405180910390fd5b601154611efe8260125461254e90919063ffffffff16565b1115611f3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3690614b78565b60405180910390fd5b34611f5582600f54612e2c90919063ffffffff16565b1115611f96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8d90614a38565b60405180910390fd5b60005b81811015611fd857611fad33601254612b3f565b60126000815480929190611fc090614ee4565b91905055508080611fd090614ee4565b915050611f99565b5050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b612078612564565b73ffffffffffffffffffffffffffffffffffffffff16612096611aa5565b73ffffffffffffffffffffffffffffffffffffffff16146120ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e390614a78565b60405180910390fd5b601154612109826120fb610ddb565b61254e90919063ffffffff16565b111561214a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214190614b78565b60405180910390fd5b60005b818110156121dc5761216133601254612b3f565b6012600081548092919061217490614ee4565b91905055503373ffffffffffffffffffffffffffffffffffffffff167fc20105a18c3209b5714c9cd02d9e13638eb139a734bbf0660e3224050c5371a46012546040516121c19190614bf8565b60405180910390a280806121d490614ee4565b91505061214d565b5050565b601860009054906101000a900460ff1681565b6121fb612564565b73ffffffffffffffffffffffffffffffffffffffff16612219611aa5565b73ffffffffffffffffffffffffffffffffffffffff161461226f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226690614a78565b60405180910390fd5b601860009054906101000a900460ff1615601860006101000a81548160ff0219169083151502179055507f750a81729e793d03eedc1b2c940400869f0787027c29f46e7cd3043525e83f36601860009054906101000a900460ff166040516122d791906147fb565b60405180910390a1565b6122e9612564565b73ffffffffffffffffffffffffffffffffffffffff16612307611aa5565b73ffffffffffffffffffffffffffffffffffffffff161461235d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161235490614a78565b60405180910390fd5b6011546123788383905060125461254e90919063ffffffff16565b11156123b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b090614b78565b60405180910390fd5b60005b8282905081101561244b57612420838383818110612403577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906124189190613936565b601254612b3f565b6012600081548092919061243390614ee4565b9190505550808061244390614ee4565b9150506123bc565b505050565b612458612564565b73ffffffffffffffffffffffffffffffffffffffff16612476611aa5565b73ffffffffffffffffffffffffffffffffffffffff16146124cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c390614a78565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561253c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161253390614898565b60405180910390fd5b61254581612b5d565b50565b60125481565b6000818361255c9190614ce7565b905092915050565b600033905090565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061263757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612647575061264682612e42565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661272d83611229565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061277e8261264e565b6127bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b490614978565b60405180910390fd5b60006127c883611229565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061283757508373ffffffffffffffffffffffffffffffffffffffff1661281f84610c3e565b73ffffffffffffffffffffffffffffffffffffffff16145b8061284857506128478185611fdc565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661287182611229565b73ffffffffffffffffffffffffffffffffffffffff16146128c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128be90614a98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161292e906148f8565b60405180910390fd5b612942838383612eac565b61294d6000826126ba565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461299d9190614dc8565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129f49190614ce7565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6060600d8054612abc90614eb2565b80601f0160208091040260200160405190810160405280929190818152602001828054612ae890614eb2565b8015612b355780601f10612b0a57610100808354040283529160200191612b35565b820191906000526020600020905b815481529060010190602001808311612b1857829003601f168201915b5050505050905090565b612b59828260405180602001604052806000815250612fc0565b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612c2e848484612851565b612c3a8484848461301b565b612c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7090614878565b60405180910390fd5b50505050565b60606000821415612cc7576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612e27565b600082905060005b60008214612cf9578080612ce290614ee4565b915050600a82612cf29190614d3d565b9150612ccf565b60008167ffffffffffffffff811115612d3b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d6d5781602001600182028036833780820191505090505b5090505b60008514612e2057600182612d869190614dc8565b9150600a85612d959190614f2d565b6030612da19190614ce7565b60f81b818381518110612ddd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612e199190614d3d565b9450612d71565b8093505050505b919050565b60008183612e3a9190614d6e565b905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612eb78383836131b2565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612efa57612ef5816131b7565b612f39565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612f3857612f378382613200565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612f7c57612f778161336d565b612fbb565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612fba57612fb982826134b0565b5b5b505050565b612fca838361352f565b612fd7600084848461301b565b613016576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161300d90614878565b60405180910390fd5b505050565b600061303c8473ffffffffffffffffffffffffffffffffffffffff166136fd565b156131a5578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613065612564565b8786866040518563ffffffff1660e01b81526004016130879493929190614786565b602060405180830381600087803b1580156130a157600080fd5b505af19250505080156130d257506040513d601f19601f820116820180604052508101906130cf9190613ba3565b60015b613155573d8060008114613102576040519150601f19603f3d011682016040523d82523d6000602084013e613107565b606091505b5060008151141561314d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161314490614878565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506131aa565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161320d84611679565b6132179190614dc8565b90506000600760008481526020019081526020016000205490508181146132fc576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506133819190614dc8565b90506000600960008481526020019081526020016000205490506000600883815481106133d7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001549050806008838154811061341f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480613494577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006134bb83611679565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561359f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161359690614a18565b60405180910390fd5b6135a88161264e565b156135e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135df906148b8565b60405180910390fd5b6135f460008383612eac565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546136449190614ce7565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b82805461371c90614eb2565b90600052602060002090601f01602090048101928261373e5760008555613785565b82601f1061375757805160ff1916838001178555613785565b82800160010185558215613785579182015b82811115613784578251825591602001919060010190613769565b5b5090506137929190613796565b5090565b5b808211156137af576000816000905550600101613797565b5090565b60006137c66137c184614c44565b614c13565b9050828152602081018484840111156137de57600080fd5b6137e9848285614e70565b509392505050565b60006138046137ff84614c74565b614c13565b90508281526020810184848401111561381c57600080fd5b613827848285614e70565b509392505050565b60008135905061383e8161502b565b92915050565b60008083601f84011261385657600080fd5b8235905067ffffffffffffffff81111561386f57600080fd5b60208301915083602082028301111561388757600080fd5b9250929050565b60008135905061389d81615042565b92915050565b6000813590506138b281615059565b92915050565b6000815190506138c781615059565b92915050565b600082601f8301126138de57600080fd5b81356138ee8482602086016137b3565b91505092915050565b600082601f83011261390857600080fd5b81356139188482602086016137f1565b91505092915050565b60008135905061393081615070565b92915050565b60006020828403121561394857600080fd5b60006139568482850161382f565b91505092915050565b6000806040838503121561397257600080fd5b60006139808582860161382f565b92505060206139918582860161382f565b9150509250929050565b6000806000606084860312156139b057600080fd5b60006139be8682870161382f565b93505060206139cf8682870161382f565b92505060406139e086828701613921565b9150509250925092565b60008060008060808587031215613a0057600080fd5b6000613a0e8782880161382f565b9450506020613a1f8782880161382f565b9350506040613a3087828801613921565b925050606085013567ffffffffffffffff811115613a4d57600080fd5b613a59878288016138cd565b91505092959194509250565b60008060408385031215613a7857600080fd5b6000613a868582860161382f565b9250506020613a978582860161388e565b9150509250929050565b60008060408385031215613ab457600080fd5b6000613ac28582860161382f565b9250506020613ad385828601613921565b9150509250929050565b60008060208385031215613af057600080fd5b600083013567ffffffffffffffff811115613b0a57600080fd5b613b1685828601613844565b92509250509250929050565b600080600060408486031215613b3757600080fd5b600084013567ffffffffffffffff811115613b5157600080fd5b613b5d86828701613844565b93509350506020613b708682870161388e565b9150509250925092565b600060208284031215613b8c57600080fd5b6000613b9a848285016138a3565b91505092915050565b600060208284031215613bb557600080fd5b6000613bc3848285016138b8565b91505092915050565b600060208284031215613bde57600080fd5b600082013567ffffffffffffffff811115613bf857600080fd5b613c04848285016138f7565b91505092915050565b600060208284031215613c1f57600080fd5b6000613c2d84828501613921565b91505092915050565b60008060408385031215613c4957600080fd5b6000613c5785828601613921565b9250506020613c6885828601613921565b9150509250929050565b613c7b81614dfc565b82525050565b613c8a81614e0e565b82525050565b6000613c9b82614ca4565b613ca58185614cba565b9350613cb5818560208601614e7f565b613cbe8161501a565b840191505092915050565b6000613cd482614caf565b613cde8185614ccb565b9350613cee818560208601614e7f565b613cf78161501a565b840191505092915050565b6000613d0d82614caf565b613d178185614cdc565b9350613d27818560208601614e7f565b80840191505092915050565b6000613d40601e83614ccb565b91507f43616e2774204368616e676520626173652055524920616e796d6f72652100006000830152602082019050919050565b6000613d80602b83614ccb565b91507f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008301527f74206f6620626f756e64730000000000000000000000000000000000000000006020830152604082019050919050565b6000613de6603283614ccb565b91507f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008301527f63656976657220696d706c656d656e74657200000000000000000000000000006020830152604082019050919050565b6000613e4c602683614ccb565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613eb2601c83614ccb565b91507f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006000830152602082019050919050565b6000613ef2600e83614ccb565b91507f4e6f7420456e6f756768204554480000000000000000000000000000000000006000830152602082019050919050565b6000613f32602483614ccb565b91507f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613f98601983614ccb565b91507f4552433732313a20617070726f766520746f2063616c6c6572000000000000006000830152602082019050919050565b6000613fd8600d83614ccb565b91507f4c696d69742072656163686564000000000000000000000000000000000000006000830152602082019050919050565b6000614018600f83614ccb565b91507f416c726561647920526576696c656400000000000000000000000000000000006000830152602082019050919050565b6000614058602c83614ccb565b91507f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b60006140be603883614ccb565b91507f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008301527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006020830152604082019050919050565b6000614124602a83614ccb565b91507f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008301527f726f2061646472657373000000000000000000000000000000000000000000006020830152604082019050919050565b600061418a602983614ccb565b91507f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008301527f656e7420746f6b656e00000000000000000000000000000000000000000000006020830152604082019050919050565b60006141f0601883614ccb565b91507f41646472657373204e6f742057686974656c69737465642100000000000000006000830152602082019050919050565b6000614230602083614ccb565b91507f4552433732313a206d696e7420746f20746865207a65726f20616464726573736000830152602082019050919050565b6000614270600f83614ccb565b91507f4e6f7420456e6f756768204554482100000000000000000000000000000000006000830152602082019050919050565b60006142b0602c83614ccb565b91507f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008301527f697374656e7420746f6b656e00000000000000000000000000000000000000006020830152604082019050919050565b6000614316600583614cdc565b91507f2e6a736f6e0000000000000000000000000000000000000000000000000000006000830152600582019050919050565b6000614356602083614ccb565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000614396602983614ccb565b91507f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008301527f73206e6f74206f776e00000000000000000000000000000000000000000000006020830152604082019050919050565b60006143fc602f83614ccb565b91507f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008301527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006020830152604082019050919050565b6000614462600f83614ccb565b91507f53616c65206e6f742041637469766500000000000000000000000000000000006000830152602082019050919050565b60006144a2602183614ccb565b91507f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614508603183614ccb565b91507f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008301527f776e6572206e6f7220617070726f7665640000000000000000000000000000006020830152604082019050919050565b600061456e601483614ccb565b91507f4f766572204d6178207065722077616c6c6574210000000000000000000000006000830152602082019050919050565b60006145ae602c83614ccb565b91507f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008301527f7574206f6620626f756e647300000000000000000000000000000000000000006020830152604082019050919050565b6000614614601783614ccb565b91507f4d6178696d756d20537570706c792052656163686564210000000000000000006000830152602082019050919050565b6000614654602683614ccb565b91507f4164647265737320416c7265616479204d696e7465642061204c65617468657260008301527f20466163652100000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006146ba601283614ccb565b91507f436c61696d2048617320457870697265642100000000000000000000000000006000830152602082019050919050565b60006146fa601a83614ccb565b91507f416c6c204c65617468657220466163657320436c61696d6564210000000000006000830152602082019050919050565b61473681614e66565b82525050565b60006147488285613d02565b91506147548284613d02565b915061475f82614309565b91508190509392505050565b60006020820190506147806000830184613c72565b92915050565b600060808201905061479b6000830187613c72565b6147a86020830186613c72565b6147b5604083018561472d565b81810360608301526147c78184613c90565b905095945050505050565b60006040820190506147e76000830185613c72565b6147f4602083018461472d565b9392505050565b60006020820190506148106000830184613c81565b92915050565b600060208201905081810360008301526148308184613cc9565b905092915050565b6000602082019050818103600083015261485181613d33565b9050919050565b6000602082019050818103600083015261487181613d73565b9050919050565b6000602082019050818103600083015261489181613dd9565b9050919050565b600060208201905081810360008301526148b181613e3f565b9050919050565b600060208201905081810360008301526148d181613ea5565b9050919050565b600060208201905081810360008301526148f181613ee5565b9050919050565b6000602082019050818103600083015261491181613f25565b9050919050565b6000602082019050818103600083015261493181613f8b565b9050919050565b6000602082019050818103600083015261495181613fcb565b9050919050565b600060208201905081810360008301526149718161400b565b9050919050565b600060208201905081810360008301526149918161404b565b9050919050565b600060208201905081810360008301526149b1816140b1565b9050919050565b600060208201905081810360008301526149d181614117565b9050919050565b600060208201905081810360008301526149f18161417d565b9050919050565b60006020820190508181036000830152614a11816141e3565b9050919050565b60006020820190508181036000830152614a3181614223565b9050919050565b60006020820190508181036000830152614a5181614263565b9050919050565b60006020820190508181036000830152614a71816142a3565b9050919050565b60006020820190508181036000830152614a9181614349565b9050919050565b60006020820190508181036000830152614ab181614389565b9050919050565b60006020820190508181036000830152614ad1816143ef565b9050919050565b60006020820190508181036000830152614af181614455565b9050919050565b60006020820190508181036000830152614b1181614495565b9050919050565b60006020820190508181036000830152614b31816144fb565b9050919050565b60006020820190508181036000830152614b5181614561565b9050919050565b60006020820190508181036000830152614b71816145a1565b9050919050565b60006020820190508181036000830152614b9181614607565b9050919050565b60006020820190508181036000830152614bb181614647565b9050919050565b60006020820190508181036000830152614bd1816146ad565b9050919050565b60006020820190508181036000830152614bf1816146ed565b9050919050565b6000602082019050614c0d600083018461472d565b92915050565b6000604051905081810181811067ffffffffffffffff82111715614c3a57614c39614feb565b5b8060405250919050565b600067ffffffffffffffff821115614c5f57614c5e614feb565b5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115614c8f57614c8e614feb565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614cf282614e66565b9150614cfd83614e66565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614d3257614d31614f5e565b5b828201905092915050565b6000614d4882614e66565b9150614d5383614e66565b925082614d6357614d62614f8d565b5b828204905092915050565b6000614d7982614e66565b9150614d8483614e66565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614dbd57614dbc614f5e565b5b828202905092915050565b6000614dd382614e66565b9150614dde83614e66565b925082821015614df157614df0614f5e565b5b828203905092915050565b6000614e0782614e46565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015614e9d578082015181840152602081019050614e82565b83811115614eac576000848401525b50505050565b60006002820490506001821680614eca57607f821691505b60208210811415614ede57614edd614fbc565b5b50919050565b6000614eef82614e66565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614f2257614f21614f5e565b5b600182019050919050565b6000614f3882614e66565b9150614f4383614e66565b925082614f5357614f52614f8d565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b61503481614dfc565b811461503f57600080fd5b50565b61504b81614e0e565b811461505657600080fd5b50565b61506281614e1a565b811461506d57600080fd5b50565b61507981614e66565b811461508457600080fd5b5056fea26469706673582212208ee90583dfa7e1dfda334121a95f7b3e35f54770a0937fc41e0d7a1a08e4ef8a64736f6c634300080000330000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000619dfcad000000000000000000000000f1b4c913a2596ebb3e96f6796ada4fd382d1c07e000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a47686f756c6965207632000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005474c452032000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d7777772e6c696e6b2e636f6d2f00000000000000000000000000000000000000