Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
58 STEN
Holders
21
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
4 STENLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Stencils
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import { IERC721Enumerable } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import { ERC721, ERC721Enumerable, Strings } from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface IStencils is IERC721Enumerable { enum BuyerType { Regular, Free, MinimumPrice } /// @notice Emitted when the hash of the asset generator is set. event AssetGeneratorHashSet(bytes32 indexed assetGeneratorHash); /// @notice Emitted when the base URI is set (or re-set). event BaseURISet(string baseURI); /// @notice Emitted when an account is set as a type of buyer. event BuyerSet(address indexed account, BuyerType indexed buyerType, uint128 promotionalQuantity); /// @notice Emitted when an account has accepted ownership. event OwnershipAccepted(address indexed previousOwner, address indexed owner); /// @notice Emitted when owner proposed an account that can accept ownership. event OwnershipProposed(address indexed owner, address indexed pendingOwner); /// @notice Emitted when a token holder purchased a physical copy. event PhysicalCopyClaimed(uint256 indexed tokenId, address indexed recipient); /// @notice Emitted when the minting parameters have be set. event ParametersSet(uint256 startingPrice, uint256 auctionStages, uint256 physicalPrice, uint256 specialsTarget); /// @notice Emitted when proceeds have been withdrawn to proceeds destination. event ProceedsWithdrawn(address indexed destination, uint256 amount); /// @notice Emitted when an account is set as the destination where proceeds will be withdrawn to. event ProceedsDestinationSet(address indexed account); /*************/ /*** State ***/ /*************/ function LAUNCH_TIMESTAMP() external view returns (uint256 launchTimestamp_); function AUCTION_END_TIMESTAMP() external view returns (uint256 auctionEndTimestamp_); function MAX_SUPPLY() external view returns (uint128 maxSupply_); function assetGeneratorHash() external view returns (bytes32 assetGeneratorHash_); function baseURI() external view returns (string memory baseURI_); function owner() external view returns (address owner_); function pendingOwner() external view returns (address pendingOwner_); function physicalPrice() external view returns (uint256 physicalPrice_); function auctionStages() external view returns (uint256 auctionStages_); function proceedsDestination() external view returns (address proceedsDestination_); function startingPricePerTokenMint() external view returns (uint256 startingPricePerTokenMint_); function specialCount() external view returns (uint128 specialCount_); function specialsTarget() external view returns (uint128 specialsTarget_); /***********************/ /*** Admin Functions ***/ /***********************/ function acceptOwnership() external; function proposeOwnership(address newOwner_) external; function setAssetGeneratorHash(bytes32 assetGeneratorHash_) external; function setBaseURI(string calldata baseURI_) external; function setBuyerInfos(address[] calldata accounts_, BuyerType[] calldata buyerTypes_, uint128[] calldata quantities_) external; function setReseeds(address[] calldata accounts_, uint8[] calldata counts_, uint32[7][] calldata seeds_) external; function setParameters(uint256 startingPricePerTokenMint_, uint256 priceStages_, uint256 physicalPrice_, uint128 specialsTarget_) external; function setProceedsDestination(address proceedsDestination_) external; function withdrawProceeds() external; /**************************/ /*** External Functions ***/ /**************************/ function claim(address destination_, uint128 quantity_, uint128 minQuantity_) external payable returns (uint256[] memory tokenIds_); function give(address[] calldata destinations_, uint256[] calldata amounts_, bool[] calldata physicals_) external; function purchase(address destination_, uint128 quantity_, uint128 minQuantity_) external payable returns (uint256[] memory tokenIds_); function purchasePhysical(uint256 tokenId_) external payable; /***************/ /*** Getters ***/ /***************/ function availableSupply() external view returns (uint256 availableSupply_); function buyerInfoFor(address account_) external view returns (BuyerType buyerType_, uint128 promotionalQuantity_); function reseedInfoFor(address account_) external view returns (uint8 count_, uint32[7] memory seeds_); function contractURI() external view returns (string memory contractURI_); function currentAuctionStage() external view returns (uint256 auctionStage_); function getPurchaseInformationFor(address buyer_) external view returns ( bool canClaim_, uint256 claimableQuantity_, uint256 price_, bool physicalCopyIncluded_, bool specialIncluded_, uint256 auctionStage_, uint256 timeRemaining_ ); function isLive() external view returns (bool isLive_); function isPriceStatic() external view returns (bool priceIsStatic_); function physicalCopyRecipient(uint256 tokenId_) external view returns (address physicalCopyRecipient_); function pricePerTokenMint() external view returns (uint256 pricePerTokenMint_); function timeToLaunch() external view returns (uint256 timeToLaunch_); function tokensOfOwner(address owner_) external view returns (uint256[] memory tokenIds_); } contract Stencils is IStencils, ERC721Enumerable { struct BuyerInfo { BuyerType buyerType; uint128 quantity; } struct ReseedInfo { uint8 count; uint32[7] seeds; } using Strings for uint256; uint128 public immutable MAX_SUPPLY; uint256 public immutable LAUNCH_TIMESTAMP; uint256 public immutable AUCTION_END_TIMESTAMP; address public owner; address public pendingOwner; address public proceedsDestination; bytes32 public assetGeneratorHash; string public baseURI; uint256 public startingPricePerTokenMint; uint256 public auctionStages; uint256 public physicalPrice; uint128 public specialsTarget; uint128 public specialCount; mapping(uint256 => address) public physicalCopyRecipient; mapping(address => BuyerInfo) public buyerInfoFor; mapping(address => ReseedInfo) internal _reseedInfoFor; constructor ( string memory baseURI_, uint128 maxSupply_, uint256 launchTimestamp_, uint256 auctionEndTimestamp_, uint256 startingPricePerTokenMint_, uint256 auctionStages_, uint256 physicalPrice_, uint128 specialsTarget_ ) ERC721("Stencils", "STEN") { baseURI = baseURI_; MAX_SUPPLY = maxSupply_; LAUNCH_TIMESTAMP = launchTimestamp_; AUCTION_END_TIMESTAMP = auctionEndTimestamp_; startingPricePerTokenMint = startingPricePerTokenMint_; require((auctionStages = auctionStages_) > 0, "INVALID_STAGES"); physicalPrice = physicalPrice_; specialsTarget = specialsTarget_; owner = msg.sender; } modifier onlyAfterLaunch() { require(block.timestamp >= LAUNCH_TIMESTAMP, "NOT_LAUNCHED_YET"); _; } modifier onlyBeforeLaunch() { require(block.timestamp < LAUNCH_TIMESTAMP, "ALREADY_LAUNCHED"); _; } modifier onlyOwner() { require(owner == msg.sender, "UNAUTHORIZED"); _; } /***********************/ /*** Admin Functions ***/ /***********************/ function acceptOwnership() external { require(pendingOwner == msg.sender, "UNAUTHORIZED"); emit OwnershipAccepted(owner, msg.sender); owner = msg.sender; pendingOwner = address(0); } function proposeOwnership(address newOwner_) external onlyOwner { emit OwnershipProposed(owner, pendingOwner = newOwner_); } function setAssetGeneratorHash(bytes32 assetGeneratorHash_) external onlyOwner { require(assetGeneratorHash == bytes32(0) || block.timestamp < LAUNCH_TIMESTAMP, "ALREADY_LAUNCHED"); emit AssetGeneratorHashSet(assetGeneratorHash = assetGeneratorHash_); } function setBaseURI(string calldata baseURI_) external onlyOwner { emit BaseURISet(baseURI = baseURI_); } function setBuyerInfos(address[] calldata accounts_, BuyerType[] calldata buyerTypes_, uint128[] calldata quantities_) external onlyOwner onlyBeforeLaunch { for (uint256 i; i < accounts_.length;) { address account = accounts_[i]; BuyerType buyerType = buyerTypes_[i]; uint128 quantity = quantities_[i]; buyerInfoFor[account] = BuyerInfo(buyerType, quantity); emit BuyerSet(account, buyerType, quantity); unchecked { ++i; } } } function setReseeds(address[] calldata accounts_, uint8[] calldata counts_, uint32[7][] calldata seeds_) external onlyOwner onlyBeforeLaunch { for (uint256 i; i < accounts_.length;) { uint8 count = counts_[i]; uint32[7] calldata seeds = seeds_[i]; for (uint256 j; j < 7;) { // The seed at a position should be zero if its position is the count or greater. // The seed at a position should be non-zero if its position is lower than the count. require((seeds[j] == uint32(0)) == (j >= count), "INVALID_COUNT"); unchecked { ++j; } } _reseedInfoFor[accounts_[i]] = ReseedInfo(count, seeds); unchecked { ++i; } } } function setParameters( uint256 startingPricePerTokenMint_, uint256 auctionStages_, uint256 physicalPrice_, uint128 specialsTarget_ ) external onlyOwner onlyBeforeLaunch { require(auctionStages_ > 0, "INVALID_STAGES"); emit ParametersSet( startingPricePerTokenMint = startingPricePerTokenMint_, auctionStages = auctionStages_, physicalPrice = physicalPrice_, specialsTarget = specialsTarget_ ); } function setProceedsDestination(address proceedsDestination_) external onlyOwner { require(proceedsDestination == address(0) || block.timestamp < LAUNCH_TIMESTAMP, "ALREADY_LAUNCHED"); emit ProceedsDestinationSet(proceedsDestination = proceedsDestination_); } function withdrawProceeds() external { uint256 amount = address(this).balance; address destination = proceedsDestination; destination = destination == address(0) ? owner : destination; require(_transferEther(destination, amount), "ETHER_TRANSFER_FAILED"); emit ProceedsWithdrawn(destination, amount); } /**************************/ /*** External Functions ***/ /**************************/ function claim(address destination_, uint128 quantity_, uint128 minQuantity_) external payable onlyAfterLaunch returns (uint256[] memory tokenIds_) { require(destination_ != address(0), "INVALID_DESTINATION"); uint128 count = _getMintCount(quantity_, minQuantity_); // Compute the price this purchase will cost. BuyerInfo storage buyerInfo = buyerInfoFor[msg.sender]; // Prevent a non-preferred buyer from claiming. require(buyerInfo.buyerType != BuyerType.Regular, "NOT_GRANTED"); // Prevent a preferred buyer from claiming more than was alloted with this function. require(buyerInfo.quantity >= count, "NOT_GRANTED"); // If the buyer type is MinimumPrice, then compute the total cost, else it is free. Regular buyers would have buyerInfo.quantity = 0; uint256 totalCost; unchecked { totalCost = buyerInfo.buyerType == BuyerType.MinimumPrice ? count * _pricePerTokenMint(auctionStages) : 0; } if (buyerInfo.quantity == count) { // Delete the buyer info if quantity exactly used. delete buyerInfoFor[msg.sender]; } else { // Else, try to decrement, which will error if trying to claim more than alloted. buyerInfo.quantity -= count; } _checkAndRefundEther(totalCost); // Initialize the array of token IDs to a length of the nfts to be purchased. tokenIds_ = new uint256[](count); while (count > 0) { unchecked { // Get a pseudo random number and generate a token id to mint the molecule NFT. _givePhysical( tokenIds_[--count] = _giveToken(destination_, false) ); } } } function give(address[] calldata destinations_, uint256[] calldata amounts_, bool[] calldata physicals_) external onlyOwner onlyBeforeLaunch { for (uint256 i; i < destinations_.length;) { for (uint256 j; j < amounts_[i];) { uint256 tokenId = _giveToken(destinations_[i], false); if (physicals_[i]) { _givePhysical(tokenId); } unchecked { ++j; } } unchecked { ++i; } } } function purchase(address destination_, uint128 quantity_, uint128 minQuantity_) external payable onlyAfterLaunch returns (uint256[] memory tokenIds_) { require(destination_ != address(0), "INVALID_DESTINATION"); uint128 count = _getMintCount(quantity_, minQuantity_); // Compute the price this purchase will cost. uint256 totalCost; unchecked { totalCost = pricePerTokenMint() * count; } _checkAndRefundEther(totalCost); uint256 auctionStage = currentAuctionStage(); // Initialize the array of token IDs to a length of the nfts to be purchased. tokenIds_ = new uint256[](count); while (count > 0) { unchecked { // Get a pseudo random number and generate a token id to mint the molecule NFT. tokenIds_[--count] = _giveToken(destination_, auctionStage == 1); } if (auctionStage > 2) continue; _givePhysical(tokenIds_[count]); } } function purchasePhysical(uint256 tokenId_) external payable { require(ownerOf(tokenId_) == msg.sender, "NOT_OWNER"); _checkAndRefundEther(physicalPrice); _givePhysical(tokenId_); } /***************/ /*** Getters ***/ /***************/ function availableSupply() external view returns (uint256 availableSupply_) { availableSupply_ = MAX_SUPPLY - totalSupply(); } function contractURI() external view returns (string memory contractURI_) { return baseURI; } function currentAuctionStage() public view returns (uint256 auctionStage_) { if (block.timestamp >= AUCTION_END_TIMESTAMP) return auctionStages; if (block.timestamp < LAUNCH_TIMESTAMP) return 0; auctionStage_ = 1 + (auctionStages * (block.timestamp - LAUNCH_TIMESTAMP)) / (AUCTION_END_TIMESTAMP - LAUNCH_TIMESTAMP); } function getPurchaseInformationFor(address buyer_) external view returns ( bool canClaim_, uint256 claimableQuantity_, uint256 price_, bool physicalCopyIncluded_, bool specialIncluded_, uint256 auctionStage_, uint256 timeRemaining_ ) { BuyerInfo memory buyerInfo = buyerInfoFor[buyer_]; canClaim_ = buyerInfo.buyerType != BuyerType.Regular; claimableQuantity_ = buyerInfo.quantity; price_ = buyerInfo.buyerType == BuyerType.Free ? 0 : buyerInfo.buyerType == BuyerType.MinimumPrice ? _pricePerTokenMint(auctionStages) : pricePerTokenMint(); auctionStage_ = currentAuctionStage(); physicalCopyIncluded_ = canClaim_ || auctionStage_ == 1 || auctionStage_ == 2; specialIncluded_ = auctionStage_ == 1; timeRemaining_ = auctionStage_ == 0 ? LAUNCH_TIMESTAMP - block.timestamp : auctionStage_ == 4 ? 0 : LAUNCH_TIMESTAMP + auctionStage_ * (AUCTION_END_TIMESTAMP - LAUNCH_TIMESTAMP) / auctionStages - block.timestamp; } function isLive() external view returns (bool isLive_) { isLive_ = block.timestamp >= LAUNCH_TIMESTAMP; } function isPriceStatic() external view returns (bool priceIsStatic_) { priceIsStatic_ = block.timestamp >= AUCTION_END_TIMESTAMP; } function pricePerTokenMint() public view returns (uint256 pricePerTokenMint_) { pricePerTokenMint_ = _pricePerTokenMint(currentAuctionStage()); } function reseedInfoFor(address account_) external view returns (uint8 count_, uint32[7] memory seeds_) { ReseedInfo memory reseedInfo = _reseedInfoFor[account_]; count_ = reseedInfo.count; seeds_ = reseedInfo.seeds; } function timeToLaunch() external view returns (uint256 timeToLaunch_) { timeToLaunch_ = LAUNCH_TIMESTAMP > block.timestamp ? LAUNCH_TIMESTAMP - block.timestamp : 0; } function tokensOfOwner(address owner_) public view returns (uint256[] memory tokenIds_) { uint256 balance = balanceOf(owner_); tokenIds_ = new uint256[](balance); for (uint256 i; i < balance;) { tokenIds_[i] = tokenOfOwnerByIndex(owner_, i); unchecked { ++i; } } } function tokenURI(uint256 tokenId_) public override view returns (string memory tokenURI_) { require(_exists(tokenId_), "ERC721Metadata: URI query for nonexistent token"); string memory baseURICache = baseURI; tokenURI_ = bytes(baseURICache).length > 0 ? string(abi.encodePacked(baseURICache, "/", tokenId_.toString())) : ""; } /**************************/ /*** Internal Functions ***/ /**************************/ function _beforeTokenTransfer(address from_, address to_, uint256 tokenId_) internal override { // Can mint before launch, but transfers and burns can only happen after launch. require(from_ == address(0) || block.timestamp >= LAUNCH_TIMESTAMP, "NOT_LAUNCHED_YET"); super._beforeTokenTransfer(from_, to_, tokenId_); } function _checkAndRefundEther(uint256 totalCost_) internal { // Require that enough ether was provided. require(msg.value >= totalCost_, "INSUFFICIENT_VALUE"); if (msg.value > totalCost_) { // If extra, require that it is successfully returned to the caller. unchecked { require(_transferEther(msg.sender, msg.value - totalCost_), "REFUND_FAILED"); } } } function _generatePseudoRandomNumber() internal view returns (uint256 pseudoRandomNumber_) { unchecked { pseudoRandomNumber_ = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), msg.sender, totalSupply(), gasleft()))); } } function _generateSeed(uint256 pseudoRandomNumber_, bool special_) internal pure returns (uint32 seed_) { // Keep only 32 bits of pseudoRandomNumber. seed_ = uint32(pseudoRandomNumber_ >> 224); // Set/unset the special marker. if (special_) { // If special, ensure 11th bit from right is set. seed_ |= 1 << 10; } else { // If not special, ensure 11th bit from right is not set. seed_ &= ~(uint32(1) << 10); } } function _generateTokenId(uint32 seed_, uint32 sequence_) internal pure returns (uint256 tokenId_) { // Prepend (add to the left) seed with sequence. tokenId_ = uint256(seed_) + (uint256(sequence_) << 32); } function _getMintCount(uint128 quantity_, uint128 minQuantity_) internal view returns (uint128 mintCount_) { // Get the number of stencils available and determine how many stencils will be purchased in this call. uint128 available = uint128(MAX_SUPPLY - totalSupply()); mintCount_ = available >= quantity_ ? quantity_ : available; // Prevent a purchase of 0 stencils, as well as a purchase of less stencils than the user expected. require(mintCount_ != 0, "NO_STENCILS_AVAILABLE"); require(mintCount_ >= minQuantity_, "CANNOT_FULLFIL_REQUEST"); } function _givePhysical(uint256 tokenId_) internal { require(physicalCopyRecipient[tokenId_] == address(0), "ALREADY_CLAIMED"); emit PhysicalCopyClaimed( tokenId_, physicalCopyRecipient[tokenId_] = ownerOf(tokenId_) ); } function _giveToken(address destination_, bool special_) internal returns (uint256 tokenId_) { require(MAX_SUPPLY > totalSupply(), "NO_STENCILS_AVAILABLE"); // Can safely cast because MAX_SUPPLY < 4_294_967_295. uint32 sequence = uint32(totalSupply() + 1); ReseedInfo storage reseedInfo = _reseedInfoFor[msg.sender]; uint8 seedCount = reseedInfo.count; if (seedCount > 0) { // Reduce the seed count so that it is a valid index and a valid new seed count. --seedCount; _mint( destination_, tokenId_ = _generateTokenId( reseedInfo.seeds[seedCount], sequence ) ); // Clear the seed at that index and set the new seed count. reseedInfo.seeds[seedCount] = 0; reseedInfo.count = seedCount; } else { // If not explicitly giving a special, then if there is still special supply, there is a 5% chance of getting one anyway. if (!special_ && (specialCount < specialsTarget)) { special_ = (_generatePseudoRandomNumber() % 20) == 0; } if (special_) { ++specialCount; } // Get a pseudo random number and generate a token id from the moleculeType and randomNumber (saving it in the array of token IDs) and mint the molecule NFT. _mint(destination_, tokenId_ = _generateTokenId(_generateSeed(_generatePseudoRandomNumber(), special_), sequence)); } } function _pricePerTokenMint(uint256 auctionStage_) internal view returns (uint256 pricePerTokenMint_) { pricePerTokenMint_ = startingPricePerTokenMint; while (auctionStage_ > 1) { pricePerTokenMint_ /= 2; --auctionStage_; } } function _transferEther(address destination_, uint256 amount_) internal returns (bool success_) { ( success_, ) = destination_.call{ value: amount_ }(""); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) 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 // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) 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: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); 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 overridden 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 token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_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: caller is not token 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: caller is not token 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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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); _afterTokenTransfer(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); _afterTokenTransfer(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 from incorrect owner"); 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); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly 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 {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
{ "optimizer": { "enabled": true, "runs": 20000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"uint128","name":"maxSupply_","type":"uint128"},{"internalType":"uint256","name":"launchTimestamp_","type":"uint256"},{"internalType":"uint256","name":"auctionEndTimestamp_","type":"uint256"},{"internalType":"uint256","name":"startingPricePerTokenMint_","type":"uint256"},{"internalType":"uint256","name":"auctionStages_","type":"uint256"},{"internalType":"uint256","name":"physicalPrice_","type":"uint256"},{"internalType":"uint128","name":"specialsTarget_","type":"uint128"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"assetGeneratorHash","type":"bytes32"}],"name":"AssetGeneratorHashSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"enum IStencils.BuyerType","name":"buyerType","type":"uint8"},{"indexed":false,"internalType":"uint128","name":"promotionalQuantity","type":"uint128"}],"name":"BuyerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"OwnershipAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startingPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"auctionStages","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"physicalPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"specialsTarget","type":"uint256"}],"name":"ParametersSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"PhysicalCopyClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"ProceedsDestinationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ProceedsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"AUCTION_END_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LAUNCH_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assetGeneratorHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionStages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableSupply","outputs":[{"internalType":"uint256","name":"availableSupply_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"buyerInfoFor","outputs":[{"internalType":"enum IStencils.BuyerType","name":"buyerType","type":"uint8"},{"internalType":"uint128","name":"quantity","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"destination_","type":"address"},{"internalType":"uint128","name":"quantity_","type":"uint128"},{"internalType":"uint128","name":"minQuantity_","type":"uint128"}],"name":"claim","outputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentAuctionStage","outputs":[{"internalType":"uint256","name":"auctionStage_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"buyer_","type":"address"}],"name":"getPurchaseInformationFor","outputs":[{"internalType":"bool","name":"canClaim_","type":"bool"},{"internalType":"uint256","name":"claimableQuantity_","type":"uint256"},{"internalType":"uint256","name":"price_","type":"uint256"},{"internalType":"bool","name":"physicalCopyIncluded_","type":"bool"},{"internalType":"bool","name":"specialIncluded_","type":"bool"},{"internalType":"uint256","name":"auctionStage_","type":"uint256"},{"internalType":"uint256","name":"timeRemaining_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"destinations_","type":"address[]"},{"internalType":"uint256[]","name":"amounts_","type":"uint256[]"},{"internalType":"bool[]","name":"physicals_","type":"bool[]"}],"name":"give","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLive","outputs":[{"internalType":"bool","name":"isLive_","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPriceStatic","outputs":[{"internalType":"bool","name":"priceIsStatic_","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"physicalCopyRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"physicalPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerTokenMint","outputs":[{"internalType":"uint256","name":"pricePerTokenMint_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proceedsDestination","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"proposeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"destination_","type":"address"},{"internalType":"uint128","name":"quantity_","type":"uint128"},{"internalType":"uint128","name":"minQuantity_","type":"uint128"}],"name":"purchase","outputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"purchasePhysical","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"reseedInfoFor","outputs":[{"internalType":"uint8","name":"count_","type":"uint8"},{"internalType":"uint32[7]","name":"seeds_","type":"uint32[7]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"assetGeneratorHash_","type":"bytes32"}],"name":"setAssetGeneratorHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts_","type":"address[]"},{"internalType":"enum IStencils.BuyerType[]","name":"buyerTypes_","type":"uint8[]"},{"internalType":"uint128[]","name":"quantities_","type":"uint128[]"}],"name":"setBuyerInfos","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startingPricePerTokenMint_","type":"uint256"},{"internalType":"uint256","name":"auctionStages_","type":"uint256"},{"internalType":"uint256","name":"physicalPrice_","type":"uint256"},{"internalType":"uint128","name":"specialsTarget_","type":"uint128"}],"name":"setParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proceedsDestination_","type":"address"}],"name":"setProceedsDestination","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts_","type":"address[]"},{"internalType":"uint8[]","name":"counts_","type":"uint8[]"},{"internalType":"uint32[7][]","name":"seeds_","type":"uint32[7][]"}],"name":"setReseeds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"specialCount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"specialsTarget","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingPricePerTokenMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeToLaunch","outputs":[{"internalType":"uint256","name":"timeToLaunch_","type":"uint256"}],"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":"tokenURI_","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"tokenIds_","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawProceeds","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b50604051620055e3380380620055e3833981016040819052620000349162000183565b604051806040016040528060088152602001675374656e63696c7360c01b8152506040518060400160405280600481526020016329aa22a760e11b81525081600090816200008391906200033d565b5060016200009282826200033d565b50600e9150620000a5905089826200033d565b506001600160801b03871660805260a086905260c0859052600f8490556010839055826200010a5760405162461bcd60e51b815260206004820152600e60248201526d494e56414c49445f53544147455360901b604482015260640160405180910390fd5b601191909155601280546001600160801b039092166001600160801b03199092169190911790555050600a80546001600160a01b03191633179055506200040992505050565b634e487b7160e01b600052604160045260246000fd5b80516001600160801b03811681146200017e57600080fd5b919050565b600080600080600080600080610100898b031215620001a157600080fd5b88516001600160401b0380821115620001b957600080fd5b818b0191508b601f830112620001ce57600080fd5b815181811115620001e357620001e362000150565b604051601f8201601f19908116603f011681019083821181831017156200020e576200020e62000150565b81604052828152602093508e848487010111156200022b57600080fd5b600091505b828210156200024f578482018401518183018501529083019062000230565b6000848483010152809c505050506200026a818c0162000166565b9850505060408901519550606089015194506080890151935060a0890151925060c089015191506200029f60e08a0162000166565b90509295985092959890939650565b600181811c90821680620002c357607f821691505b602082108103620002e457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033857600081815260208120601f850160051c81016020861015620003135750805b601f850160051c820191505b8181101562000334578281556001016200031f565b5050505b505050565b81516001600160401b0381111562000359576200035962000150565b62000371816200036a8454620002ae565b84620002ea565b602080601f831160018114620003a95760008415620003905750858301515b600019600386901b1c1916600185901b17855562000334565b600085815260208120601f198616915b82811015620003da57888601518255948401946001909101908401620003b9565b5085821015620003f95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c0516150fb620004e86000396000818161089f015281816109db01528181611b0a01528181611bbe0152611c3e0152600081816108f501528181610a660152818161148a015281816116b101528181611ae901528181611b4801528181611b8801528181611bec01528181611c1d01528181611c6701528181611d1701528181611fc2015281816121da0152818161227f0152818161284901528181612879015281816128c201528181612b340152613b740152600081816104a301528181611589015281816135df01526138e501526150fb6000f3fe6080604052600436106103555760003560e01c806395d89b41116101bb578063c2232c82116100f7578063e8a3d48511610095578063f2ba4fe31161006f578063f2ba4fe314610ade578063f63c5f7414610af3578063fe0ee37b14610b06578063fe1859ab14610b4357600080fd5b8063e8a3d48514610a3f578063e954f41d14610a54578063e985e9c514610a8857600080fd5b8063cbc385ba116100d1578063cbc385ba1461099b578063cec00eaf146109c9578063d557c4c9146109fd578063e30c397814610a1257600080fd5b8063c2232c8214610952578063c6dd84aa14610968578063c87b56dd1461097b57600080fd5b8063b038f8bd11610164578063b88d4fde1161013e578063b88d4fde146108c6578063b8f7a665146108e6578063bed83d6e1461091c578063c0c4de3c1461093257600080fd5b8063b038f8bd14610850578063b1ac1eaf14610870578063b1b89a1a1461089057600080fd5b8063a22cb46511610195578063a22cb465146107c2578063a841d5f3146107e2578063a926f1731461083b57600080fd5b806395d89b41146107715780639cfc1d53146107865780639d8221b81461079957600080fd5b80636352211e116102955780637d3e71911161023357806386f8e2d11161020d57806386f8e2d1146106e25780638da5cb5b1461070f5780638f6c1fb71461073c5780639038e6931461075c57600080fd5b80637d3e7191146106805780637ecc2b56146106a05780638462151c146106b557600080fd5b80636e671eb01161026f5780636e671eb01461061557806370a082311461062b578063710bf3221461064b57806379ba50971461066b57600080fd5b80636352211e1461059d5780636c0360eb146105bd5780636ca4ebfb146105d257600080fd5b806323b872dd1161030257806342842e0e116102dc57806342842e0e146104e65780634d63db31146105065780634f6ccce71461055d57806355f804b31461057d57600080fd5b806323b872dd146104515780632f745c591461047157806332cb6b0c1461049157600080fd5b8063095ea7b311610333578063095ea7b3146103f657806317bbb63b1461041857806318160ddd1461043c57600080fd5b806301ffc9a71461035a57806306fdde031461038f578063081812fc146103b1575b600080fd5b34801561036657600080fd5b5061037a6103753660046143f5565b610b63565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610bbf565b6040516103869190614480565b3480156103bd57600080fd5b506103d16103cc366004614493565b610c51565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610386565b34801561040257600080fd5b506104166104113660046144d0565b610c85565b005b34801561042457600080fd5b5061042e60105481565b604051908152602001610386565b34801561044857600080fd5b5060085461042e565b34801561045d57600080fd5b5061041661046c3660046144fa565b610de2565b34801561047d57600080fd5b5061042e61048c3660046144d0565b610e69565b34801561049d57600080fd5b506104c57f000000000000000000000000000000000000000000000000000000000000000081565b6040516fffffffffffffffffffffffffffffffff9091168152602001610386565b3480156104f257600080fd5b506104166105013660046144fa565b610f1e565b34801561051257600080fd5b5061054f610521366004614536565b60146020526000908152604090205460ff81169061010090046fffffffffffffffffffffffffffffffff1682565b604051610386929190614580565b34801561056957600080fd5b5061042e610578366004614493565b610f39565b34801561058957600080fd5b506104166105983660046145dc565b610fdd565b3480156105a957600080fd5b506103d16105b8366004614493565b61108b565b3480156105c957600080fd5b506103a46110fd565b3480156105de57600080fd5b506103d16105ed366004614493565b60136020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561062157600080fd5b5061042e60115481565b34801561063757600080fd5b5061042e610646366004614536565b61118b565b34801561065757600080fd5b50610416610666366004614536565b61123f565b34801561067757600080fd5b5061041661131d565b34801561068c57600080fd5b5061041661069b366004614536565b611401565b3480156106ac57600080fd5b5061042e611567565b3480156106c157600080fd5b506106d56106d0366004614536565b6115b3565b604051610386919061464e565b3480156106ee57600080fd5b50600c546103d19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561071b57600080fd5b50600a546103d19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561074857600080fd5b506104166107573660046146b2565b611648565b34801561076857600080fd5b5061041661180b565b34801561077d57600080fd5b506103a46118f8565b610416610794366004614493565b611907565b3480156107a557600080fd5b506012546104c5906fffffffffffffffffffffffffffffffff1681565b3480156107ce57600080fd5b506104166107dd366004614701565b61198b565b3480156107ee57600080fd5b506108026107fd366004614536565b61199a565b60408051971515885260208801969096529486019390935290151560608501521515608084015260a083015260c082015260e001610386565b34801561084757600080fd5b5061042e611bba565b34801561085c57600080fd5b5061041661086b366004614780565b611cae565b34801561087c57600080fd5b5061041661088b366004614849565b611f59565b34801561089c57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000042101561037a565b3480156108d257600080fd5b506104166108e1366004614912565b6120d9565b3480156108f257600080fd5b507f000000000000000000000000000000000000000000000000000000000000000042101561037a565b34801561092857600080fd5b5061042e600f5481565b34801561093e57600080fd5b5061041661094d366004614493565b612167565b34801561095e57600080fd5b5061042e600d5481565b6106d5610976366004614a0c565b61227b565b34801561098757600080fd5b506103a4610996366004614493565b612614565b3480156109a757600080fd5b506109bb6109b6366004614536565b61278d565b604051610386929190614a4f565b3480156109d557600080fd5b5061042e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a0957600080fd5b5061042e612844565b348015610a1e57600080fd5b50600b546103d19073ffffffffffffffffffffffffffffffffffffffff1681565b348015610a4b57600080fd5b506103a461289d565b348015610a6057600080fd5b5061042e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a9457600080fd5b5061037a610aa3366004614a91565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610aea57600080fd5b5061042e6128ac565b6106d5610b01366004614a0c565b6128be565b348015610b1257600080fd5b506012546104c59070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1681565b348015610b4f57600080fd5b50610416610b5e366004614849565b612acb565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610bb95750610bb982612d90565b92915050565b606060008054610bce90614abb565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfa90614abb565b8015610c475780601f10610c1c57610100808354040283529160200191610c47565b820191906000526020600020905b815481529060010190602001808311610c2a57829003601f168201915b5050505050905090565b6000610c5c82612e73565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610c908261108b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610d385760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff82161480610d615750610d618133610aa3565b610dd35760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d2f565b610ddd8383612ee4565b505050565b610dec3382612f84565b610e5e5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610d2f565b610ddd838383613044565b6000610e748361118b565b8210610ee85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610d2f565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b610ddd838383604051806020016040528060008152506120d9565b6000610f4460085490565b8210610fb85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610d2f565b60088281548110610fcb57610fcb614b0e565b90600052602060002001549050919050565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146110445760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f6600e611072838583614b8b565b60405161107f9190614ca6565b60405180910390a15050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610bb95760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610d2f565b600e805461110a90614abb565b80601f016020809104026020016040519081016040528092919081815260200182805461113690614abb565b80156111835780601f1061115857610100808354040283529160200191611183565b820191906000526020600020905b81548152906001019060200180831161116657829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff82166112165760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610d2f565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146112a65760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217909255600a54604051919216907fb51454ce8c7f26becd312a46c4815553887f2ec876a0b8dc813b87f62edf6f8090600090a350565b600b5473ffffffffffffffffffffffffffffffffffffffff1633146113845760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600a54604051339173ffffffffffffffffffffffffffffffffffffffff16907f357bdeb5828fa83945f38a88510ce5cd7d628dafb346d767efbc693149fdd97c90600090a3600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600b80549091169055565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146114685760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600c5473ffffffffffffffffffffffffffffffffffffffff1615806114ac57507f000000000000000000000000000000000000000000000000000000000000000042105b6114f85760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517ff928fb8eb698919f7913a088854d968497807df4a72cd4247abff4f883f21af090600090a250565b600061157260085490565b6115ae906fffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016614d7e565b905090565b606060006115c08361118b565b90508067ffffffffffffffff8111156115db576115db6148e3565b604051908082528060200260200182016040528015611604578160200160208202803683370190505b50915060005b818110156116415761161c8482610e69565b83828151811061162e5761162e614b0e565b602090810291909101015260010161160a565b5050919050565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146116af5760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f0000000000000000000000000000000000000000000000000000000000000000421061171e5760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b6000831161176e5760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5354414745530000000000000000000000000000000000006044820152606401610d2f565b600f84905560108390556011829055601280547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8316908117909155604080518681526020810186905290810184905260608101919091527f228e5a786c498fe3925d6a5b4127c7d3f3d7441c6bf74a18f206cfee44d9c7149060800160405180910390a150505050565b600c54479073ffffffffffffffffffffffffffffffffffffffff168015611832578061184c565b600a5473ffffffffffffffffffffffffffffffffffffffff165b90506118588183613282565b6118a45760405162461bcd60e51b815260206004820152601560248201527f45544845525f5452414e534645525f4641494c454400000000000000000000006044820152606401610d2f565b8073ffffffffffffffffffffffffffffffffffffffff167f0f2fb75cc1977a496e94837f859e957f68e26e70dc1b75d9945ee92ae57969ba836040516118ec91815260200190565b60405180910390a25050565b606060018054610bce90614abb565b336119118261108b565b73ffffffffffffffffffffffffffffffffffffffff16146119745760405162461bcd60e51b815260206004820152600960248201527f4e4f545f4f574e455200000000000000000000000000000000000000000000006044820152606401610d2f565b61197f6011546132eb565b6119888161339b565b50565b611996338383613490565b5050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601460205260408082208151808301909252805483928392839283928392839283929190829060ff1660028111156119f0576119f0614551565b6002811115611a0157611a01614551565b8152905461010090046fffffffffffffffffffffffffffffffff166020909101529050600081516002811115611a3957611a39614551565b602083015191141598506fffffffffffffffffffffffffffffffff169650600181516002811115611a6c57611a6c614551565b14611aa357600281516002811115611a8657611a86614551565b14611a9857611a936128ac565b611aa6565b611a936010546135a3565b60005b9550611ab0611bba565b92508780611abe5750826001145b80611ac95750826002145b94506001831493508215611b825782600414611b7b576010544290611b2e7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000614d7e565b611b389086614d91565b611b429190614dfd565b611b6c907f0000000000000000000000000000000000000000000000000000000000000000614e11565b611b769190614d7e565b611bac565b6000611bac565b611bac427f0000000000000000000000000000000000000000000000000000000000000000614d7e565b915050919395979092949650565b60007f00000000000000000000000000000000000000000000000000000000000000004210611bea575060105490565b7f0000000000000000000000000000000000000000000000000000000000000000421015611c185750600090565b611c627f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000614d7e565b611c8c7f000000000000000000000000000000000000000000000000000000000000000042614d7e565b601054611c999190614d91565b611ca39190614dfd565b6115ae906001614e11565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611d155760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f00000000000000000000000000000000000000000000000000000000000000004210611d845760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b60005b85811015611f50576000858583818110611da357611da3614b0e565b9050602002016020810190611db89190614e24565b905036848484818110611dcd57611dcd614b0e565b905060e00201905060005b6007811015611e6b5760ff83168110156000838360078110611dfc57611dfc614b0e565b602002016020810190611e0f9190614e47565b63ffffffff161414611e635760405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f434f554e54000000000000000000000000000000000000006044820152606401610d2f565b600101611dd8565b5060405180604001604052808360ff16815260200182600780602002604051908101604052809291908260076020028082843760009201829052509290935250601591508b8b87818110611ec157611ec1614b0e565b9050602002016020810190611ed69190614536565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604001600020825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90911617815590820151611f3f90600183019060076142f8565b509050508260010192505050611d87565b50505050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611fc05760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f0000000000000000000000000000000000000000000000000000000000000000421061202f5760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b60005b85811015611f505760005b85858381811061204f5761204f614b0e565b905060200201358110156120d057600061209089898581811061207457612074614b0e565b90506020020160208101906120899190614536565b60006135d2565b90508484848181106120a4576120a4614b0e565b90506020020160208101906120b99190614e6d565b156120c7576120c78161339b565b5060010161203d565b50600101612032565b6120e33383612f84565b6121555760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610d2f565b61216184848484613839565b50505050565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146121ce5760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600d5415806121fc57507f000000000000000000000000000000000000000000000000000000000000000042105b6122485760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b600d81905560405181907f915b9b61db96cacba1d6c8742c3d2a17db37987e84da54d10914b7727108af6d90600090a250565b60607f00000000000000000000000000000000000000000000000000000000000000004210156122ed5760405162461bcd60e51b815260206004820152601060248201527f4e4f545f4c41554e434845445f594554000000000000000000000000000000006044820152606401610d2f565b73ffffffffffffffffffffffffffffffffffffffff84166123505760405162461bcd60e51b815260206004820152601360248201527f494e56414c49445f44455354494e4154494f4e000000000000000000000000006044820152606401610d2f565b600061235c84846138c2565b336000908152601460205260408120919250815460ff16600281111561238457612384614551565b036123d15760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f4752414e5445440000000000000000000000000000000000000000006044820152606401610d2f565b80546fffffffffffffffffffffffffffffffff80841661010090920416101561243c5760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f4752414e5445440000000000000000000000000000000000000000006044820152606401610d2f565b60006002825460ff16600281111561245657612456614551565b14612462576000612482565b61246d6010546135a3565b836fffffffffffffffffffffffffffffffff16025b82549091506fffffffffffffffffffffffffffffffff80851661010090920416036124e15733600090815260146020526040902080547fffffffffffffffffffffffffffffff0000000000000000000000000000000000169055612543565b81548390839060019061250c90849061010090046fffffffffffffffffffffffffffffffff16614e88565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b61254c816132eb565b826fffffffffffffffffffffffffffffffff1667ffffffffffffffff811115612577576125776148e3565b6040519080825280602002602001820160405280156125a0578160200160208202803683370190505b5093505b6fffffffffffffffffffffffffffffffff83161561260a576126056125ca8860006135d2565b8585600190039550856fffffffffffffffffffffffffffffffff16815181106125f5576125f5614b0e565b602002602001018181525061339b565b6125a4565b5050509392505050565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff166126ae5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d2f565b6000600e80546126bd90614abb565b80601f01602080910402602001604051908101604052809291908181526020018280546126e990614abb565b80156127365780601f1061270b57610100808354040283529160200191612736565b820191906000526020600020905b81548152906001019060200180831161271957829003601f168201915b50505050509050600081511161275b5760405180602001604052806000815250612786565b8061276584613a1f565b604051602001612776929190614eb1565b6040516020818303038152906040525b9392505050565b6000612797614394565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260156020908152604080832081518083018352815460ff168152825160e0810193849052909391929184019160018401906007908288855b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116127eb575050509290935250508251602090930151929792965091945050505050565b6000427f0000000000000000000000000000000000000000000000000000000000000000116128735750600090565b6115ae427f0000000000000000000000000000000000000000000000000000000000000000614d7e565b6060600e8054610bce90614abb565b60006115ae6128b9611bba565b6135a3565b60607f00000000000000000000000000000000000000000000000000000000000000004210156129305760405162461bcd60e51b815260206004820152601060248201527f4e4f545f4c41554e434845445f594554000000000000000000000000000000006044820152606401610d2f565b73ffffffffffffffffffffffffffffffffffffffff84166129935760405162461bcd60e51b815260206004820152601360248201527f494e56414c49445f44455354494e4154494f4e000000000000000000000000006044820152606401610d2f565b600061299f84846138c2565b90506000816fffffffffffffffffffffffffffffffff166129be6128ac565b0290506129ca816132eb565b60006129d4611bba565b9050826fffffffffffffffffffffffffffffffff1667ffffffffffffffff811115612a0157612a016148e3565b604051908082528060200260200182016040528015612a2a578160200160208202803683370190505b5093505b6fffffffffffffffffffffffffffffffff83161561260a57612a5387826001146135d2565b8484600190039450846fffffffffffffffffffffffffffffffff1681518110612a7e57612a7e614b0e565b60200260200101818152505060028111612a2e57612ac684846fffffffffffffffffffffffffffffffff1681518110612ab957612ab9614b0e565b602002602001015161339b565b612a2e565b600a5473ffffffffffffffffffffffffffffffffffffffff163314612b325760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f00000000000000000000000000000000000000000000000000000000000000004210612ba15760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b60005b85811015611f50576000878783818110612bc057612bc0614b0e565b9050602002016020810190612bd59190614536565b90506000868684818110612beb57612beb614b0e565b9050602002016020810190612c009190614f09565b90506000858585818110612c1657612c16614b0e565b9050602002016020810190612c2b9190614f2a565b90506040518060400160405280836002811115612c4a57612c4a614551565b81526fffffffffffffffffffffffffffffffff831660209182015273ffffffffffffffffffffffffffffffffffffffff851660009081526014909152604090208151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115612cc657612cc6614551565b02179055506020919091015181546fffffffffffffffffffffffffffffffff909116610100027fffffffffffffffffffffffffffffff00000000000000000000000000000000ff909116179055816002811115612d2557612d25614551565b6040516fffffffffffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8516907f0192791b2bd097a1351c654f9c899b3f473b49fbfa43bafc39b9e0d5c3ba65c69060200160405180910390a3836001019350505050612ba4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480612e2357507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610bb957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610bb9565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff166119885760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610d2f565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612f3e8261108b565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080612f908361108b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612ffe575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b8061303c57508373ffffffffffffffffffffffffffffffffffffffff1661302484610c51565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166130648261108b565b73ffffffffffffffffffffffffffffffffffffffff16146130ed5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610d2f565b73ffffffffffffffffffffffffffffffffffffffff82166131755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610d2f565b613180838383613b54565b61318b600082612ee4565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054600192906131c1908490614d7e565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081208054600192906131fc908490614e11565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146132dc576040519150601f19603f3d011682016040523d82523d6000602084013e6132e1565b606091505b5090949350505050565b8034101561333b5760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e545f56414c554500000000000000000000000000006044820152606401610d2f565b803411156119885761334f33823403613282565b6119885760405162461bcd60e51b815260206004820152600d60248201527f524546554e445f4641494c4544000000000000000000000000000000000000006044820152606401610d2f565b60008181526013602052604090205473ffffffffffffffffffffffffffffffffffffffff161561340d5760405162461bcd60e51b815260206004820152600f60248201527f414c52454144595f434c41494d454400000000000000000000000000000000006044820152606401610d2f565b6134168161108b565b60008281526013602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9490941693841790555183917f5c074bebf869f19454dfd62283cd84a3105068cdade9e184caa870f1258aa4bd91a350565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361350b5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d2f565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600f545b60018211156135cd576135bb600282614dfd565b90506135c682614f45565b91506135a7565b919050565b60006135dd60085490565b7f00000000000000000000000000000000000000000000000000000000000000006fffffffffffffffffffffffffffffffff161161365d5760405162461bcd60e51b815260206004820152601560248201527f4e4f5f5354454e43494c535f415641494c41424c4500000000000000000000006044820152606401610d2f565b600061366860085490565b613673906001614e11565b33600090815260156020526040902080549192509060ff16801561374a5761369a81614f7a565b90506136e5866136dd846001018460ff16600781106136bb576136bb614b0e565b600891828204019190066004029054906101000a900463ffffffff1686613bee565b955085613c0e565b6000826001018260ff16600781106136ff576136ff614b0e565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550808260000160006101000a81548160ff021916908360ff160217905550613830565b8415801561378257506012546fffffffffffffffffffffffffffffffff80821670010000000000000000000000000000000090920416105b1561379f576014613791613da8565b61379b9190614fb5565b1594505b841561381257601280546010906137db9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16614fc9565b91906101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b613830866136dd61382a613824613da8565b89613e26565b86613bee565b50505092915050565b613844848484613044565b61385084848484613e62565b6121615760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d2f565b6000806138ce60085490565b61390a906fffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016614d7e565b9050836fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff16101561393e5780613940565b835b9150816fffffffffffffffffffffffffffffffff166000036139a45760405162461bcd60e51b815260206004820152601560248201527f4e4f5f5354454e43494c535f415641494c41424c4500000000000000000000006044820152606401610d2f565b826fffffffffffffffffffffffffffffffff16826fffffffffffffffffffffffffffffffff161015613a185760405162461bcd60e51b815260206004820152601660248201527f43414e4e4f545f46554c4c46494c5f52455155455354000000000000000000006044820152606401610d2f565b5092915050565b606081600003613a6257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613a8c5780613a7681614ff8565b9150613a859050600a83614dfd565b9150613a66565b60008167ffffffffffffffff811115613aa757613aa76148e3565b6040519080825280601f01601f191660200182016040528015613ad1576020820181803683370190505b5090505b841561303c57613ae6600183614d7e565b9150613af3600a86614fb5565b613afe906030614e11565b60f81b818381518110613b1357613b13614b0e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613b4d600a86614dfd565b9450613ad5565b73ffffffffffffffffffffffffffffffffffffffff83161580613b9757507f00000000000000000000000000000000000000000000000000000000000000004210155b613be35760405162461bcd60e51b815260206004820152601060248201527f4e4f545f4c41554e434845445f594554000000000000000000000000000000006044820152606401610d2f565b610ddd83838361403b565b600061278667ffffffff00000000602084901b1663ffffffff8516614e11565b73ffffffffffffffffffffffffffffffffffffffff8216613c715760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d2f565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613ce35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d2f565b613cef60008383613b54565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290613d25908490614e11565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600143034033613db960085490565b5a604051602001613e08949392919093845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208401526034830152605482015260740190565b6040516020818303038152906040528051906020012060001c905090565b60e082901c8115613e3a5761040017610bb9565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbff1692915050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15614030576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613ed9903390899088908890600401615030565b6020604051808303816000875af1925050508015613f32575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613f2f91810190615079565b60015b613fe5573d808015613f60576040519150601f19603f3d011682016040523d82523d6000602084013e613f65565b606091505b508051600003613fdd5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d2f565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061303c565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff83166140a35761409e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6140e0565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146140e0576140e08382614141565b73ffffffffffffffffffffffffffffffffffffffff821661410457610ddd816141f8565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610ddd57610ddd82826142a7565b6000600161414e8461118b565b6141589190614d7e565b6000838152600760205260409020549091508082146141b85773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b60085460009061420a90600190614d7e565b6000838152600960205260408120546008805493945090928490811061423257614232614b0e565b90600052602060002001549050806008838154811061425357614253614b0e565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061428b5761428b615096565b6001900381819060005260206000200160009055905550505050565b60006142b28361118b565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001830191839082156143845791602002820160005b8382111561435257835183826101000a81548163ffffffff021916908363ffffffff160217905550926020019260040160208160030104928301926001030261430e565b80156143825782816101000a81549063ffffffff0219169055600401602081600301049283019260010302614352565b505b506143909291506143b2565b5090565b6040518060e001604052806007906020820280368337509192915050565b5b8082111561439057600081556001016143b3565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461198857600080fd5b60006020828403121561440757600080fd5b8135612786816143c7565b60005b8381101561442d578181015183820152602001614415565b50506000910152565b6000815180845261444e816020860160208601614412565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006127866020830184614436565b6000602082840312156144a557600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146135cd57600080fd5b600080604083850312156144e357600080fd5b6144ec836144ac565b946020939093013593505050565b60008060006060848603121561450f57600080fd5b614518846144ac565b9250614526602085016144ac565b9150604084013590509250925092565b60006020828403121561454857600080fd5b612786826144ac565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60408101600384106145bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9281526fffffffffffffffffffffffffffffffff9190911660209091015290565b600080602083850312156145ef57600080fd5b823567ffffffffffffffff8082111561460757600080fd5b818501915085601f83011261461b57600080fd5b81358181111561462a57600080fd5b86602082850101111561463c57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156146865783518352928401929184019160010161466a565b50909695505050505050565b80356fffffffffffffffffffffffffffffffff811681146135cd57600080fd5b600080600080608085870312156146c857600080fd5b8435935060208501359250604085013591506146e660608601614692565b905092959194509250565b803580151581146135cd57600080fd5b6000806040838503121561471457600080fd5b61471d836144ac565b915061472b602084016146f1565b90509250929050565b60008083601f84011261474657600080fd5b50813567ffffffffffffffff81111561475e57600080fd5b6020830191508360208260051b850101111561477957600080fd5b9250929050565b6000806000806000806060878903121561479957600080fd5b863567ffffffffffffffff808211156147b157600080fd5b6147bd8a838b01614734565b909850965060208901359150808211156147d657600080fd5b6147e28a838b01614734565b909650945060408901359150808211156147fb57600080fd5b818901915089601f83011261480f57600080fd5b81358181111561481e57600080fd5b8a602060e08302850101111561483357600080fd5b6020830194508093505050509295509295509295565b6000806000806000806060878903121561486257600080fd5b863567ffffffffffffffff8082111561487a57600080fd5b6148868a838b01614734565b9098509650602089013591508082111561489f57600080fd5b6148ab8a838b01614734565b909650945060408901359150808211156148c457600080fd5b506148d189828a01614734565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561492857600080fd5b614931856144ac565b935061493f602086016144ac565b925060408501359150606085013567ffffffffffffffff8082111561496357600080fd5b818701915087601f83011261497757600080fd5b813581811115614989576149896148e3565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156149cf576149cf6148e3565b816040528281528a60208487010111156149e857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080600060608486031215614a2157600080fd5b614a2a846144ac565b9250614a3860208501614692565b9150614a4660408501614692565b90509250925092565b60ff83168152610100810160208083018460005b6007811015614a8657815163ffffffff1683529183019190830190600101614a63565b505050509392505050565b60008060408385031215614aa457600080fd5b614aad836144ac565b915061472b602084016144ac565b600181811c90821680614acf57607f821691505b602082108103614b08577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f821115610ddd57600081815260208120601f850160051c81016020861015614b645750805b601f850160051c820191505b81811015614b8357828155600101614b70565b505050505050565b67ffffffffffffffff831115614ba357614ba36148e3565b614bb783614bb18354614abb565b83614b3d565b6000601f841160018114614c095760008515614bd35750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c9f565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614c585786850135825560209485019460019092019101614c38565b5086821015614c93577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000602080835260008454614cba81614abb565b80848701526040600180841660008114614cdb5760018114614d1357614d41565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614d41565b896000528660002060005b85811015614d395781548b8201860152908301908801614d1e565b8a0184019650505b509398975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610bb957610bb9614d4f565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614dc957614dc9614d4f565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614e0c57614e0c614dce565b500490565b80820180821115610bb957610bb9614d4f565b600060208284031215614e3657600080fd5b813560ff8116811461278657600080fd5b600060208284031215614e5957600080fd5b813563ffffffff8116811461278657600080fd5b600060208284031215614e7f57600080fd5b612786826146f1565b6fffffffffffffffffffffffffffffffff828116828216039080821115613a1857613a18614d4f565b60008351614ec3818460208801614412565b7f2f000000000000000000000000000000000000000000000000000000000000009083019081528351614efd816001840160208801614412565b01600101949350505050565b600060208284031215614f1b57600080fd5b81356003811061278657600080fd5b600060208284031215614f3c57600080fd5b61278682614692565b600081614f5457614f54614d4f565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600060ff821680614f8d57614f8d614d4f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0192915050565b600082614fc457614fc4614dce565b500690565b60006fffffffffffffffffffffffffffffffff808316818103614fee57614fee614d4f565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361502957615029614d4f565b5060010190565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261506f6080830184614436565b9695505050505050565b60006020828403121561508b57600080fd5b8151612786816143c7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220e09d0fe48d2b739c2e166d84bb590f6ef25aa598acc26ef4e18abd680deaf1db64736f6c63430008100033000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000635ad53000000000000000000000000000000000000000000000000000000000635af1500000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f7374656e63696c732e66616374696f6e2e6172742f6170692f6d657461646174612f6d61696e6e6574000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103555760003560e01c806395d89b41116101bb578063c2232c82116100f7578063e8a3d48511610095578063f2ba4fe31161006f578063f2ba4fe314610ade578063f63c5f7414610af3578063fe0ee37b14610b06578063fe1859ab14610b4357600080fd5b8063e8a3d48514610a3f578063e954f41d14610a54578063e985e9c514610a8857600080fd5b8063cbc385ba116100d1578063cbc385ba1461099b578063cec00eaf146109c9578063d557c4c9146109fd578063e30c397814610a1257600080fd5b8063c2232c8214610952578063c6dd84aa14610968578063c87b56dd1461097b57600080fd5b8063b038f8bd11610164578063b88d4fde1161013e578063b88d4fde146108c6578063b8f7a665146108e6578063bed83d6e1461091c578063c0c4de3c1461093257600080fd5b8063b038f8bd14610850578063b1ac1eaf14610870578063b1b89a1a1461089057600080fd5b8063a22cb46511610195578063a22cb465146107c2578063a841d5f3146107e2578063a926f1731461083b57600080fd5b806395d89b41146107715780639cfc1d53146107865780639d8221b81461079957600080fd5b80636352211e116102955780637d3e71911161023357806386f8e2d11161020d57806386f8e2d1146106e25780638da5cb5b1461070f5780638f6c1fb71461073c5780639038e6931461075c57600080fd5b80637d3e7191146106805780637ecc2b56146106a05780638462151c146106b557600080fd5b80636e671eb01161026f5780636e671eb01461061557806370a082311461062b578063710bf3221461064b57806379ba50971461066b57600080fd5b80636352211e1461059d5780636c0360eb146105bd5780636ca4ebfb146105d257600080fd5b806323b872dd1161030257806342842e0e116102dc57806342842e0e146104e65780634d63db31146105065780634f6ccce71461055d57806355f804b31461057d57600080fd5b806323b872dd146104515780632f745c591461047157806332cb6b0c1461049157600080fd5b8063095ea7b311610333578063095ea7b3146103f657806317bbb63b1461041857806318160ddd1461043c57600080fd5b806301ffc9a71461035a57806306fdde031461038f578063081812fc146103b1575b600080fd5b34801561036657600080fd5b5061037a6103753660046143f5565b610b63565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610bbf565b6040516103869190614480565b3480156103bd57600080fd5b506103d16103cc366004614493565b610c51565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610386565b34801561040257600080fd5b506104166104113660046144d0565b610c85565b005b34801561042457600080fd5b5061042e60105481565b604051908152602001610386565b34801561044857600080fd5b5060085461042e565b34801561045d57600080fd5b5061041661046c3660046144fa565b610de2565b34801561047d57600080fd5b5061042e61048c3660046144d0565b610e69565b34801561049d57600080fd5b506104c57f00000000000000000000000000000000000000000000000000000000000001f481565b6040516fffffffffffffffffffffffffffffffff9091168152602001610386565b3480156104f257600080fd5b506104166105013660046144fa565b610f1e565b34801561051257600080fd5b5061054f610521366004614536565b60146020526000908152604090205460ff81169061010090046fffffffffffffffffffffffffffffffff1682565b604051610386929190614580565b34801561056957600080fd5b5061042e610578366004614493565b610f39565b34801561058957600080fd5b506104166105983660046145dc565b610fdd565b3480156105a957600080fd5b506103d16105b8366004614493565b61108b565b3480156105c957600080fd5b506103a46110fd565b3480156105de57600080fd5b506103d16105ed366004614493565b60136020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561062157600080fd5b5061042e60115481565b34801561063757600080fd5b5061042e610646366004614536565b61118b565b34801561065757600080fd5b50610416610666366004614536565b61123f565b34801561067757600080fd5b5061041661131d565b34801561068c57600080fd5b5061041661069b366004614536565b611401565b3480156106ac57600080fd5b5061042e611567565b3480156106c157600080fd5b506106d56106d0366004614536565b6115b3565b604051610386919061464e565b3480156106ee57600080fd5b50600c546103d19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561071b57600080fd5b50600a546103d19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561074857600080fd5b506104166107573660046146b2565b611648565b34801561076857600080fd5b5061041661180b565b34801561077d57600080fd5b506103a46118f8565b610416610794366004614493565b611907565b3480156107a557600080fd5b506012546104c5906fffffffffffffffffffffffffffffffff1681565b3480156107ce57600080fd5b506104166107dd366004614701565b61198b565b3480156107ee57600080fd5b506108026107fd366004614536565b61199a565b60408051971515885260208801969096529486019390935290151560608501521515608084015260a083015260c082015260e001610386565b34801561084757600080fd5b5061042e611bba565b34801561085c57600080fd5b5061041661086b366004614780565b611cae565b34801561087c57600080fd5b5061041661088b366004614849565b611f59565b34801561089c57600080fd5b507f00000000000000000000000000000000000000000000000000000000635af15042101561037a565b3480156108d257600080fd5b506104166108e1366004614912565b6120d9565b3480156108f257600080fd5b507f00000000000000000000000000000000000000000000000000000000635ad53042101561037a565b34801561092857600080fd5b5061042e600f5481565b34801561093e57600080fd5b5061041661094d366004614493565b612167565b34801561095e57600080fd5b5061042e600d5481565b6106d5610976366004614a0c565b61227b565b34801561098757600080fd5b506103a4610996366004614493565b612614565b3480156109a757600080fd5b506109bb6109b6366004614536565b61278d565b604051610386929190614a4f565b3480156109d557600080fd5b5061042e7f00000000000000000000000000000000000000000000000000000000635af15081565b348015610a0957600080fd5b5061042e612844565b348015610a1e57600080fd5b50600b546103d19073ffffffffffffffffffffffffffffffffffffffff1681565b348015610a4b57600080fd5b506103a461289d565b348015610a6057600080fd5b5061042e7f00000000000000000000000000000000000000000000000000000000635ad53081565b348015610a9457600080fd5b5061037a610aa3366004614a91565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610aea57600080fd5b5061042e6128ac565b6106d5610b01366004614a0c565b6128be565b348015610b1257600080fd5b506012546104c59070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1681565b348015610b4f57600080fd5b50610416610b5e366004614849565b612acb565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610bb95750610bb982612d90565b92915050565b606060008054610bce90614abb565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfa90614abb565b8015610c475780601f10610c1c57610100808354040283529160200191610c47565b820191906000526020600020905b815481529060010190602001808311610c2a57829003601f168201915b5050505050905090565b6000610c5c82612e73565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610c908261108b565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610d385760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff82161480610d615750610d618133610aa3565b610dd35760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d2f565b610ddd8383612ee4565b505050565b610dec3382612f84565b610e5e5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610d2f565b610ddd838383613044565b6000610e748361118b565b8210610ee85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610d2f565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600660209081526040808320938352929052205490565b610ddd838383604051806020016040528060008152506120d9565b6000610f4460085490565b8210610fb85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610d2f565b60088281548110610fcb57610fcb614b0e565b90600052602060002001549050919050565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146110445760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f6600e611072838583614b8b565b60405161107f9190614ca6565b60405180910390a15050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610bb95760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610d2f565b600e805461110a90614abb565b80601f016020809104026020016040519081016040528092919081815260200182805461113690614abb565b80156111835780601f1061115857610100808354040283529160200191611183565b820191906000526020600020905b81548152906001019060200180831161116657829003601f168201915b505050505081565b600073ffffffffffffffffffffffffffffffffffffffff82166112165760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610d2f565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146112a65760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217909255600a54604051919216907fb51454ce8c7f26becd312a46c4815553887f2ec876a0b8dc813b87f62edf6f8090600090a350565b600b5473ffffffffffffffffffffffffffffffffffffffff1633146113845760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600a54604051339173ffffffffffffffffffffffffffffffffffffffff16907f357bdeb5828fa83945f38a88510ce5cd7d628dafb346d767efbc693149fdd97c90600090a3600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600b80549091169055565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146114685760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600c5473ffffffffffffffffffffffffffffffffffffffff1615806114ac57507f00000000000000000000000000000000000000000000000000000000635ad53042105b6114f85760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517ff928fb8eb698919f7913a088854d968497807df4a72cd4247abff4f883f21af090600090a250565b600061157260085490565b6115ae906fffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000001f416614d7e565b905090565b606060006115c08361118b565b90508067ffffffffffffffff8111156115db576115db6148e3565b604051908082528060200260200182016040528015611604578160200160208202803683370190505b50915060005b818110156116415761161c8482610e69565b83828151811061162e5761162e614b0e565b602090810291909101015260010161160a565b5050919050565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146116af5760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f00000000000000000000000000000000000000000000000000000000635ad530421061171e5760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b6000831161176e5760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5354414745530000000000000000000000000000000000006044820152606401610d2f565b600f84905560108390556011829055601280547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff8316908117909155604080518681526020810186905290810184905260608101919091527f228e5a786c498fe3925d6a5b4127c7d3f3d7441c6bf74a18f206cfee44d9c7149060800160405180910390a150505050565b600c54479073ffffffffffffffffffffffffffffffffffffffff168015611832578061184c565b600a5473ffffffffffffffffffffffffffffffffffffffff165b90506118588183613282565b6118a45760405162461bcd60e51b815260206004820152601560248201527f45544845525f5452414e534645525f4641494c454400000000000000000000006044820152606401610d2f565b8073ffffffffffffffffffffffffffffffffffffffff167f0f2fb75cc1977a496e94837f859e957f68e26e70dc1b75d9945ee92ae57969ba836040516118ec91815260200190565b60405180910390a25050565b606060018054610bce90614abb565b336119118261108b565b73ffffffffffffffffffffffffffffffffffffffff16146119745760405162461bcd60e51b815260206004820152600960248201527f4e4f545f4f574e455200000000000000000000000000000000000000000000006044820152606401610d2f565b61197f6011546132eb565b6119888161339b565b50565b611996338383613490565b5050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152601460205260408082208151808301909252805483928392839283928392839283929190829060ff1660028111156119f0576119f0614551565b6002811115611a0157611a01614551565b8152905461010090046fffffffffffffffffffffffffffffffff166020909101529050600081516002811115611a3957611a39614551565b602083015191141598506fffffffffffffffffffffffffffffffff169650600181516002811115611a6c57611a6c614551565b14611aa357600281516002811115611a8657611a86614551565b14611a9857611a936128ac565b611aa6565b611a936010546135a3565b60005b9550611ab0611bba565b92508780611abe5750826001145b80611ac95750826002145b94506001831493508215611b825782600414611b7b576010544290611b2e7f00000000000000000000000000000000000000000000000000000000635ad5307f00000000000000000000000000000000000000000000000000000000635af150614d7e565b611b389086614d91565b611b429190614dfd565b611b6c907f00000000000000000000000000000000000000000000000000000000635ad530614e11565b611b769190614d7e565b611bac565b6000611bac565b611bac427f00000000000000000000000000000000000000000000000000000000635ad530614d7e565b915050919395979092949650565b60007f00000000000000000000000000000000000000000000000000000000635af1504210611bea575060105490565b7f00000000000000000000000000000000000000000000000000000000635ad530421015611c185750600090565b611c627f00000000000000000000000000000000000000000000000000000000635ad5307f00000000000000000000000000000000000000000000000000000000635af150614d7e565b611c8c7f00000000000000000000000000000000000000000000000000000000635ad53042614d7e565b601054611c999190614d91565b611ca39190614dfd565b6115ae906001614e11565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611d155760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f00000000000000000000000000000000000000000000000000000000635ad5304210611d845760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b60005b85811015611f50576000858583818110611da357611da3614b0e565b9050602002016020810190611db89190614e24565b905036848484818110611dcd57611dcd614b0e565b905060e00201905060005b6007811015611e6b5760ff83168110156000838360078110611dfc57611dfc614b0e565b602002016020810190611e0f9190614e47565b63ffffffff161414611e635760405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f434f554e54000000000000000000000000000000000000006044820152606401610d2f565b600101611dd8565b5060405180604001604052808360ff16815260200182600780602002604051908101604052809291908260076020028082843760009201829052509290935250601591508b8b87818110611ec157611ec1614b0e565b9050602002016020810190611ed69190614536565b73ffffffffffffffffffffffffffffffffffffffff168152602080820192909252604001600020825181547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90911617815590820151611f3f90600183019060076142f8565b509050508260010192505050611d87565b50505050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611fc05760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f00000000000000000000000000000000000000000000000000000000635ad530421061202f5760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b60005b85811015611f505760005b85858381811061204f5761204f614b0e565b905060200201358110156120d057600061209089898581811061207457612074614b0e565b90506020020160208101906120899190614536565b60006135d2565b90508484848181106120a4576120a4614b0e565b90506020020160208101906120b99190614e6d565b156120c7576120c78161339b565b5060010161203d565b50600101612032565b6120e33383612f84565b6121555760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152608401610d2f565b61216184848484613839565b50505050565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146121ce5760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b600d5415806121fc57507f00000000000000000000000000000000000000000000000000000000635ad53042105b6122485760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b600d81905560405181907f915b9b61db96cacba1d6c8742c3d2a17db37987e84da54d10914b7727108af6d90600090a250565b60607f00000000000000000000000000000000000000000000000000000000635ad5304210156122ed5760405162461bcd60e51b815260206004820152601060248201527f4e4f545f4c41554e434845445f594554000000000000000000000000000000006044820152606401610d2f565b73ffffffffffffffffffffffffffffffffffffffff84166123505760405162461bcd60e51b815260206004820152601360248201527f494e56414c49445f44455354494e4154494f4e000000000000000000000000006044820152606401610d2f565b600061235c84846138c2565b336000908152601460205260408120919250815460ff16600281111561238457612384614551565b036123d15760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f4752414e5445440000000000000000000000000000000000000000006044820152606401610d2f565b80546fffffffffffffffffffffffffffffffff80841661010090920416101561243c5760405162461bcd60e51b815260206004820152600b60248201527f4e4f545f4752414e5445440000000000000000000000000000000000000000006044820152606401610d2f565b60006002825460ff16600281111561245657612456614551565b14612462576000612482565b61246d6010546135a3565b836fffffffffffffffffffffffffffffffff16025b82549091506fffffffffffffffffffffffffffffffff80851661010090920416036124e15733600090815260146020526040902080547fffffffffffffffffffffffffffffff0000000000000000000000000000000000169055612543565b81548390839060019061250c90849061010090046fffffffffffffffffffffffffffffffff16614e88565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b61254c816132eb565b826fffffffffffffffffffffffffffffffff1667ffffffffffffffff811115612577576125776148e3565b6040519080825280602002602001820160405280156125a0578160200160208202803683370190505b5093505b6fffffffffffffffffffffffffffffffff83161561260a576126056125ca8860006135d2565b8585600190039550856fffffffffffffffffffffffffffffffff16815181106125f5576125f5614b0e565b602002602001018181525061339b565b6125a4565b5050509392505050565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff166126ae5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d2f565b6000600e80546126bd90614abb565b80601f01602080910402602001604051908101604052809291908181526020018280546126e990614abb565b80156127365780601f1061270b57610100808354040283529160200191612736565b820191906000526020600020905b81548152906001019060200180831161271957829003601f168201915b50505050509050600081511161275b5760405180602001604052806000815250612786565b8061276584613a1f565b604051602001612776929190614eb1565b6040516020818303038152906040525b9392505050565b6000612797614394565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260156020908152604080832081518083018352815460ff168152825160e0810193849052909391929184019160018401906007908288855b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116127eb575050509290935250508251602090930151929792965091945050505050565b6000427f00000000000000000000000000000000000000000000000000000000635ad530116128735750600090565b6115ae427f00000000000000000000000000000000000000000000000000000000635ad530614d7e565b6060600e8054610bce90614abb565b60006115ae6128b9611bba565b6135a3565b60607f00000000000000000000000000000000000000000000000000000000635ad5304210156129305760405162461bcd60e51b815260206004820152601060248201527f4e4f545f4c41554e434845445f594554000000000000000000000000000000006044820152606401610d2f565b73ffffffffffffffffffffffffffffffffffffffff84166129935760405162461bcd60e51b815260206004820152601360248201527f494e56414c49445f44455354494e4154494f4e000000000000000000000000006044820152606401610d2f565b600061299f84846138c2565b90506000816fffffffffffffffffffffffffffffffff166129be6128ac565b0290506129ca816132eb565b60006129d4611bba565b9050826fffffffffffffffffffffffffffffffff1667ffffffffffffffff811115612a0157612a016148e3565b604051908082528060200260200182016040528015612a2a578160200160208202803683370190505b5093505b6fffffffffffffffffffffffffffffffff83161561260a57612a5387826001146135d2565b8484600190039450846fffffffffffffffffffffffffffffffff1681518110612a7e57612a7e614b0e565b60200260200101818152505060028111612a2e57612ac684846fffffffffffffffffffffffffffffffff1681518110612ab957612ab9614b0e565b602002602001015161339b565b612a2e565b600a5473ffffffffffffffffffffffffffffffffffffffff163314612b325760405162461bcd60e51b815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610d2f565b7f00000000000000000000000000000000000000000000000000000000635ad5304210612ba15760405162461bcd60e51b815260206004820152601060248201527f414c52454144595f4c41554e43484544000000000000000000000000000000006044820152606401610d2f565b60005b85811015611f50576000878783818110612bc057612bc0614b0e565b9050602002016020810190612bd59190614536565b90506000868684818110612beb57612beb614b0e565b9050602002016020810190612c009190614f09565b90506000858585818110612c1657612c16614b0e565b9050602002016020810190612c2b9190614f2a565b90506040518060400160405280836002811115612c4a57612c4a614551565b81526fffffffffffffffffffffffffffffffff831660209182015273ffffffffffffffffffffffffffffffffffffffff851660009081526014909152604090208151815482907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115612cc657612cc6614551565b02179055506020919091015181546fffffffffffffffffffffffffffffffff909116610100027fffffffffffffffffffffffffffffff00000000000000000000000000000000ff909116179055816002811115612d2557612d25614551565b6040516fffffffffffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8516907f0192791b2bd097a1351c654f9c899b3f473b49fbfa43bafc39b9e0d5c3ba65c69060200160405180910390a3836001019350505050612ba4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480612e2357507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610bb957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610bb9565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff166119885760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610d2f565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612f3e8261108b565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080612f908361108b565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612ffe575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b8061303c57508373ffffffffffffffffffffffffffffffffffffffff1661302484610c51565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166130648261108b565b73ffffffffffffffffffffffffffffffffffffffff16146130ed5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610d2f565b73ffffffffffffffffffffffffffffffffffffffff82166131755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610d2f565b613180838383613b54565b61318b600082612ee4565b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081208054600192906131c1908490614d7e565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081208054600192906131fc908490614e11565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146132dc576040519150601f19603f3d011682016040523d82523d6000602084013e6132e1565b606091505b5090949350505050565b8034101561333b5760405162461bcd60e51b815260206004820152601260248201527f494e53554646494349454e545f56414c554500000000000000000000000000006044820152606401610d2f565b803411156119885761334f33823403613282565b6119885760405162461bcd60e51b815260206004820152600d60248201527f524546554e445f4641494c4544000000000000000000000000000000000000006044820152606401610d2f565b60008181526013602052604090205473ffffffffffffffffffffffffffffffffffffffff161561340d5760405162461bcd60e51b815260206004820152600f60248201527f414c52454144595f434c41494d454400000000000000000000000000000000006044820152606401610d2f565b6134168161108b565b60008281526013602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9490941693841790555183917f5c074bebf869f19454dfd62283cd84a3105068cdade9e184caa870f1258aa4bd91a350565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361350b5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d2f565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600f545b60018211156135cd576135bb600282614dfd565b90506135c682614f45565b91506135a7565b919050565b60006135dd60085490565b7f00000000000000000000000000000000000000000000000000000000000001f46fffffffffffffffffffffffffffffffff161161365d5760405162461bcd60e51b815260206004820152601560248201527f4e4f5f5354454e43494c535f415641494c41424c4500000000000000000000006044820152606401610d2f565b600061366860085490565b613673906001614e11565b33600090815260156020526040902080549192509060ff16801561374a5761369a81614f7a565b90506136e5866136dd846001018460ff16600781106136bb576136bb614b0e565b600891828204019190066004029054906101000a900463ffffffff1686613bee565b955085613c0e565b6000826001018260ff16600781106136ff576136ff614b0e565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff160217905550808260000160006101000a81548160ff021916908360ff160217905550613830565b8415801561378257506012546fffffffffffffffffffffffffffffffff80821670010000000000000000000000000000000090920416105b1561379f576014613791613da8565b61379b9190614fb5565b1594505b841561381257601280546010906137db9070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16614fc9565b91906101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505b613830866136dd61382a613824613da8565b89613e26565b86613bee565b50505092915050565b613844848484613044565b61385084848484613e62565b6121615760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d2f565b6000806138ce60085490565b61390a906fffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000001f416614d7e565b9050836fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff16101561393e5780613940565b835b9150816fffffffffffffffffffffffffffffffff166000036139a45760405162461bcd60e51b815260206004820152601560248201527f4e4f5f5354454e43494c535f415641494c41424c4500000000000000000000006044820152606401610d2f565b826fffffffffffffffffffffffffffffffff16826fffffffffffffffffffffffffffffffff161015613a185760405162461bcd60e51b815260206004820152601660248201527f43414e4e4f545f46554c4c46494c5f52455155455354000000000000000000006044820152606401610d2f565b5092915050565b606081600003613a6257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613a8c5780613a7681614ff8565b9150613a859050600a83614dfd565b9150613a66565b60008167ffffffffffffffff811115613aa757613aa76148e3565b6040519080825280601f01601f191660200182016040528015613ad1576020820181803683370190505b5090505b841561303c57613ae6600183614d7e565b9150613af3600a86614fb5565b613afe906030614e11565b60f81b818381518110613b1357613b13614b0e565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613b4d600a86614dfd565b9450613ad5565b73ffffffffffffffffffffffffffffffffffffffff83161580613b9757507f00000000000000000000000000000000000000000000000000000000635ad5304210155b613be35760405162461bcd60e51b815260206004820152601060248201527f4e4f545f4c41554e434845445f594554000000000000000000000000000000006044820152606401610d2f565b610ddd83838361403b565b600061278667ffffffff00000000602084901b1663ffffffff8516614e11565b73ffffffffffffffffffffffffffffffffffffffff8216613c715760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d2f565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613ce35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d2f565b613cef60008383613b54565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290613d25908490614e11565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600143034033613db960085490565b5a604051602001613e08949392919093845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208401526034830152605482015260740190565b6040516020818303038152906040528051906020012060001c905090565b60e082901c8115613e3a5761040017610bb9565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbff1692915050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15614030576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613ed9903390899088908890600401615030565b6020604051808303816000875af1925050508015613f32575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613f2f91810190615079565b60015b613fe5573d808015613f60576040519150601f19603f3d011682016040523d82523d6000602084013e613f65565b606091505b508051600003613fdd5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610d2f565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061303c565b506001949350505050565b73ffffffffffffffffffffffffffffffffffffffff83166140a35761409e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6140e0565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146140e0576140e08382614141565b73ffffffffffffffffffffffffffffffffffffffff821661410457610ddd816141f8565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610ddd57610ddd82826142a7565b6000600161414e8461118b565b6141589190614d7e565b6000838152600760205260409020549091508082146141b85773ffffffffffffffffffffffffffffffffffffffff841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b50600091825260076020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600681528383209183525290812055565b60085460009061420a90600190614d7e565b6000838152600960205260408120546008805493945090928490811061423257614232614b0e565b90600052602060002001549050806008838154811061425357614253614b0e565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061428b5761428b615096565b6001900381819060005260206000200160009055905550505050565b60006142b28361118b565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001830191839082156143845791602002820160005b8382111561435257835183826101000a81548163ffffffff021916908363ffffffff160217905550926020019260040160208160030104928301926001030261430e565b80156143825782816101000a81549063ffffffff0219169055600401602081600301049283019260010302614352565b505b506143909291506143b2565b5090565b6040518060e001604052806007906020820280368337509192915050565b5b8082111561439057600081556001016143b3565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461198857600080fd5b60006020828403121561440757600080fd5b8135612786816143c7565b60005b8381101561442d578181015183820152602001614415565b50506000910152565b6000815180845261444e816020860160208601614412565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006127866020830184614436565b6000602082840312156144a557600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146135cd57600080fd5b600080604083850312156144e357600080fd5b6144ec836144ac565b946020939093013593505050565b60008060006060848603121561450f57600080fd5b614518846144ac565b9250614526602085016144ac565b9150604084013590509250925092565b60006020828403121561454857600080fd5b612786826144ac565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60408101600384106145bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9281526fffffffffffffffffffffffffffffffff9190911660209091015290565b600080602083850312156145ef57600080fd5b823567ffffffffffffffff8082111561460757600080fd5b818501915085601f83011261461b57600080fd5b81358181111561462a57600080fd5b86602082850101111561463c57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156146865783518352928401929184019160010161466a565b50909695505050505050565b80356fffffffffffffffffffffffffffffffff811681146135cd57600080fd5b600080600080608085870312156146c857600080fd5b8435935060208501359250604085013591506146e660608601614692565b905092959194509250565b803580151581146135cd57600080fd5b6000806040838503121561471457600080fd5b61471d836144ac565b915061472b602084016146f1565b90509250929050565b60008083601f84011261474657600080fd5b50813567ffffffffffffffff81111561475e57600080fd5b6020830191508360208260051b850101111561477957600080fd5b9250929050565b6000806000806000806060878903121561479957600080fd5b863567ffffffffffffffff808211156147b157600080fd5b6147bd8a838b01614734565b909850965060208901359150808211156147d657600080fd5b6147e28a838b01614734565b909650945060408901359150808211156147fb57600080fd5b818901915089601f83011261480f57600080fd5b81358181111561481e57600080fd5b8a602060e08302850101111561483357600080fd5b6020830194508093505050509295509295509295565b6000806000806000806060878903121561486257600080fd5b863567ffffffffffffffff8082111561487a57600080fd5b6148868a838b01614734565b9098509650602089013591508082111561489f57600080fd5b6148ab8a838b01614734565b909650945060408901359150808211156148c457600080fd5b506148d189828a01614734565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561492857600080fd5b614931856144ac565b935061493f602086016144ac565b925060408501359150606085013567ffffffffffffffff8082111561496357600080fd5b818701915087601f83011261497757600080fd5b813581811115614989576149896148e3565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156149cf576149cf6148e3565b816040528281528a60208487010111156149e857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080600060608486031215614a2157600080fd5b614a2a846144ac565b9250614a3860208501614692565b9150614a4660408501614692565b90509250925092565b60ff83168152610100810160208083018460005b6007811015614a8657815163ffffffff1683529183019190830190600101614a63565b505050509392505050565b60008060408385031215614aa457600080fd5b614aad836144ac565b915061472b602084016144ac565b600181811c90821680614acf57607f821691505b602082108103614b08577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b601f821115610ddd57600081815260208120601f850160051c81016020861015614b645750805b601f850160051c820191505b81811015614b8357828155600101614b70565b505050505050565b67ffffffffffffffff831115614ba357614ba36148e3565b614bb783614bb18354614abb565b83614b3d565b6000601f841160018114614c095760008515614bd35750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c9f565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614c585786850135825560209485019460019092019101614c38565b5086821015614c93577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000602080835260008454614cba81614abb565b80848701526040600180841660008114614cdb5760018114614d1357614d41565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838a01528284151560051b8a01019550614d41565b896000528660002060005b85811015614d395781548b8201860152908301908801614d1e565b8a0184019650505b509398975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610bb957610bb9614d4f565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614dc957614dc9614d4f565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614e0c57614e0c614dce565b500490565b80820180821115610bb957610bb9614d4f565b600060208284031215614e3657600080fd5b813560ff8116811461278657600080fd5b600060208284031215614e5957600080fd5b813563ffffffff8116811461278657600080fd5b600060208284031215614e7f57600080fd5b612786826146f1565b6fffffffffffffffffffffffffffffffff828116828216039080821115613a1857613a18614d4f565b60008351614ec3818460208801614412565b7f2f000000000000000000000000000000000000000000000000000000000000009083019081528351614efd816001840160208801614412565b01600101949350505050565b600060208284031215614f1b57600080fd5b81356003811061278657600080fd5b600060208284031215614f3c57600080fd5b61278682614692565b600081614f5457614f54614d4f565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600060ff821680614f8d57614f8d614d4f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0192915050565b600082614fc457614fc4614dce565b500690565b60006fffffffffffffffffffffffffffffffff808316818103614fee57614fee614d4f565b6001019392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361502957615029614d4f565b5060010190565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261506f6080830184614436565b9695505050505050565b60006020828403121561508b57600080fd5b8151612786816143c7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220e09d0fe48d2b739c2e166d84bb590f6ef25aa598acc26ef4e18abd680deaf1db64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000635ad53000000000000000000000000000000000000000000000000000000000635af1500000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f7374656e63696c732e66616374696f6e2e6172742f6170692f6d657461646174612f6d61696e6e6574000000000000000000000000000000
-----Decoded View---------------
Arg [0] : baseURI_ (string): https://stencils.faction.art/api/metadata/mainnet
Arg [1] : maxSupply_ (uint128): 500
Arg [2] : launchTimestamp_ (uint256): 1666897200
Arg [3] : auctionEndTimestamp_ (uint256): 1666904400
Arg [4] : startingPricePerTokenMint_ (uint256): 2000000000000000000
Arg [5] : auctionStages_ (uint256): 4
Arg [6] : physicalPrice_ (uint256): 1000000000000000000
Arg [7] : specialsTarget_ (uint128): 50
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [2] : 00000000000000000000000000000000000000000000000000000000635ad530
Arg [3] : 00000000000000000000000000000000000000000000000000000000635af150
Arg [4] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [6] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000031
Arg [9] : 68747470733a2f2f7374656e63696c732e66616374696f6e2e6172742f617069
Arg [10] : 2f6d657461646174612f6d61696e6e6574000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.