Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
2,829 PNDV
Holders
949
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 PNDVLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AmazingPandaverse
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: None pragma solidity ^0.8.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; contract AmazingPandaverse is Ownable, ERC721, VRFConsumerBaseV2 { using Address for address; using ECDSA for bytes32; event RandomIndexsCreated(uint64 subscriptionId, uint16 numWords); event BaseUriUpdated(string uri); event SaleInfoUpdated(bool presaleActive, uint256 publicPrice); event AdminMint(address minter, uint16 numberOfTokens); event BuyPresale(address buyer, uint16 numberOfTokens); event BuyPublic(address buyer, uint16 numberOfTokens); event Withdraw(address to, uint256 amount); uint256 public publicPrice; bool public presaleActive; uint16 constant PNDV_SUPPLY = 8888; uint16 constant PNDV_PRESALE_SUPPLY = 8100; uint16 public totalSupply = 0; uint16 presaleTotalSupply = 0; mapping(address => uint16) private adminMintSupplys; // 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; string public baseURI; address whitelistSigner = 0xDf174521DfF3677F8d19F1279F778a1F794c6B2c; VRFCoordinatorV2Interface COORDINATOR; address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; bytes32 keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; uint16 requestConfirmations = 3; uint16[] private randomIndexs; mapping(uint16 => uint16) private indexUpdated; mapping(address => uint256) public presaleMinted; bytes32 private constant TYPEHASH = keccak256("presale(address buyer,uint256 limit)"); // CONSTRUCTOR ************************************************** constructor() ERC721("Amazing Pandaverse", "PNDV") VRFConsumerBaseV2(vrfCoordinator) // VRF Coordinator { COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator); adminMintSupplys[0xD0De30dE1f1C53551FE2A7dfEFE556B2e64b0b8f] = 2000; adminMintSupplys[0x9582f10E1a3C91f48FbB6540C1102d2A3fcCb78a] = 2000; adminMintSupplys[0x5396c3166346f2Ba6E94F0ADAF57A3E53D4bfDa5] = 1500; adminMintSupplys[0x8A101aFf9e28e6daa682ac3aC5CB122Beb367AA6] = 1500; adminMintSupplys[0x4E249f4A67a3336E342AA4E51BcF2444130CC622] = 1000; } // PUBLIC METHODS **************************************************** function createRandomIndexs(uint64 subscriptionId, uint32 callbackGasLimit, uint16 numWords) public onlyOwner { uint16 len = uint16(PNDV_SUPPLY - randomIndexs.length); require(len > 0, "createRandomIndexs error: randomIndexs is full."); COORDINATOR.requestRandomWords( keyHash, subscriptionId, requestConfirmations, callbackGasLimit, len % numWords ); uint16 count = len / numWords; for (uint16 i = 0; i < count; i++) { COORDINATOR.requestRandomWords( keyHash, subscriptionId, requestConfirmations, callbackGasLimit, numWords ); } emit RandomIndexsCreated(subscriptionId, numWords); } /// @notice Allows users to buy during presale, only whitelisted addresses may call this function. /// Whitelisting is enforced by requiring a signature from the whitelistSigner address /// @dev Whitelist signing is performed off chain, via the cryptoPNDV website backend /// @param signature signed data authenticating the validity of this transaction /// @param numberOfTokens number of NFTs to buy /// @param approvedLimit the total number of NFTs this address is permitted to buy during presale, this number is also encoded in the signature function buyPresale( bytes calldata signature, uint16 numberOfTokens, uint256 approvedLimit ) public payable { require( presaleActive, "Presale is not active" ); require(whitelistSigner != address(0), "Whitelist signer has not been set"); require( msg.value == (0.15 ether * numberOfTokens), "Insufficient payment" ); require( (presaleMinted[msg.sender] + numberOfTokens) <= approvedLimit, "Presale mint limit exceeded" ); require( (presaleTotalSupply + numberOfTokens) <= PNDV_PRESALE_SUPPLY, "Not enough PNDV remaining in presale" ); bytes32 digest = keccak256(abi.encodePacked(TYPEHASH, msg.sender, approvedLimit)); address signer = digest.toEthSignedMessageHash().recover(signature); require( signer != address(0) && signer == whitelistSigner, "Invalid signature" ); presaleMinted[msg.sender] = presaleMinted[msg.sender] + numberOfTokens; presaleTotalSupply += numberOfTokens; mint(msg.sender, numberOfTokens); emit BuyPresale(msg.sender, numberOfTokens); } /// @notice Allows users to buy during public sale, pricing follows a dutch auction format /// @dev Preventing contract buys has some downsides, but it seems to be what the NFT market generally wants as a bot mitigation measure /// @param numberOfTokens the number of NFTs to buy function buyPublic(uint16 numberOfTokens) public payable { // disallow contracts from buying require( (!msg.sender.isContract() && msg.sender == tx.origin), "Contract buys not allowed" ); require(publicPrice > 0, "Public sale is not active"); require(numberOfTokens <= 3, "Mint limit exceeded"); uint256 mintPrice = publicPrice * numberOfTokens; require(msg.value == mintPrice, "Insufficient payment"); mint(msg.sender, numberOfTokens); emit BuyPublic(msg.sender, numberOfTokens); } function adminMint(address to, uint16 numberOfTokens) public payable { require( (presaleTotalSupply + numberOfTokens) <= PNDV_PRESALE_SUPPLY, "Not enough PNDV remaining in presale" ); if (msg.sender != owner()) { require(numberOfTokens <= adminMintSupplys[msg.sender], "Not Authorised or Admin Mint limit exceeded"); require( msg.value == (0.15 ether * numberOfTokens), "Incorrect payment" ); adminMintSupplys[msg.sender] = adminMintSupplys[msg.sender] - numberOfTokens; } mint(to, numberOfTokens); presaleTotalSupply += numberOfTokens; emit AdminMint(to, numberOfTokens); } /// @notice Gets an array of tokenIds owned by a wallet /// @param wallet wallet address to query contents for /// @return an array of tokenIds owned by wallet function tokensOwnedBy(address wallet) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(wallet); uint256[] memory ownedTokenIds = new uint256[](tokenCount); for (uint256 i = 0; i < tokenCount; i++) { ownedTokenIds[i] = _ownedTokens[wallet][i]; } return ownedTokenIds; } /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view override(ERC721) returns (bool) { return super.supportsInterface(interfaceId); } // OWNER METHODS ******************************************************** function setBaseURI(string calldata newBaseUri) public onlyOwner { baseURI = newBaseUri; emit BaseUriUpdated(newBaseUri); } function setSaleInfo(bool presaleActive_, uint256 publicPrice_) public onlyOwner { presaleActive = presaleActive_; publicPrice = publicPrice_; emit SaleInfoUpdated(presaleActive_, publicPrice_); } function withdraw(address payable to, uint256 amount) external onlyOwner { require(amount <= address(this).balance, "Insufficient balance."); uint256 perAmount = amount / 100; Address.sendValue(to, perAmount * 95); Address.sendValue(payable(0x61Fc286855Ee7BAeF8B8038bA769d350aA53D498), perAmount * 5); emit Withdraw(to, amount); } function withdrawOtherTokens(address tokenAddress, uint256 amount )external onlyOwner { require(address(this) != tokenAddress); IERC20 otherTokens = IERC20(tokenAddress); otherTokens.transfer(msg.sender, amount); } // PRIVATE/INTERNAL METHODS **************************************************** function _baseURI() internal view override returns (string memory) { return baseURI; } function fulfillRandomWords(uint256, uint256[] memory randomWords) internal override { for (uint16 i = 0; i < randomWords.length; i++) { uint16 index = uint16(randomWords[i] % (PNDV_SUPPLY - randomIndexs.length)); randomIndexs.push(index); } } function mint(address to, uint16 numberOfTokens) private { uint16 remaining = PNDV_SUPPLY - totalSupply; require(remaining >= numberOfTokens, "Not enough PNDV remaining"); // require(randomIndexs.length >= totalSupply + numberOfTokens, "Not enough randomIndexs remaining"); for (uint256 i = 0; i < numberOfTokens; i++) { uint16 index = randomIndexs[i + totalSupply]; uint256 tokenId = indexUpdated[index] > 0 ? indexUpdated[index] : index + 1; indexUpdated[index] = indexUpdated[remaining - 1] > 0 ? indexUpdated[remaining - 1] : remaining; _safeMint(to, tokenId); remaining --; } totalSupply += numberOfTokens; } // ************************************************************************************************************************ // The following methods are borrowed from OpenZeppelin's ERC721Enumerable contract, to make it easier to query a wallet's // contents without incurring the extra storage gas costs of the full ERC721Enumerable extension // ************************************************************************************************************************ /** * @dev Private function to add a token to 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 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 repres enting 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 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)) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to != address(0)) { _addTokenToOwnerEnumeration(to, tokenId); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be 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 owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _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: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || 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 a {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 a {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 Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @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 (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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); }
{ "optimizer": { "enabled": true, "runs": 1 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint16","name":"numberOfTokens","type":"uint16"}],"name":"AdminMint","type":"event"},{"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":false,"internalType":"string","name":"uri","type":"string"}],"name":"BaseUriUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint16","name":"numberOfTokens","type":"uint16"}],"name":"BuyPresale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint16","name":"numberOfTokens","type":"uint16"}],"name":"BuyPublic","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"indexed":false,"internalType":"uint16","name":"numWords","type":"uint16"}],"name":"RandomIndexsCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"presaleActive","type":"bool"},{"indexed":false,"internalType":"uint256","name":"publicPrice","type":"uint256"}],"name":"SaleInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"numberOfTokens","type":"uint16"}],"name":"adminMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint16","name":"numberOfTokens","type":"uint16"},{"internalType":"uint256","name":"approvedLimit","type":"uint256"}],"name":"buyPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"numberOfTokens","type":"uint16"}],"name":"buyPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint16","name":"numWords","type":"uint16"}],"name":"createRandomIndexs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"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":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"presaleActive_","type":"bool"},{"internalType":"uint256","name":"publicPrice_","type":"uint256"}],"name":"setSaleInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"tokensOwnedBy","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawOtherTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040526008805464ffffffff0019169055600d80546001600160a01b031990811673df174521dff3677f8d19f1279f778a1f794c6b2c17909155600f805490911673271682deb8c4e0901d1a1550ad2e64d568e699091790557f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef6010556011805461ffff191660031790553480156200009957600080fd5b50600f546040805180820182526012815271416d617a696e672050616e6461766572736560701b602080830191909152825180840190935260048352632827222b60e11b908301526001600160a01b039092169190620000f93362000261565b81516200010e906001906020850190620002b1565b50805162000124906002906020840190620002b1565b50505060601b6001600160601b031916608052600f54600e80546001600160a01b039092166001600160a01b031990921691909117905560096020527fd69fe20347efd8d9c1c5e30dc1dca6c55b390431ea7f24020309ba03c8d529a080546107d061ffff1991821681179092557f0e0625ed442d58fddc06e0ec15f89a4c783a9cadf7b719884a905dfa8514588c805482169092179091557f0390db2026903d2baddf8cd279f92b6c21a8c2d150727c3b9eeaff1803ec148b80546105dc90831681179091557f954fc09aa1ce7522e897771ccf279218001f668c160bc3253451745df7dd1237805483169091179055734e249f4a67a3336e342aa4e51bcf2444130cc6226000527f8173cdfde941a2c6ccfae4e89651ff26c2f9df5ab4f375e705a6178178ab18d580546103e8921691909117905562000394565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620002bf9062000357565b90600052602060002090601f016020900481019282620002e357600085556200032e565b82601f10620002fe57805160ff19168380011785556200032e565b828001600101855582156200032e579182015b828111156200032e57825182559160200191906001019062000311565b506200033c92915062000340565b5090565b5b808211156200033c576000815560010162000341565b600181811c908216806200036c57607f821691505b602082108114156200038e57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c6134ad620003ba600039600081816107a201526107e401526134ad6000f3fe6080604052600436106101685760003560e01c806301ffc9a71461016d57806306fdde03146101a2578063081812fc146101c4578063095ea7b3146101fc57806318160ddd1461021e5780631fe543e31461025157806323b872dd1461027157806342842e0e14610291578063501fef55146102b157806353135ca0146102d157806353f856ee146102eb57806355f804b31461030b5780636352211e1461032b5780636c0360eb1461034b57806370a0823114610360578063715018a61461038e5780637ab1c623146103a3578063891aa97f146103b65780638da5cb5b146103d657806395d89b41146103eb578063a22cb46514610400578063a2fb39c614610420578063a945bf8014610433578063b88d4fde14610449578063bc660cac14610469578063c87b56dd14610496578063e985e9c5146104b6578063ea66aeb3146104d6578063f2fde38b14610503578063f3fef3a314610523578063ff0e32f914610543575b600080fd5b34801561017957600080fd5b5061018d610188366004612c8c565b610556565b60405190151581526020015b60405180910390f35b3480156101ae57600080fd5b506101b7610567565b604051610199919061303a565b3480156101d057600080fd5b506101e46101df366004612d7d565b6105f9565b6040516001600160a01b039091168152602001610199565b34801561020857600080fd5b5061021c610217366004612a85565b610686565b005b34801561022a57600080fd5b5060085461023e90610100900461ffff1681565b60405161ffff9091168152602001610199565b34801561025d57600080fd5b5061021c61026c366004612daf565b610797565b34801561027d57600080fd5b5061021c61028c366004612aea565b61081f565b34801561029d57600080fd5b5061021c6102ac366004612aea565b610850565b3480156102bd57600080fd5b5061021c6102cc366004612c6e565b61086b565b3480156102dd57600080fd5b5060085461018d9060ff1681565b3480156102f757600080fd5b5061021c610306366004612a85565b6108ee565b34801561031757600080fd5b5061021c610326366004612d21565b6109bb565b34801561033757600080fd5b506101e4610346366004612d7d565b610a28565b34801561035757600080fd5b506101b7610a9f565b34801561036c57600080fd5b5061038061037b366004612a68565b610b2d565b604051908152602001610199565b34801561039a57600080fd5b5061021c610bb4565b61021c6103b1366004612c1c565b610bef565b3480156103c257600080fd5b5061021c6103d1366004612e67565b610de1565b3480156103e257600080fd5b506101e4611044565b3480156103f757600080fd5b506101b7611053565b34801561040c57600080fd5b5061021c61041b366004612bee565b611062565b61021c61042e366004612d62565b61106d565b34801561043f57600080fd5b5061038060075481565b34801561045557600080fd5b5061021c610464366004612b2b565b6111d3565b34801561047557600080fd5b50610380610484366004612a68565b60146020526000908152604090205481565b3480156104a257600080fd5b506101b76104b1366004612d7d565b611205565b3480156104c257600080fd5b5061018d6104d1366004612ab1565b6112d0565b3480156104e257600080fd5b506104f66104f1366004612a68565b6112fe565b6040516101999190612f91565b34801561050f57600080fd5b5061021c61051e366004612a68565b6113bb565b34801561052f57600080fd5b5061021c61053e366004612a85565b61145b565b61021c610551366004612cc6565b611556565b6000610561826118b7565b92915050565b60606001805461057690613303565b80601f01602080910402602001604051908101604052809291908181526020018280546105a290613303565b80156105ef5780601f106105c4576101008083540402835291602001916105ef565b820191906000526020600020905b8154815290600101906020018083116105d257829003601f168201915b5050505050905090565b600061060482611907565b61066a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061069182610a28565b9050806001600160a01b0316836001600160a01b031614156106ff5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610661565b336001600160a01b038216148061071b575061071b81336112d0565b6107885760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610661565b6107928383611924565b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108115760405163073e64fd60e21b81523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610661565b61081b8282611992565b5050565b6108293382611a4b565b6108455760405162461bcd60e51b815260040161066190613146565b610792838383611b15565b610792838383604051806020016040528060008152506111d3565b33610874611044565b6001600160a01b03161461089a5760405162461bcd60e51b815260040161066190613111565b6008805460ff1916831515908117909155600782905560408051918252602082018390527f3a9aa70602a7c4b6a48ccf118f9e8525aa28dcb35a931d0346259632f77821a791015b60405180910390a15050565b336108f7611044565b6001600160a01b03161461091d5760405162461bcd60e51b815260040161066190613111565b306001600160a01b038316141561093357600080fd5b60405163a9059cbb60e01b815282906001600160a01b0382169063a9059cbb906109639033908690600401612f1e565b602060405180830381600087803b15801561097d57600080fd5b505af1158015610991573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b59190612c51565b50505050565b336109c4611044565b6001600160a01b0316146109ea5760405162461bcd60e51b815260040161066190613111565b6109f6600c8383612977565b507f24a9152dc695ecc801ad580886331ee12d7aac0fa2ae341a5ae3c2ccae36cb4f82826040516108e292919061300b565b6000818152600360205260408120546001600160a01b0316806105615760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610661565b600c8054610aac90613303565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad890613303565b8015610b255780601f10610afa57610100808354040283529160200191610b25565b820191906000526020600020905b815481529060010190602001808311610b0857829003601f168201915b505050505081565b60006001600160a01b038216610b985760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610661565b506001600160a01b031660009081526004602052604090205490565b33610bbd611044565b6001600160a01b031614610be35760405162461bcd60e51b815260040161066190613111565b610bed6000611caa565b565b600854611fa490610c0c9083906301000000900461ffff166131c7565b61ffff161115610c2e5760405162461bcd60e51b81526004016106619061309f565b610c36611044565b6001600160a01b0316336001600160a01b031614610d6d573360009081526009602052604090205461ffff9081169082161115610cc95760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420417574686f7269736564206f722041646d696e204d696e74206c696d60448201526a1a5d08195e18d95959195960aa1b6064820152608401610661565b610cdf61ffff8216670214e8348c4f0000613250565b6001600160401b03163414610d2a5760405162461bcd60e51b8152602060048201526011602482015270125b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610661565b33600090815260096020526040902054610d4990829061ffff1661327f565b336000908152600960205260409020805461ffff191661ffff929092169190911790555b610d778282611cfa565b80600860038282829054906101000a900461ffff16610d9691906131c7565b92506101000a81548161ffff021916908361ffff1602179055507fca763cf5830a94239587040902439b4d9c4d77c35197112304fe221346a89ecc82826040516108e2929190612f74565b33610dea611044565b6001600160a01b031614610e105760405162461bcd60e51b815260040161066190613111565b601254600090610e22906122b86132a2565b905060008161ffff1611610e905760405162461bcd60e51b815260206004820152602f60248201527f63726561746552616e646f6d496e64657873206572726f723a2072616e646f6d60448201526e24b73232bc399034b990333ab6361760891b6064820152608401610661565b600e546010546011546001600160a01b0390921691635d3b1d309190879061ffff1687610ebd888861337b565b6040518663ffffffff1660e01b8152600401610edd959493929190612fd5565b602060405180830381600087803b158015610ef757600080fd5b505af1158015610f0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2f9190612d96565b506000610f3c83836131fc565b905060005b8161ffff168161ffff161015610ff757600e546010546011546040516305d3b1d360e41b81526001600160a01b0390931692635d3b1d3092610f929290918b9161ffff16908b908b90600401612fd5565b602060405180830381600087803b158015610fac57600080fd5b505af1158015610fc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe49190612d96565b5080610fef8161333e565b915050610f41565b50604080516001600160401b038716815261ffff851660208201527f1c561ddde6579c1ab1f76e23eb0dd4dbfe979aabdb007a6812327dbab702ea2c910160405180910390a15050505050565b6000546001600160a01b031690565b60606002805461057690613303565b61081b338383611ef8565b61107633611fc3565b15801561108257503332145b6110ca5760405162461bcd60e51b815260206004820152601960248201527810dbdb9d1c9858dd08189d5e5cc81b9bdd08185b1b1bddd959603a1b6044820152606401610661565b6000600754116111185760405162461bcd60e51b81526020600482015260196024820152785075626c69632073616c65206973206e6f742061637469766560381b6044820152606401610661565b60038161ffff1611156111635760405162461bcd60e51b8152602060048201526013602482015272135a5b9d081b1a5b5a5d08195e18d959591959606a1b6044820152606401610661565b60008161ffff166007546111779190613231565b90508034146111985760405162461bcd60e51b8152600401610661906130e3565b6111a23383611cfa565b7fc5f853cc0609f5243dca14d561cb1a954ccba574e0ded5d1331039c8b07cc5ae33836040516108e2929190612f74565b6111dd3383611a4b565b6111f95760405162461bcd60e51b815260040161066190613146565b6109b584848484611fd2565b606061121082611907565b6112745760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610661565b600061127e612005565b9050600081511161129e57604051806020016040528060008152506112c9565b806112a884612014565b6040516020016112b9929190612eef565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6060600061130b83610b2d565b90506000816001600160401b0381111561132757611327613408565b604051908082528060200260200182016040528015611350578160200160208202803683370190505b50905060005b828110156113b3576001600160a01b0385166000908152600a602090815260408083208484529091529020548251839083908110611396576113966133f2565b6020908102919091010152806113ab81613360565b915050611356565b509392505050565b336113c4611044565b6001600160a01b0316146113ea5760405162461bcd60e51b815260040161066190613111565b6001600160a01b03811661144f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610661565b61145881611caa565b50565b33611464611044565b6001600160a01b03161461148a5760405162461bcd60e51b815260040161066190613111565b478111156114d25760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b6044820152606401610661565b60006114df60648361321d565b90506114f5836114f083605f613231565b612111565b6115187361fc286855ee7baef8b8038ba769d350aa53d4986114f0836005613231565b7f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648383604051611549929190612f1e565b60405180910390a1505050565b60085460ff166115a05760405162461bcd60e51b815260206004820152601560248201527450726573616c65206973206e6f742061637469766560581b6044820152606401610661565b600d546001600160a01b03166116025760405162461bcd60e51b815260206004820152602160248201527f57686974656c697374207369676e657220686173206e6f74206265656e2073656044820152601d60fa1b6064820152608401610661565b61161861ffff8316670214e8348c4f0000613250565b6001600160401b0316341461163f5760405162461bcd60e51b8152600401610661906130e3565b3360009081526014602052604090205481906116609061ffff8516906131e4565b11156116ac5760405162461bcd60e51b815260206004820152601b60248201527a141c995cd85b19481b5a5b9d081b1a5b5a5d08195e18d959591959602a1b6044820152606401610661565b600854611fa4906116c99084906301000000900461ffff166131c7565b61ffff1611156116eb5760405162461bcd60e51b81526004016106619061309f565b604080517f62b1d609957efd7198a66f841063387013c1f07f57cbb6ae3cd625ddd9f9ebab60208201526001600160601b03193360601b169181019190915260548101829052600090607401604051602081830303815290604052805190602001209050600061179c86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061179692508691506122279050565b90612279565b90506001600160a01b038116158015906117c35750600d546001600160a01b038281169116145b6118035760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610661565b336000908152601460205260409020546118229061ffff8616906131e4565b33600090815260146020526040902055600880548591906003906118529084906301000000900461ffff166131c7565b92506101000a81548161ffff021916908361ffff1602179055506118763385611cfa565b7f8e27e019812e2c3ec56472216ccb68136125853162bcdaf9f66b0eb221fcf93933856040516118a7929190612f74565b60405180910390a1505050505050565b60006001600160e01b031982166380ac58cd60e01b14806118e857506001600160e01b03198216635b5e139f60e01b145b8061056157506301ffc9a760e01b6001600160e01b0319831614610561565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061195982610a28565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60005b81518161ffff161015610792576012546000906119b4906122b86132a2565b838361ffff16815181106119ca576119ca6133f2565b60200260200101516119dc919061339c565b601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344460108204018054600f9092166002026101000a61ffff8181021990931693909216919091029190911790555080611a438161333e565b915050611995565b6000611a5682611907565b611ab75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610661565b6000611ac283610a28565b9050806001600160a01b0316846001600160a01b03161480611ae95750611ae981856112d0565b80611b0d5750836001600160a01b0316611b02846105f9565b6001600160a01b0316145b949350505050565b826001600160a01b0316611b2882610a28565b6001600160a01b031614611b8c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610661565b6001600160a01b038216611bee5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610661565b611bf9838383612295565b611c04600082611924565b6001600160a01b0383166000908152600460205260408120805460019290611c2d9084906132a2565b90915550506001600160a01b0382166000908152600460205260408120805460019290611c5b9084906131e4565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061345883398151915291a4505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600854600090611d1590610100900461ffff166122b861327f565b90508161ffff168161ffff161015611d6b5760405162461bcd60e51b81526020600482015260196024820152784e6f7420656e6f75676820504e44562072656d61696e696e6760381b6044820152606401610661565b60005b8261ffff16811015611eb957600854600090601290611d9690610100900461ffff16846131e4565b81548110611da657611da66133f2565b60009182526020808320601083040154600f9092166002026101000a90910461ffff9081168084526013909252604083205491935016611df057611deb8260016131c7565b611e07565b61ffff808316600090815260136020526040902054165b61ffff1690506000601381611e1d60018861327f565b61ffff90811682526020820192909252604001600020541611611e405783611e68565b60136000611e4f60018761327f565b61ffff9081168252602082019290925260400160002054165b61ffff8381166000908152601360205260409020805461ffff191692909116919091179055611e9786826122c7565b83611ea1816132e5565b94505050508080611eb190613360565b915050611d6e565b5081600860018282829054906101000a900461ffff16611ed991906131c7565b92506101000a81548161ffff021916908361ffff160217905550505050565b816001600160a01b0316836001600160a01b03161415611f565760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610661565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03163b151590565b611fdd848484611b15565b611fe9848484846122e1565b6109b55760405162461bcd60e51b81526004016106619061304d565b6060600c805461057690613303565b6060816120385750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612062578061204c81613360565b915061205b9050600a8361321d565b915061203c565b6000816001600160401b0381111561207c5761207c613408565b6040519080825280601f01601f1916602001820160405280156120a6576020820181803683370190505b5090505b8415611b0d576120bb6001836132a2565b91506120c8600a8661339c565b6120d39060306131e4565b60f81b8183815181106120e8576120e86133f2565b60200101906001600160f81b031916908160001a90535061210a600a8661321d565b94506120aa565b804710156121615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610661565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146121ae576040519150601f19603f3d011682016040523d82523d6000602084013e6121b3565b606091505b50509050806107925760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b6064820152608401610661565b6040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b600080600061228885856123f5565b915091506113b381612465565b6001600160a01b038316156122ae576122ae838261261b565b6001600160a01b038216156107925761079282826126b8565b61081b8282604051806020016040528060008152506126fc565b60006122f5846001600160a01b0316611fc3565b156123ea57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061232c903390899088908890600401612f37565b602060405180830381600087803b15801561234657600080fd5b505af1925050508015612376575060408051601f3d908101601f1916820190925261237391810190612ca9565b60015b6123d0573d8080156123a4576040519150601f19603f3d011682016040523d82523d6000602084013e6123a9565b606091505b5080516123c85760405162461bcd60e51b81526004016106619061304d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b0d565b506001949350505050565b60008082516041141561242c5760208301516040840151606085015160001a6124208782858561272f565b9450945050505061245e565b825160401415612456576020830151604084015161244b868383612812565b93509350505061245e565b506000905060025b9250929050565b6000816004811115612479576124796133dc565b14156124825750565b6001816004811115612496576124966133dc565b14156124df5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610661565b60028160048111156124f3576124f36133dc565b14156125415760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610661565b6003816004811115612555576125556133dc565b14156125ae5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610661565b60048160048111156125c2576125c26133dc565b14156114585760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610661565b6000600161262884610b2d565b61263291906132a2565b6000838152600b6020526040902054909150808214612685576001600160a01b0384166000908152600a602090815260408083208584528252808320548484528184208190558352600b90915290208190555b506000918252600b602090815260408084208490556001600160a01b039094168352600a81528383209183525290812055565b60006126c383610b2d565b6001600160a01b039093166000908152600a602090815260408083208684528252808320859055938252600b9052919091209190915550565b612706838361284b565b61271360008484846122e1565b6107925760405162461bcd60e51b81526004016106619061304d565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561275c5750600090506003612809565b8460ff16601b1415801561277457508460ff16601c14155b156127855750600090506004612809565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156127d9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661280257600060019250925050612809565b9150600090505b94509492505050565b6000806001600160ff1b0383168161282f60ff86901c601b6131e4565b905061283d8782888561272f565b935093505050935093915050565b6001600160a01b0382166128a15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610661565b6128aa81611907565b156128f65760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610661565b61290260008383612295565b6001600160a01b038216600090815260046020526040812080546001929061292b9084906131e4565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020613458833981519152908290a45050565b82805461298390613303565b90600052602060002090601f0160209004810192826129a557600085556129eb565b82601f106129be5782800160ff198235161785556129eb565b828001600101855582156129eb579182015b828111156129eb5782358255916020019190600101906129d0565b506129f79291506129fb565b5090565b5b808211156129f757600081556001016129fc565b60008083601f840112612a2257600080fd5b5081356001600160401b03811115612a3957600080fd5b60208301915083602082850101111561245e57600080fd5b803561ffff81168114612a6357600080fd5b919050565b600060208284031215612a7a57600080fd5b81356112c98161341e565b60008060408385031215612a9857600080fd5b8235612aa38161341e565b946020939093013593505050565b60008060408385031215612ac457600080fd5b8235612acf8161341e565b91506020830135612adf8161341e565b809150509250929050565b600080600060608486031215612aff57600080fd5b8335612b0a8161341e565b92506020840135612b1a8161341e565b929592945050506040919091013590565b60008060008060808587031215612b4157600080fd5b8435612b4c8161341e565b9350602085810135612b5d8161341e565b93506040860135925060608601356001600160401b0380821115612b8057600080fd5b818801915088601f830112612b9457600080fd5b813581811115612ba657612ba6613408565b612bb8601f8201601f19168501613197565b91508082528984828501011115612bce57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060408385031215612c0157600080fd5b8235612c0c8161341e565b91506020830135612adf81613433565b60008060408385031215612c2f57600080fd5b8235612c3a8161341e565b9150612c4860208401612a51565b90509250929050565b600060208284031215612c6357600080fd5b81516112c981613433565b60008060408385031215612c8157600080fd5b8235612aa381613433565b600060208284031215612c9e57600080fd5b81356112c981613441565b600060208284031215612cbb57600080fd5b81516112c981613441565b60008060008060608587031215612cdc57600080fd5b84356001600160401b03811115612cf257600080fd5b612cfe87828801612a10565b9095509350612d11905060208601612a51565b9396929550929360400135925050565b60008060208385031215612d3457600080fd5b82356001600160401b03811115612d4a57600080fd5b612d5685828601612a10565b90969095509350505050565b600060208284031215612d7457600080fd5b6112c982612a51565b600060208284031215612d8f57600080fd5b5035919050565b600060208284031215612da857600080fd5b5051919050565b60008060408385031215612dc257600080fd5b823591506020808401356001600160401b0380821115612de157600080fd5b818601915086601f830112612df557600080fd5b813581811115612e0757612e07613408565b8060051b9150612e18848301613197565b8181528481019084860184860187018b1015612e3357600080fd5b600095505b83861015612e56578035835260019590950194918601918601612e38565b508096505050505050509250929050565b600080600060608486031215612e7c57600080fd5b83356001600160401b0381168114612e9357600080fd5b9250602084013563ffffffff81168114612eac57600080fd5b9150612eba60408501612a51565b90509250925092565b60008151808452612edb8160208601602086016132b9565b601f01601f19169290920160200192915050565b60008351612f018184602088016132b9565b835190830190612f158183602088016132b9565b01949350505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f6a90830184612ec3565b9695505050505050565b6001600160a01b0392909216825261ffff16602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015612fc957835183529284019291840191600101612fad565b50909695505050505050565b9485526001600160401b0393909316602085015261ffff918216604085015263ffffffff16606084015216608082015260a00190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6020815260006112c96020830184612ec3565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526024908201527f4e6f7420656e6f75676820504e44562072656d61696e696e6720696e2070726560408201526373616c6560e01b606082015260800190565b602080825260149082015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b03811182821017156131bf576131bf613408565b604052919050565b600061ffff808316818516808303821115612f1557612f156133b0565b600082198211156131f7576131f76133b0565b500190565b600061ffff80841680613211576132116133c6565b92169190910492915050565b60008261322c5761322c6133c6565b500490565b600081600019048311821515161561324b5761324b6133b0565b500290565b60006001600160401b0382811684821681151582840482111615613276576132766133b0565b02949350505050565b600061ffff8381169083168181101561329a5761329a6133b0565b039392505050565b6000828210156132b4576132b46133b0565b500390565b60005b838110156132d45781810151838201526020016132bc565b838111156109b55750506000910152565b600061ffff8216806132f9576132f96133b0565b6000190192915050565b600181811c9082168061331757607f821691505b6020821081141561333857634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415613356576133566133b0565b6001019392505050565b6000600019821415613374576133746133b0565b5060010190565b600061ffff80841680613390576133906133c6565b92169190910692915050565b6000826133ab576133ab6133c6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461145857600080fd5b801515811461145857600080fd5b6001600160e01b03198116811461145857600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212206be42acf25793c7c995243592caee35e2cc587ff3534a1ba8ae90707b8cef2d164736f6c63430008070033
Deployed Bytecode
0x6080604052600436106101685760003560e01c806301ffc9a71461016d57806306fdde03146101a2578063081812fc146101c4578063095ea7b3146101fc57806318160ddd1461021e5780631fe543e31461025157806323b872dd1461027157806342842e0e14610291578063501fef55146102b157806353135ca0146102d157806353f856ee146102eb57806355f804b31461030b5780636352211e1461032b5780636c0360eb1461034b57806370a0823114610360578063715018a61461038e5780637ab1c623146103a3578063891aa97f146103b65780638da5cb5b146103d657806395d89b41146103eb578063a22cb46514610400578063a2fb39c614610420578063a945bf8014610433578063b88d4fde14610449578063bc660cac14610469578063c87b56dd14610496578063e985e9c5146104b6578063ea66aeb3146104d6578063f2fde38b14610503578063f3fef3a314610523578063ff0e32f914610543575b600080fd5b34801561017957600080fd5b5061018d610188366004612c8c565b610556565b60405190151581526020015b60405180910390f35b3480156101ae57600080fd5b506101b7610567565b604051610199919061303a565b3480156101d057600080fd5b506101e46101df366004612d7d565b6105f9565b6040516001600160a01b039091168152602001610199565b34801561020857600080fd5b5061021c610217366004612a85565b610686565b005b34801561022a57600080fd5b5060085461023e90610100900461ffff1681565b60405161ffff9091168152602001610199565b34801561025d57600080fd5b5061021c61026c366004612daf565b610797565b34801561027d57600080fd5b5061021c61028c366004612aea565b61081f565b34801561029d57600080fd5b5061021c6102ac366004612aea565b610850565b3480156102bd57600080fd5b5061021c6102cc366004612c6e565b61086b565b3480156102dd57600080fd5b5060085461018d9060ff1681565b3480156102f757600080fd5b5061021c610306366004612a85565b6108ee565b34801561031757600080fd5b5061021c610326366004612d21565b6109bb565b34801561033757600080fd5b506101e4610346366004612d7d565b610a28565b34801561035757600080fd5b506101b7610a9f565b34801561036c57600080fd5b5061038061037b366004612a68565b610b2d565b604051908152602001610199565b34801561039a57600080fd5b5061021c610bb4565b61021c6103b1366004612c1c565b610bef565b3480156103c257600080fd5b5061021c6103d1366004612e67565b610de1565b3480156103e257600080fd5b506101e4611044565b3480156103f757600080fd5b506101b7611053565b34801561040c57600080fd5b5061021c61041b366004612bee565b611062565b61021c61042e366004612d62565b61106d565b34801561043f57600080fd5b5061038060075481565b34801561045557600080fd5b5061021c610464366004612b2b565b6111d3565b34801561047557600080fd5b50610380610484366004612a68565b60146020526000908152604090205481565b3480156104a257600080fd5b506101b76104b1366004612d7d565b611205565b3480156104c257600080fd5b5061018d6104d1366004612ab1565b6112d0565b3480156104e257600080fd5b506104f66104f1366004612a68565b6112fe565b6040516101999190612f91565b34801561050f57600080fd5b5061021c61051e366004612a68565b6113bb565b34801561052f57600080fd5b5061021c61053e366004612a85565b61145b565b61021c610551366004612cc6565b611556565b6000610561826118b7565b92915050565b60606001805461057690613303565b80601f01602080910402602001604051908101604052809291908181526020018280546105a290613303565b80156105ef5780601f106105c4576101008083540402835291602001916105ef565b820191906000526020600020905b8154815290600101906020018083116105d257829003601f168201915b5050505050905090565b600061060482611907565b61066a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061069182610a28565b9050806001600160a01b0316836001600160a01b031614156106ff5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610661565b336001600160a01b038216148061071b575061071b81336112d0565b6107885760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610661565b6107928383611924565b505050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916146108115760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610661565b61081b8282611992565b5050565b6108293382611a4b565b6108455760405162461bcd60e51b815260040161066190613146565b610792838383611b15565b610792838383604051806020016040528060008152506111d3565b33610874611044565b6001600160a01b03161461089a5760405162461bcd60e51b815260040161066190613111565b6008805460ff1916831515908117909155600782905560408051918252602082018390527f3a9aa70602a7c4b6a48ccf118f9e8525aa28dcb35a931d0346259632f77821a791015b60405180910390a15050565b336108f7611044565b6001600160a01b03161461091d5760405162461bcd60e51b815260040161066190613111565b306001600160a01b038316141561093357600080fd5b60405163a9059cbb60e01b815282906001600160a01b0382169063a9059cbb906109639033908690600401612f1e565b602060405180830381600087803b15801561097d57600080fd5b505af1158015610991573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b59190612c51565b50505050565b336109c4611044565b6001600160a01b0316146109ea5760405162461bcd60e51b815260040161066190613111565b6109f6600c8383612977565b507f24a9152dc695ecc801ad580886331ee12d7aac0fa2ae341a5ae3c2ccae36cb4f82826040516108e292919061300b565b6000818152600360205260408120546001600160a01b0316806105615760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610661565b600c8054610aac90613303565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad890613303565b8015610b255780601f10610afa57610100808354040283529160200191610b25565b820191906000526020600020905b815481529060010190602001808311610b0857829003601f168201915b505050505081565b60006001600160a01b038216610b985760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610661565b506001600160a01b031660009081526004602052604090205490565b33610bbd611044565b6001600160a01b031614610be35760405162461bcd60e51b815260040161066190613111565b610bed6000611caa565b565b600854611fa490610c0c9083906301000000900461ffff166131c7565b61ffff161115610c2e5760405162461bcd60e51b81526004016106619061309f565b610c36611044565b6001600160a01b0316336001600160a01b031614610d6d573360009081526009602052604090205461ffff9081169082161115610cc95760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420417574686f7269736564206f722041646d696e204d696e74206c696d60448201526a1a5d08195e18d95959195960aa1b6064820152608401610661565b610cdf61ffff8216670214e8348c4f0000613250565b6001600160401b03163414610d2a5760405162461bcd60e51b8152602060048201526011602482015270125b98dbdc9c9958dd081c185e5b595b9d607a1b6044820152606401610661565b33600090815260096020526040902054610d4990829061ffff1661327f565b336000908152600960205260409020805461ffff191661ffff929092169190911790555b610d778282611cfa565b80600860038282829054906101000a900461ffff16610d9691906131c7565b92506101000a81548161ffff021916908361ffff1602179055507fca763cf5830a94239587040902439b4d9c4d77c35197112304fe221346a89ecc82826040516108e2929190612f74565b33610dea611044565b6001600160a01b031614610e105760405162461bcd60e51b815260040161066190613111565b601254600090610e22906122b86132a2565b905060008161ffff1611610e905760405162461bcd60e51b815260206004820152602f60248201527f63726561746552616e646f6d496e64657873206572726f723a2072616e646f6d60448201526e24b73232bc399034b990333ab6361760891b6064820152608401610661565b600e546010546011546001600160a01b0390921691635d3b1d309190879061ffff1687610ebd888861337b565b6040518663ffffffff1660e01b8152600401610edd959493929190612fd5565b602060405180830381600087803b158015610ef757600080fd5b505af1158015610f0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2f9190612d96565b506000610f3c83836131fc565b905060005b8161ffff168161ffff161015610ff757600e546010546011546040516305d3b1d360e41b81526001600160a01b0390931692635d3b1d3092610f929290918b9161ffff16908b908b90600401612fd5565b602060405180830381600087803b158015610fac57600080fd5b505af1158015610fc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe49190612d96565b5080610fef8161333e565b915050610f41565b50604080516001600160401b038716815261ffff851660208201527f1c561ddde6579c1ab1f76e23eb0dd4dbfe979aabdb007a6812327dbab702ea2c910160405180910390a15050505050565b6000546001600160a01b031690565b60606002805461057690613303565b61081b338383611ef8565b61107633611fc3565b15801561108257503332145b6110ca5760405162461bcd60e51b815260206004820152601960248201527810dbdb9d1c9858dd08189d5e5cc81b9bdd08185b1b1bddd959603a1b6044820152606401610661565b6000600754116111185760405162461bcd60e51b81526020600482015260196024820152785075626c69632073616c65206973206e6f742061637469766560381b6044820152606401610661565b60038161ffff1611156111635760405162461bcd60e51b8152602060048201526013602482015272135a5b9d081b1a5b5a5d08195e18d959591959606a1b6044820152606401610661565b60008161ffff166007546111779190613231565b90508034146111985760405162461bcd60e51b8152600401610661906130e3565b6111a23383611cfa565b7fc5f853cc0609f5243dca14d561cb1a954ccba574e0ded5d1331039c8b07cc5ae33836040516108e2929190612f74565b6111dd3383611a4b565b6111f95760405162461bcd60e51b815260040161066190613146565b6109b584848484611fd2565b606061121082611907565b6112745760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610661565b600061127e612005565b9050600081511161129e57604051806020016040528060008152506112c9565b806112a884612014565b6040516020016112b9929190612eef565b6040516020818303038152906040525b9392505050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b6060600061130b83610b2d565b90506000816001600160401b0381111561132757611327613408565b604051908082528060200260200182016040528015611350578160200160208202803683370190505b50905060005b828110156113b3576001600160a01b0385166000908152600a602090815260408083208484529091529020548251839083908110611396576113966133f2565b6020908102919091010152806113ab81613360565b915050611356565b509392505050565b336113c4611044565b6001600160a01b0316146113ea5760405162461bcd60e51b815260040161066190613111565b6001600160a01b03811661144f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610661565b61145881611caa565b50565b33611464611044565b6001600160a01b03161461148a5760405162461bcd60e51b815260040161066190613111565b478111156114d25760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b6044820152606401610661565b60006114df60648361321d565b90506114f5836114f083605f613231565b612111565b6115187361fc286855ee7baef8b8038ba769d350aa53d4986114f0836005613231565b7f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648383604051611549929190612f1e565b60405180910390a1505050565b60085460ff166115a05760405162461bcd60e51b815260206004820152601560248201527450726573616c65206973206e6f742061637469766560581b6044820152606401610661565b600d546001600160a01b03166116025760405162461bcd60e51b815260206004820152602160248201527f57686974656c697374207369676e657220686173206e6f74206265656e2073656044820152601d60fa1b6064820152608401610661565b61161861ffff8316670214e8348c4f0000613250565b6001600160401b0316341461163f5760405162461bcd60e51b8152600401610661906130e3565b3360009081526014602052604090205481906116609061ffff8516906131e4565b11156116ac5760405162461bcd60e51b815260206004820152601b60248201527a141c995cd85b19481b5a5b9d081b1a5b5a5d08195e18d959591959602a1b6044820152606401610661565b600854611fa4906116c99084906301000000900461ffff166131c7565b61ffff1611156116eb5760405162461bcd60e51b81526004016106619061309f565b604080517f62b1d609957efd7198a66f841063387013c1f07f57cbb6ae3cd625ddd9f9ebab60208201526001600160601b03193360601b169181019190915260548101829052600090607401604051602081830303815290604052805190602001209050600061179c86868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061179692508691506122279050565b90612279565b90506001600160a01b038116158015906117c35750600d546001600160a01b038281169116145b6118035760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610661565b336000908152601460205260409020546118229061ffff8616906131e4565b33600090815260146020526040902055600880548591906003906118529084906301000000900461ffff166131c7565b92506101000a81548161ffff021916908361ffff1602179055506118763385611cfa565b7f8e27e019812e2c3ec56472216ccb68136125853162bcdaf9f66b0eb221fcf93933856040516118a7929190612f74565b60405180910390a1505050505050565b60006001600160e01b031982166380ac58cd60e01b14806118e857506001600160e01b03198216635b5e139f60e01b145b8061056157506301ffc9a760e01b6001600160e01b0319831614610561565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061195982610a28565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60005b81518161ffff161015610792576012546000906119b4906122b86132a2565b838361ffff16815181106119ca576119ca6133f2565b60200260200101516119dc919061339c565b601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344460108204018054600f9092166002026101000a61ffff8181021990931693909216919091029190911790555080611a438161333e565b915050611995565b6000611a5682611907565b611ab75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610661565b6000611ac283610a28565b9050806001600160a01b0316846001600160a01b03161480611ae95750611ae981856112d0565b80611b0d5750836001600160a01b0316611b02846105f9565b6001600160a01b0316145b949350505050565b826001600160a01b0316611b2882610a28565b6001600160a01b031614611b8c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610661565b6001600160a01b038216611bee5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610661565b611bf9838383612295565b611c04600082611924565b6001600160a01b0383166000908152600460205260408120805460019290611c2d9084906132a2565b90915550506001600160a01b0382166000908152600460205260408120805460019290611c5b9084906131e4565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061345883398151915291a4505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600854600090611d1590610100900461ffff166122b861327f565b90508161ffff168161ffff161015611d6b5760405162461bcd60e51b81526020600482015260196024820152784e6f7420656e6f75676820504e44562072656d61696e696e6760381b6044820152606401610661565b60005b8261ffff16811015611eb957600854600090601290611d9690610100900461ffff16846131e4565b81548110611da657611da66133f2565b60009182526020808320601083040154600f9092166002026101000a90910461ffff9081168084526013909252604083205491935016611df057611deb8260016131c7565b611e07565b61ffff808316600090815260136020526040902054165b61ffff1690506000601381611e1d60018861327f565b61ffff90811682526020820192909252604001600020541611611e405783611e68565b60136000611e4f60018761327f565b61ffff9081168252602082019290925260400160002054165b61ffff8381166000908152601360205260409020805461ffff191692909116919091179055611e9786826122c7565b83611ea1816132e5565b94505050508080611eb190613360565b915050611d6e565b5081600860018282829054906101000a900461ffff16611ed991906131c7565b92506101000a81548161ffff021916908361ffff160217905550505050565b816001600160a01b0316836001600160a01b03161415611f565760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610661565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03163b151590565b611fdd848484611b15565b611fe9848484846122e1565b6109b55760405162461bcd60e51b81526004016106619061304d565b6060600c805461057690613303565b6060816120385750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612062578061204c81613360565b915061205b9050600a8361321d565b915061203c565b6000816001600160401b0381111561207c5761207c613408565b6040519080825280601f01601f1916602001820160405280156120a6576020820181803683370190505b5090505b8415611b0d576120bb6001836132a2565b91506120c8600a8661339c565b6120d39060306131e4565b60f81b8183815181106120e8576120e86133f2565b60200101906001600160f81b031916908160001a90535061210a600a8661321d565b94506120aa565b804710156121615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610661565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146121ae576040519150601f19603f3d011682016040523d82523d6000602084013e6121b3565b606091505b50509050806107925760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b6064820152608401610661565b6040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b600080600061228885856123f5565b915091506113b381612465565b6001600160a01b038316156122ae576122ae838261261b565b6001600160a01b038216156107925761079282826126b8565b61081b8282604051806020016040528060008152506126fc565b60006122f5846001600160a01b0316611fc3565b156123ea57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061232c903390899088908890600401612f37565b602060405180830381600087803b15801561234657600080fd5b505af1925050508015612376575060408051601f3d908101601f1916820190925261237391810190612ca9565b60015b6123d0573d8080156123a4576040519150601f19603f3d011682016040523d82523d6000602084013e6123a9565b606091505b5080516123c85760405162461bcd60e51b81526004016106619061304d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b0d565b506001949350505050565b60008082516041141561242c5760208301516040840151606085015160001a6124208782858561272f565b9450945050505061245e565b825160401415612456576020830151604084015161244b868383612812565b93509350505061245e565b506000905060025b9250929050565b6000816004811115612479576124796133dc565b14156124825750565b6001816004811115612496576124966133dc565b14156124df5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610661565b60028160048111156124f3576124f36133dc565b14156125415760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610661565b6003816004811115612555576125556133dc565b14156125ae5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610661565b60048160048111156125c2576125c26133dc565b14156114585760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610661565b6000600161262884610b2d565b61263291906132a2565b6000838152600b6020526040902054909150808214612685576001600160a01b0384166000908152600a602090815260408083208584528252808320548484528184208190558352600b90915290208190555b506000918252600b602090815260408084208490556001600160a01b039094168352600a81528383209183525290812055565b60006126c383610b2d565b6001600160a01b039093166000908152600a602090815260408083208684528252808320859055938252600b9052919091209190915550565b612706838361284b565b61271360008484846122e1565b6107925760405162461bcd60e51b81526004016106619061304d565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561275c5750600090506003612809565b8460ff16601b1415801561277457508460ff16601c14155b156127855750600090506004612809565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156127d9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661280257600060019250925050612809565b9150600090505b94509492505050565b6000806001600160ff1b0383168161282f60ff86901c601b6131e4565b905061283d8782888561272f565b935093505050935093915050565b6001600160a01b0382166128a15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610661565b6128aa81611907565b156128f65760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610661565b61290260008383612295565b6001600160a01b038216600090815260046020526040812080546001929061292b9084906131e4565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020613458833981519152908290a45050565b82805461298390613303565b90600052602060002090601f0160209004810192826129a557600085556129eb565b82601f106129be5782800160ff198235161785556129eb565b828001600101855582156129eb579182015b828111156129eb5782358255916020019190600101906129d0565b506129f79291506129fb565b5090565b5b808211156129f757600081556001016129fc565b60008083601f840112612a2257600080fd5b5081356001600160401b03811115612a3957600080fd5b60208301915083602082850101111561245e57600080fd5b803561ffff81168114612a6357600080fd5b919050565b600060208284031215612a7a57600080fd5b81356112c98161341e565b60008060408385031215612a9857600080fd5b8235612aa38161341e565b946020939093013593505050565b60008060408385031215612ac457600080fd5b8235612acf8161341e565b91506020830135612adf8161341e565b809150509250929050565b600080600060608486031215612aff57600080fd5b8335612b0a8161341e565b92506020840135612b1a8161341e565b929592945050506040919091013590565b60008060008060808587031215612b4157600080fd5b8435612b4c8161341e565b9350602085810135612b5d8161341e565b93506040860135925060608601356001600160401b0380821115612b8057600080fd5b818801915088601f830112612b9457600080fd5b813581811115612ba657612ba6613408565b612bb8601f8201601f19168501613197565b91508082528984828501011115612bce57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008060408385031215612c0157600080fd5b8235612c0c8161341e565b91506020830135612adf81613433565b60008060408385031215612c2f57600080fd5b8235612c3a8161341e565b9150612c4860208401612a51565b90509250929050565b600060208284031215612c6357600080fd5b81516112c981613433565b60008060408385031215612c8157600080fd5b8235612aa381613433565b600060208284031215612c9e57600080fd5b81356112c981613441565b600060208284031215612cbb57600080fd5b81516112c981613441565b60008060008060608587031215612cdc57600080fd5b84356001600160401b03811115612cf257600080fd5b612cfe87828801612a10565b9095509350612d11905060208601612a51565b9396929550929360400135925050565b60008060208385031215612d3457600080fd5b82356001600160401b03811115612d4a57600080fd5b612d5685828601612a10565b90969095509350505050565b600060208284031215612d7457600080fd5b6112c982612a51565b600060208284031215612d8f57600080fd5b5035919050565b600060208284031215612da857600080fd5b5051919050565b60008060408385031215612dc257600080fd5b823591506020808401356001600160401b0380821115612de157600080fd5b818601915086601f830112612df557600080fd5b813581811115612e0757612e07613408565b8060051b9150612e18848301613197565b8181528481019084860184860187018b1015612e3357600080fd5b600095505b83861015612e56578035835260019590950194918601918601612e38565b508096505050505050509250929050565b600080600060608486031215612e7c57600080fd5b83356001600160401b0381168114612e9357600080fd5b9250602084013563ffffffff81168114612eac57600080fd5b9150612eba60408501612a51565b90509250925092565b60008151808452612edb8160208601602086016132b9565b601f01601f19169290920160200192915050565b60008351612f018184602088016132b9565b835190830190612f158183602088016132b9565b01949350505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f6a90830184612ec3565b9695505050505050565b6001600160a01b0392909216825261ffff16602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015612fc957835183529284019291840191600101612fad565b50909695505050505050565b9485526001600160401b0393909316602085015261ffff918216604085015263ffffffff16606084015216608082015260a00190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6020815260006112c96020830184612ec3565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526024908201527f4e6f7420656e6f75676820504e44562072656d61696e696e6720696e2070726560408201526373616c6560e01b606082015260800190565b602080825260149082015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f191681016001600160401b03811182821017156131bf576131bf613408565b604052919050565b600061ffff808316818516808303821115612f1557612f156133b0565b600082198211156131f7576131f76133b0565b500190565b600061ffff80841680613211576132116133c6565b92169190910492915050565b60008261322c5761322c6133c6565b500490565b600081600019048311821515161561324b5761324b6133b0565b500290565b60006001600160401b0382811684821681151582840482111615613276576132766133b0565b02949350505050565b600061ffff8381169083168181101561329a5761329a6133b0565b039392505050565b6000828210156132b4576132b46133b0565b500390565b60005b838110156132d45781810151838201526020016132bc565b838111156109b55750506000910152565b600061ffff8216806132f9576132f96133b0565b6000190192915050565b600181811c9082168061331757607f821691505b6020821081141561333857634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415613356576133566133b0565b6001019392505050565b6000600019821415613374576133746133b0565b5060010190565b600061ffff80841680613390576133906133c6565b92169190910692915050565b6000826133ab576133ab6133c6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461145857600080fd5b801515811461145857600080fd5b6001600160e01b03198116811461145857600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212206be42acf25793c7c995243592caee35e2cc587ff3534a1ba8ae90707b8cef2d164736f6c63430008070033
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.