Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
782
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Agoradex
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT // Agoradex Contracts v1.0.0 // Creator: Nefture pragma solidity 0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/IAccessControl.sol"; import "../libraries/ECDSALibrary.sol"; import "./ERC721A.sol"; import "./IAgoradex.sol"; // ............................................................................................................................................................ // ............................................................................................................................................................ // ............................................................................................................................................................ // .................................................................,:;+?%SS##@@@@@@@@##S%%?+;:,............................................................... // ........................................................,;?S#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#S*;,...................................................... // .....................................................,+%#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%+,................................................... // ..................................................,;%#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%;,................................................ // ..............................................:?#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#?:............................................ // ............................................,*#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*,.......................................... // ...........................................+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+......................................... // ........................................:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#:...................................... // .......................................;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;..................................... // ......................................+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##########@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+.................................... // ....................................:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;..........;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#:.................................. // ....................................%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+............+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,................................. // ...................................+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?......,,......*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+................................. // ..................................;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@S,......*@@%......,S@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+................................ // ..................................%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#:......+@@@@*......,#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%................................ // ..................................#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:......:@@@@@@+......:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#................................ // ..................................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*......,%@@@@@@@@S,......+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@................................ // ..................................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?.......?@@@@@@@@@@%,......?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@................................ // ..................................#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,......*@@@@@?*@@@@@?......,%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#................................ // ..................................+@@@@@@@@@@@@@@@@@@@@@@@@@@@#:......:#@@@@#:..,S@@@@@;......:#@@@@@@@@@@@@@@@@@@@@@@@@@@@;................................ // ..................................,S@@@@@@@@@@@@@@@@@@@@@@@@@@;......,S@@@@@+....,#@@@@#:......;@@@@@@@@@@@@@@@@@@@@@@@@@@S,................................ // ...................................+@@@@@@@@@@@@@@@@@@@@@@@@@+......,%@@@@@?......:@@@@@S,......+@@@@@@@@@@@@@@@@@@@@@@@@@+................................. // ....................................:#@@@@@@@@@@@@@@@@@@@@@?.......+@@@@@@@@?.......*@@@@@*.......?@@@@@@@@@@@@@@@@@@@@@#:.................................. // .....................................;@@@@@@@@@@@@@@@@@@@@S,,,,,,,;@@@@@@@@@@+,,,,,,,%@@@@@;,,,,,,,S@@@@@@@@@@@@@@@@@@@@;................................... // ......................................+@@@@@@@@@@@@@@@@@@@########@@@@@@@@@@@@########@@@@@@########@@@@@@@@@@@@@@@@@@@+.................................... // ........................................:#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#:...................................... // .........................................,%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,....................................... // ...........................................+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+......................................... // ..............................................:?#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#?:............................................ // ................................................:*#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*:.............................................. // ..................................................,;%#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#%;,................................................ // ........................................................,;*S#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#S?;,...................................................... // ............................................................,;*?S#@@@@@@@@@@@@@@@@@@@@@@@@@@#S?+;,.......................................................... // .................................................................,:;+?%%S##@@@@@@@@##SS%?+;:,............................................................... // ............................................................................................................................................................ // ............................................................................................................................................................ // ............................................................................................................................................................ // ............................................................................................................................................................ // ............................................................................................................................................................ // ............................................................................................................................................................ // ......,%#S#%,........................,+?S#@@@@@#%*;,....................,;?S#@@@@@#S*;,.................*#####S%*:.......................,S#S#?............. // ......?@@@@@?......................:%#@@S?*++*?%#@@#+,................,*#@@#%*+++*%#@@#*,...............;?????%#@@%:....................,S@@@@@*............ // .....*@@#;S@@*....................*@@@*:........,;%*;,...............;#@@%:........,;%@@#:.....................,%@@S,...................%@@S;#@@+........... // ....+@@@;.:#@@+..................;@@@;..............................,#@@?.............?@@S,....................,%@@S,..................*@@#:.;@@@;.......... // ...;@@@+...;@@@;.................*@@#.......*%%%%%%%%%+.............;@@@:.............;@@@:.............;?????%#@@%:..................+@@@;...*@@#:......... // ..:#@@*.....*@@#:................;@@@;......*%%%%%%@@@*.............,#@@?.............?@@S,.............+SSS#@@@?:...................;@@@+.....?@@S,........ // .,S@@%.......?@@#,................+@@@*:.........:?@@S,..............;#@@%:........,;%@@#:..................,*@@#;..................:#@@*......,S@@%,....... // ,S@@S,.......,%@@S,................:%#@@S?*+++*?S@@#?,................,*#@@#%*+++*%#@@#*,.....................;S@@?,...............:#@@?........,#@@?,...... // ?@##:.........,S@@?..................,+?S#@@@@@#S?+,....................,;?S#@@@@@#S*;,........................,%@@%,.............,%@@S,.........;##@*?..... // ............................................................................................................................................................ // ............................................................................................................................................................ // ............................................................................................................................................................ contract Agoradex is IAgoradex, ERC721A, Ownable, AccessControl { // Access control roles bytes32 public constant SIGNER_ROLE = keccak256("SIGNER_ROLE"); bytes32 public constant FREE_SIGNER_ROLE = keccak256("FREE_SIGNER_ROLE"); bytes32 public constant AIRDROP_ROLE = keccak256("AIRDROP_ROLE"); // The base token URI string private _baseTokenURI; // True if the URI been frozen for ever bool public isUriFrozenForEver; // The nonce used for free mints mapping(address => uint256) private nonces; // sale times uint256 private _saleTime = 1676476800; // The Minotaur's initial price uint256 private _minotaurPrice = 0.165 ether; // The Medusa's initial price uint256 private _medusaPrice = 0.24 ether; // The initial discounts uint256[] private _discounts = [100, 95, 90, 80]; // The token's type // false: Minotaure // true: Medusa mapping(uint256 => bool) private isMedusa; // Collection's initial Minotaurs maximum supply uint256 private _maxSupplyMinotaurs = 824; // Collection's initial Medusas maximum supply uint256 private _maxSupplyMedusas = 676; // Total number of medusa tokens uint256 private _numberMedusas; // Number of mint per address uint256 private _maxMintPerWallet = 3; mapping(address => uint256) internal _numbMint; // Payment splitter uint256 internal constant totalShares = 1000; uint256 internal totalReleased; mapping(address => uint256) internal released; mapping(address => uint256) internal shares; address internal constant project = 0x93eD3714399519c8F6459F882A4B8578864a5a59; address internal constant shareHolder2 = 0xcA86752aeB44343d8C8d7Ef09652c81032804d8D; constructor() ERC721A("AGORA", "AGORA") { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); shares[project] = 965; shares[shareHolder2] = 35; _mint(0x93eD3714399519c8F6459F882A4B8578864a5a59, 2); _numberMedusas += 1; isMedusa[1] = true; // set metadata _baseTokenURI = "ipfs://QmddYSKWNGGWS3htRBDQv7t7o3xQh6HGtVxSAgsPGERGNW/"; } /* * mint tokens as Whitelisted * * @param _quantityMinotaur: quantity of Minotaur tokens to mint * @param _quantityMedusa: quantity of Medusa tokens to mint * @param _discountIndex: discount to be applied (90 means 10% discount) * @param _signature: whitelist signature * * Error messages: * - A1: "Wrong price" * - A2: "Can't mint more tokens with this wallet" * - A3: "Max Minotaur supply has been reached" * - A4: "Max Medusa supply has been reached" * - A5: "Mint has not started yet" * - A6: "Wrong signature" */ function whitelistMint( uint256 _quantityMinotaur, uint256 _quantityMedusa, uint256 _discountIndex, bytes calldata _signature ) external payable { require( msg.value == ((_minotaurPrice * _quantityMinotaur + _medusaPrice * _quantityMedusa) * _discounts[_discountIndex]) / 100, "A1" ); require( _numbMint[msg.sender] + _quantityMinotaur + _quantityMedusa <= _maxMintPerWallet, "A2" ); require( totalSupply() - _numberMedusas + _quantityMinotaur <= _maxSupplyMinotaurs, "A3" ); require(_numberMedusas + _quantityMedusa <= _maxSupplyMedusas, "A4"); require(block.timestamp > _saleTime, "A5"); _numbMint[msg.sender] += _quantityMinotaur + _quantityMedusa; require( hasRole( SIGNER_ROLE, ECDSALibrary.recover( abi.encodePacked(msg.sender, _discounts[_discountIndex]), _signature ) ), "A6" ); for (uint i = 1; i < _quantityMedusa + 1; i++) { isMedusa[totalSupply() + i] = true; } _numberMedusas += _quantityMedusa; _mint(msg.sender, _quantityMinotaur + _quantityMedusa); } /* * mint tokens as free claims * * @param _quantityMinotaur: quantity of Minotaur tokens to mint * @param _quantityMedusa: quantity of Medusa tokens to mint * @param _signature: free claim signature * * Error messages: * - A2: "Can't mint more tokens with this wallet" * - A3: "Max Minotaur supply has been reached" * - A4: "Max Medusa supply has been reached" * - A6: "Wrong signature" */ function freeClaim( uint256 _quantityMinotaur, uint256 _quantityMedusa, bytes calldata _signature ) external { require( _numbMint[msg.sender] + _quantityMinotaur + _quantityMedusa <= _maxMintPerWallet, "A2" ); require( totalSupply() - _numberMedusas + _quantityMinotaur <= _maxSupplyMinotaurs, "A3" ); require(_numberMedusas + _quantityMedusa <= _maxSupplyMedusas, "A4"); uint256 nonce = nonces[msg.sender] + 1; require( hasRole( FREE_SIGNER_ROLE, ECDSALibrary.recover( abi.encodePacked( msg.sender, _quantityMinotaur, _quantityMedusa, nonce ), _signature ) ), "A6" ); nonces[msg.sender] += 1; for (uint i = 1; i < _quantityMedusa + 1; i++) { isMedusa[totalSupply() + i] = true; } _numberMedusas += _quantityMedusa; _mint(msg.sender, _quantityMedusa + _quantityMinotaur); } /* * airdrop tokens to address * * @param _quantityMinotaur: quantity of Minotaur tokens to mint * @param _quantityMedusa: quantity of Medusa tokens to mint * @param _to: receiver of the tokens * * Error messages: * - A3: "Max Minotaur supply has been reached" * - A4: "Max Medusa supply has been reached" */ function airdrop( uint256 _quantityMinotaur, uint256 _quantityMedusa, address _to ) public onlyRole(AIRDROP_ROLE) { require( totalSupply() - _numberMedusas + _quantityMinotaur <= _maxSupplyMinotaurs, "A3" ); require(_numberMedusas + _quantityMedusa <= _maxSupplyMedusas, "A4"); for (uint i = 1; i < _quantityMedusa + 1; i++) { isMedusa[totalSupply() + i] = true; } _numberMedusas += _quantityMedusa; _mint(_to, _quantityMedusa + _quantityMinotaur); } /* * airdrop tokens to addresses in batches * * @param _quantityMinotaur: array of quantities of Minotaur tokens to mint per address * @param _quantityMedusa: array of quantities of Medusa tokens to mint per address * @param _to: array of receivers of the tokens * * Error messages: * - A7: "Entries don't match length" */ function batchAirdrop( uint256[] calldata _quantityMinotaur, uint256[] calldata _quantityMedusa, address[] calldata _to ) external onlyRole(AIRDROP_ROLE) { require( (_quantityMinotaur.length == _to.length) && (_quantityMedusa.length == _to.length), "A7" ); for (uint i = 0; i < _to.length; i++) { airdrop(_quantityMinotaur[i], _quantityMedusa[i], _to[i]); } } /* * set maximum mint quantity per wallet * * @param _newMaxMint: new value for maximum mint per wallet */ function setMaxMintsPerWallet(uint256 _newMaxMint) external onlyOwner { _maxMintPerWallet = _newMaxMint; } /* * change price of tokens * * @param _newMinotaurPrice: new value for Minotaur's mint price * @param _newMedusaPrice: new value for Medusa's mint price */ function setSalePrices( uint256 _newMinotaurPrice, uint256 _newMedusaPrice ) external onlyOwner { _minotaurPrice = _newMinotaurPrice; _medusaPrice = _newMedusaPrice; } /* * change discounts for tokens * * @param _newDiscounts: new discounts array */ function setDiscounts(uint256[] calldata _newDiscounts) external onlyOwner { _discounts = _newDiscounts; } /* * change sale times * * @param _newSaleTime: new sale time */ function setSaleTime(uint256 _newSaleTime) external onlyOwner { _saleTime = _newSaleTime; } /* * permanently reduce maximum supply of the collection * * @param _newMaxSupply: new maximum supply * * Error messages: * - A8: "Can not increase Minotaur supply" * - A9: "Can not increase Medusa supply" * - A10: "Can not set the new maximum Minotaur supply under the current supply" * - A11: "Can not set the new maximum Medusa supply under the current supply" */ function reduceMaxSupply( uint256 _newMaxMinotaursSupply, uint256 _newMaxMedusasSupply ) external onlyOwner { require(_newMaxMinotaursSupply <= _maxSupplyMinotaurs, "A8"); require(_newMaxMedusasSupply <= _maxSupplyMedusas, "A9"); require(_newMaxMinotaursSupply >= totalSupply() - _numberMedusas, "A10"); require(_newMaxMedusasSupply >= _numberMedusas, "A11"); _maxSupplyMinotaurs = _newMaxMinotaursSupply; _maxSupplyMedusas = _newMaxMedusasSupply; } /* * get token's type * * @return isMedusa[_tokenId]: true if _tokenId is a Medusa, false if _tokenId is a Minotaur */ function isTokenMedusa(uint256 _tokenId) public view returns (bool) { if (!_exists(_tokenId)) _revert(IsMedusaQueryForNonexistentToken.selector); return isMedusa[_tokenId]; } /* * get prices of tokens * * @return _minotaurPrice: price of the Minotaur tokens * @return _medusaPrice: price of the Medusa tokens */ function getPrices() external view returns (uint256, uint256) { return (_minotaurPrice, _medusaPrice); } /* * get discounts * * @return _discounts: list of discounts */ function getDiscounts() external view returns (uint256[] memory) { return (_discounts); } /* * get maximum supply of the collection * * @return _maxSupply: maximum supply of the collection */ function getMaxSupplies() external view returns (uint256, uint256) { return (_maxSupplyMinotaurs, _maxSupplyMedusas); } function getTiersSupplies() external view returns (uint256, uint256) { return (totalSupply() - _numberMedusas, _numberMedusas); } /* * get time of the sale * * @return _saleTime: time of the sale */ function getSaleTime() external view returns (uint256) { return _saleTime; } /* * get maximum mints per wallet for each sale type * * @return _maxMintPerWallet: maximum mint per wallet */ function getMaxMintsPerWallet() external view returns (uint256) { return _maxMintPerWallet; } /* * get current number of mint of an account * * @param _account: account for which to recover the number of mints * * @return _numbMint[_account]: number of mints of _account */ function getNumberOfMintPerWallet( address _account ) external view returns (uint256) { return _numbMint[_account]; } /* * get the nonce of an account * * @param _account: account for which to recover the nonce * * @return nonces[_account]: nonce of _account */ function getNonce(address _account) external view returns (uint256) { return nonces[_account]; } /* * burn a token * * @param _tokenId: tokenId of the token to burn * * Error messages: * - A12: "You don't own this token" */ function burn(uint256 _tokenId) external { require(ownerOf(_tokenId) == msg.sender, "A12"); _burn(_tokenId); } /* * freezes uri of tokens */ function freezeMetadata() external onlyOwner { isUriFrozenForEver = true; } /* * change base URI of tokens * * Error messages: * - A13 : "URI has been frozen" */ function setBaseURI(string calldata baseURI) external onlyOwner { require(!isUriFrozenForEver, "A13"); _baseTokenURI = baseURI; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); if (isMedusa[tokenId]) { return bytes(_baseTokenURI).length != 0 ? string( abi.encodePacked( _baseTokenURI, "medusas/", _toString(tokenId) ) ) : ""; } return bytes(_baseTokenURI).length != 0 ? string( abi.encodePacked( _baseTokenURI, "minotaurs/", _toString(tokenId) ) ) : ""; } /** * overrides start tokenId */ function _startTokenId() internal view virtual override returns (uint256) { return 1; } /** * Withdraw contract's funds * * Error messages: * - A14 : "No shares for this account" * - A15 : "No remaining payment" */ function withdraw(address account) external { require(shares[account] > 0, "A14"); uint256 totalReceived = address(this).balance + totalReleased; uint256 payment = (totalReceived * shares[account]) / totalShares - released[account]; released[account] = released[account] + payment; totalReleased = totalReleased + payment; require(payment > 0, "A15"); payable(account).transfer(payment); } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, AccessControl) returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f || // ERC165 interface ID for ERC721Metadata. interfaceId == type(IAccessControl).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity 0.8.11; /** * @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 ECDSALibrary { 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 calldata signature) public pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-recover} that receives unhashed bytes */ function recover(bytes calldata data, bytes calldata signature) public pure returns (address) { bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(data))); return recover(hash, signature); } /** * @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; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @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); } }
//SPDX-License-Identifier: MIT // Agoradex Contracts v1.0.0 // Creator: Nefture pragma solidity 0.8.11; /** * @dev Interface of Agoradex. */ interface IAgoradex { /** * The token does not exist. */ error IsMedusaQueryForNonexistentToken(); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) _revert(BalanceQueryForZeroAddress.selector); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; return packed; } } // Otherwise, the data exists and is not burned. We can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. return packed; } } _revert(OwnerQueryForNonexistentToken.selector); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { _revert(TransferToNonERC721ReceiverImplementer.selector); } assembly { revert(add(32, reason), mload(reason)) } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) _revert(MintZeroQuantity.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; do { assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) _revert(MintToZeroAddress.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) _revert(bytes4(0)); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @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: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` 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 payable; /** * @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 payable; /** * @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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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/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": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": { "libraries/ECDSALibrary.sol": { "ECDSALibrary": "0x74338262a35ec73567ad6a04946976f1a6cb647a" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"IsMedusaQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"AIRDROP_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FREE_SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantityMinotaur","type":"uint256"},{"internalType":"uint256","name":"_quantityMedusa","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_quantityMinotaur","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantityMedusa","type":"uint256[]"},{"internalType":"address[]","name":"_to","type":"address[]"}],"name":"batchAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantityMinotaur","type":"uint256"},{"internalType":"uint256","name":"_quantityMedusa","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"freeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeMetadata","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":[],"name":"getDiscounts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxMintsPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxSupplies","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getNumberOfMintPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTiersSupplies","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isTokenMedusa","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isUriFrozenForEver","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":[{"internalType":"uint256","name":"_newMaxMinotaursSupply","type":"uint256"},{"internalType":"uint256","name":"_newMaxMedusasSupply","type":"uint256"}],"name":"reduceMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_newDiscounts","type":"uint256[]"}],"name":"setDiscounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxMint","type":"uint256"}],"name":"setMaxMintsPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMinotaurPrice","type":"uint256"},{"internalType":"uint256","name":"_newMedusaPrice","type":"uint256"}],"name":"setSalePrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSaleTime","type":"uint256"}],"name":"setSaleTime","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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantityMinotaur","type":"uint256"},{"internalType":"uint256","name":"_quantityMedusa","type":"uint256"},{"internalType":"uint256","name":"_discountIndex","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526363ed0180600d5567024a32a033f08000600e55670354a6ba7a180000600f556040518060800160405280606460ff168152602001605f60ff168152602001605a60ff168152602001605060ff168152506010906004620000679291906200072c565b506103386012556102a460135560036015553480156200008657600080fd5b506040518060400160405280600581526020017f41474f52410000000000000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f41474f524100000000000000000000000000000000000000000000000000000081525081600290805190602001906200010b92919062000783565b5080600390805190602001906200012492919062000783565b5062000135620002cd60201b60201c565b60008190555050506200015d62000151620002d660201b60201c565b620002de60201b60201c565b620001726000801b33620003a460201b60201c565b6103c5601960007393ed3714399519c8f6459f882a4b8578864a5a5973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060236019600073ca86752aeb44343d8c8d7ef09652c81032804d8d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506200024c7393ed3714399519c8f6459f882a4b8578864a5a5960026200049660201b60201c565b6001601460008282546200026191906200086c565b925050819055506001601160006001815260200190815260200160002060006101000a81548160ff02191690831515021790555060405180606001604052806036815260200162005d0360369139600a9080519060200190620002c692919062000783565b506200092e565b60006001905090565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b620003b682826200063760201b60201c565b620004925760016009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555062000437620002d660201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000805490506000821415620004bf57620004be63b562e8dd60e01b620006a260201b60201c565b5b620004d46000848385620006ac60201b60201c565b6200050c83620004ee6000866000620006b260201b60201c565b620004ff85620006e260201b60201c565b17620006f260201b60201c565b6004600083815260200190815260200160002081905550600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161690506000811415620005ce57620005cd632e07630060e01b620006a260201b60201c565b5b6000838301905060008390505b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a481816001019150811415620005db57816000819055505050506200063260008483856200071d60201b60201c565b505050565b60006009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b8060005260046000fd5b50505050565b60008060e883901c905060e8620006d18686846200072360201b60201c565b62ffffff16901b9150509392505050565b60006001821460e11b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60009392505050565b82805482825590600052602060002090810192821562000770579160200282015b828111156200076f578251829060ff169055916020019190600101906200074d565b5b5090506200077f919062000814565b5090565b8280546200079190620008f8565b90600052602060002090601f016020900481019282620007b5576000855562000801565b82601f10620007d057805160ff191683800117855562000801565b8280016001018555821562000801579182015b8281111562000800578251825591602001919060010190620007e3565b5b50905062000810919062000814565b5090565b5b808211156200082f57600081600090555060010162000815565b5090565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620008798262000833565b9150620008868362000833565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115620008be57620008bd6200083d565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200091157607f821691505b60208210811415620009285762000927620008c9565b5b50919050565b6153c5806200093e6000396000f3fe6080604052600436106102ae5760003560e01c806370a0823111610175578063af35e4d9116100dc578063d111515d11610095578063e985e9c51161006f578063e985e9c514610a67578063f2fde38b14610aa4578063f3ad59fd14610acd578063fb5aeaef14610af9576102ae565b8063d111515d146109fe578063d547741f14610a15578063d55d4df614610a3e576102ae565b8063af35e4d9146108f9578063b88d4fde14610925578063bd9a548b14610941578063c87b56dd1461096d578063cbf21fe4146109aa578063d0ae52d2146109d5576102ae565b806395d89b411161012e57806395d89b41146107e9578063963c3546146108145780639a74f0ce1461083d578063a1ebf35d1461087a578063a217fddf146108a5578063a22cb465146108d0576102ae565b806370a08231146106c5578063715018a61461070257806374e701bd146107195780638da5cb5b146107445780639065ea471461076f57806391d14854146107ac576102ae565b80632f2ff15d1161021957806351cff8d9116101d257806351cff8d9146105c857806355bb1ecb146105f157806355f804b31461061a5780635abe7dff146106435780636352211e1461066c57806365c649a2146106a9576102ae565b80632f2ff15d146104dd57806336568abe146105065780633bd2b67d1461052f5780633eb427a01461055857806342842e0e1461058357806342966c681461059f576102ae565b80631e0fbfa21161026b5780631e0fbfa2146103c85780631e2e8c95146103f357806323b872dd1461041c578063248a9ca31461043857806325dc61fb146104755780632d0335ab146104a0576102ae565b806301ffc9a7146102b357806306d4c8b4146102f057806306fdde0314610319578063081812fc14610344578063095ea7b31461038157806318160ddd1461039d575b600080fd5b3480156102bf57600080fd5b506102da60048036038101906102d5919061380d565b610b24565b6040516102e79190613855565b60405180910390f35b3480156102fc57600080fd5b50610317600480360381019061031291906138a6565b610c1e565b005b34801561032557600080fd5b5061032e610d5e565b60405161033b919061397f565b60405180910390f35b34801561035057600080fd5b5061036b600480360381019061036691906139a1565b610df0565b6040516103789190613a0f565b60405180910390f35b61039b60048036038101906103969190613a56565b610e4e565b005b3480156103a957600080fd5b506103b2610e5e565b6040516103bf9190613aa5565b60405180910390f35b3480156103d457600080fd5b506103dd610e75565b6040516103ea9190613ad9565b60405180910390f35b3480156103ff57600080fd5b5061041a60048036038101906104159190613af4565b610e99565b005b61043660048036038101906104319190613b47565b61101a565b005b34801561044457600080fd5b5061045f600480360381019061045a9190613bc6565b6112de565b60405161046c9190613ad9565b60405180910390f35b34801561048157600080fd5b5061048a6112fe565b6040516104979190613855565b60405180910390f35b3480156104ac57600080fd5b506104c760048036038101906104c29190613bf3565b611311565b6040516104d49190613aa5565b60405180910390f35b3480156104e957600080fd5b5061050460048036038101906104ff9190613c20565b61135a565b005b34801561051257600080fd5b5061052d60048036038101906105289190613c20565b61137b565b005b34801561053b57600080fd5b50610556600480360381019061055191906139a1565b6113fe565b005b34801561056457600080fd5b5061056d611410565b60405161057a9190613ad9565b60405180910390f35b61059d60048036038101906105989190613b47565b611434565b005b3480156105ab57600080fd5b506105c660048036038101906105c191906139a1565b611454565b005b3480156105d457600080fd5b506105ef60048036038101906105ea9190613bf3565b6114d6565b005b3480156105fd57600080fd5b5061061860048036038101906106139190613cc5565b611741565b005b34801561062657600080fd5b50610641600480360381019061063c9190613d68565b61175f565b005b34801561064f57600080fd5b5061066a600480360381019061066591906138a6565b6117cd565b005b34801561067857600080fd5b50610693600480360381019061068e91906139a1565b6117e7565b6040516106a09190613a0f565b60405180910390f35b6106c360048036038101906106be9190613e0b565b6117f9565b005b3480156106d157600080fd5b506106ec60048036038101906106e79190613bf3565b611c4f565b6040516106f99190613aa5565b60405180910390f35b34801561070e57600080fd5b50610717611ce7565b005b34801561072557600080fd5b5061072e611cfb565b60405161073b9190613aa5565b60405180910390f35b34801561075057600080fd5b50610759611d05565b6040516107669190613a0f565b60405180910390f35b34801561077b57600080fd5b50610796600480360381019061079191906139a1565b611d2f565b6040516107a39190613855565b60405180910390f35b3480156107b857600080fd5b506107d360048036038101906107ce9190613c20565b611d77565b6040516107e09190613855565b60405180910390f35b3480156107f557600080fd5b506107fe611de2565b60405161080b919061397f565b60405180910390f35b34801561082057600080fd5b5061083b600480360381019061083691906139a1565b611e74565b005b34801561084957600080fd5b50610864600480360381019061085f9190613bf3565b611e86565b6040516108719190613aa5565b60405180910390f35b34801561088657600080fd5b5061088f611ecf565b60405161089c9190613ad9565b60405180910390f35b3480156108b157600080fd5b506108ba611ef3565b6040516108c79190613ad9565b60405180910390f35b3480156108dc57600080fd5b506108f760048036038101906108f29190613ebf565b611efa565b005b34801561090557600080fd5b5061090e612005565b60405161091c929190613eff565b60405180910390f35b61093f600480360381019061093a9190614058565b612028565b005b34801561094d57600080fd5b5061095661207a565b604051610964929190613eff565b60405180910390f35b34801561097957600080fd5b50610994600480360381019061098f91906139a1565b61208b565b6040516109a1919061397f565b60405180910390f35b3480156109b657600080fd5b506109bf6121b1565b6040516109cc9190613aa5565b60405180910390f35b3480156109e157600080fd5b506109fc60048036038101906109f791906140db565b6121bb565b005b348015610a0a57600080fd5b50610a1361255d565b005b348015610a2157600080fd5b50610a3c6004803603810190610a379190613c20565b612582565b005b348015610a4a57600080fd5b50610a656004803603810190610a6091906141a5565b6125a3565b005b348015610a7357600080fd5b50610a8e6004803603810190610a899190614259565b6126b5565b604051610a9b9190613855565b60405180910390f35b348015610ab057600080fd5b50610acb6004803603810190610ac69190613bf3565b612749565b005b348015610ad957600080fd5b50610ae26127cd565b604051610af0929190613eff565b60405180910390f35b348015610b0557600080fd5b50610b0e6127de565b604051610b1b9190614357565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b7f57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610baf5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610c1757507f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b610c26612836565b601254821115610c6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c62906143c5565b60405180910390fd5b601354811115610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790614431565b60405180910390fd5b601454610cbb610e5e565b610cc59190614480565b821015610d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfe90614500565b60405180910390fd5b601454811015610d4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d439061456c565b60405180910390fd5b81601281905550806013819055505050565b606060028054610d6d906145bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610d99906145bb565b8015610de65780601f10610dbb57610100808354040283529160200191610de6565b820191906000526020600020905b815481529060010190602001808311610dc957829003601f168201915b5050505050905090565b6000610dfb826128b4565b610e1057610e0f63cf4700e460e01b612913565b5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b610e5a8282600161291d565b5050565b6000610e68612a4c565b6001546000540303905090565b7f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f81565b7f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f610ec381612a55565b60125484601454610ed2610e5e565b610edc9190614480565b610ee691906145ed565b1115610f27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1e9061468f565b60405180910390fd5b60135483601454610f3891906145ed565b1115610f79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f70906146fb565b60405180910390fd5b6000600190505b600184610f8d91906145ed565b811015610fe55760016011600083610fa3610e5e565b610fad91906145ed565b815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610fdd9061471b565b915050610f80565b508260146000828254610ff891906145ed565b9250508190555061101482858561100f91906145ed565b612a69565b50505050565b600061102582612bcf565b905073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161693508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461109a5761109963a114810060e01b612913565b5b6000806110a684612c92565b915091506110bc81876110b7612cb9565b612cc1565b6110e7576110d1866110cc612cb9565b6126b5565b6110e6576110e56359c896be60e01b612913565b5b5b6110f48686866001612d05565b80156110ff57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506111cd856111a9888887612d0b565b7c020000000000000000000000000000000000000000000000000000000017612d33565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415611255576000600185019050600060046000838152602001908152602001600020541415611253576000548114611252578360046000838152602001908152602001600020819055505b5b505b600073ffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff161690508481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460008114156112c8576112c763ea553b3460e01b612913565b5b6112d58787876001612d5e565b50505050505050565b600060096000838152602001908152602001600020600101549050919050565b600b60009054906101000a900460ff1681565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611363826112de565b61136c81612a55565b6113768383612d64565b505050565b611383612e45565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e7906147d6565b60405180910390fd5b6113fa8282612e4d565b5050565b611406612836565b80600d8190555050565b7fc0d53b6b38dafcad2617ec1d5660bc901206f6e857c2d4538ad90ae7220802f581565b61144f83838360405180602001604052806000815250612028565b505050565b3373ffffffffffffffffffffffffffffffffffffffff16611474826117e7565b73ffffffffffffffffffffffffffffffffffffffff16146114ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c190614842565b60405180910390fd5b6114d381612f2f565b50565b6000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154f906148ae565b60405180910390fd5b60006017544761156891906145ed565b90506000601860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103e8601960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846115fa91906148ce565b6116049190614957565b61160e9190614480565b905080601860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165b91906145ed565b601860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806017546116ac91906145ed565b601781905550600081116116f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ec906149d4565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561173b573d6000803e3d6000fd5b50505050565b611749612836565b81816010919061175a9291906136b1565b505050565b611767612836565b600b60009054906101000a900460ff16156117b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ae90614a40565b60405180910390fd5b8181600a91906117c89291906136fe565b505050565b6117d5612836565b81600e8190555080600f819055505050565b60006117f282612bcf565b9050919050565b60646010848154811061180f5761180e614a60565b5b906000526020600020015485600f5461182891906148ce565b87600e5461183691906148ce565b61184091906145ed565b61184a91906148ce565b6118549190614957565b3414611895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188c90614adb565b60405180910390fd5b6015548486601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e491906145ed565b6118ee91906145ed565b111561192f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192690614b47565b60405180910390fd5b6012548560145461193e610e5e565b6119489190614480565b61195291906145ed565b1115611993576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198a9061468f565b60405180910390fd5b601354846014546119a491906145ed565b11156119e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dc906146fb565b60405180910390fd5b600d544211611a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2090614bb3565b60405180910390fd5b8385611a3591906145ed565b601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a8391906145ed565b92505081905550611b6e7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f707374338262a35ec73567ad6a04946976f1a6cb647a631ed13d1b3360108881548110611add57611adc614a60565b5b9060005260206000200154604051602001611af9929190614c3c565b60405160208183030381529060405286866040518463ffffffff1660e01b8152600401611b2893929190614cea565b602060405180830381865af4158015611b45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b699190614d38565b611d77565b611bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba490614db1565b60405180910390fd5b6000600190505b600185611bc191906145ed565b811015611c195760016011600083611bd7610e5e565b611be191906145ed565b815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611c119061471b565b915050611bb4565b508360146000828254611c2c91906145ed565b92505081905550611c48338587611c4391906145ed565b612a69565b5050505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c9657611c95638f4eb60460e01b612913565b5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611cef612836565b611cf96000612f3d565b565b6000601554905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611d3a826128b4565b611d4f57611d4e633a85a02360e01b612913565b5b6011600083815260200190815260200160002060009054906101000a900460ff169050919050565b60006009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b606060038054611df1906145bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611e1d906145bb565b8015611e6a5780601f10611e3f57610100808354040283529160200191611e6a565b820191906000526020600020905b815481529060010190602001808311611e4d57829003601f168201915b5050505050905090565b611e7c612836565b8060158190555050565b6000601660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b6000801b81565b8060076000611f07612cb9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611fb4612cb9565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611ff99190613855565b60405180910390a35050565b600080601454612013610e5e565b61201d9190614480565b601454915091509091565b61203384848461101a565b60008373ffffffffffffffffffffffffffffffffffffffff163b146120745761205e84848484613003565b6120735761207263d1a57ed660e01b612913565b5b5b50505050565b600080600e54600f54915091509091565b6060612096826128b4565b6120cc576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6011600083815260200190815260200160002060009054906101000a900460ff1615612151576000600a8054612101906145bb565b9050141561211e576040518060200160405280600081525061214a565b600a61212983613133565b60405160200161213a929190614eed565b6040516020818303038152906040525b90506121ac565b6000600a8054612160906145bb565b9050141561217d57604051806020016040528060008152506121a9565b600a61218883613133565b604051602001612199929190614f68565b6040516020818303038152906040525b90505b919050565b6000600d54905090565b6015548385601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461220a91906145ed565b61221491906145ed565b1115612255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224c90614b47565b60405180910390fd5b60125484601454612264610e5e565b61226e9190614480565b61227891906145ed565b11156122b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b09061468f565b60405180910390fd5b601354836014546122ca91906145ed565b111561230b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612302906146fb565b60405180910390fd5b60006001600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461235991906145ed565b90506124257fc0d53b6b38dafcad2617ec1d5660bc901206f6e857c2d4538ad90ae7220802f57374338262a35ec73567ad6a04946976f1a6cb647a631ed13d1b338989876040516020016123b09493929190614f97565b60405160208183030381529060405287876040518463ffffffff1660e01b81526004016123df93929190614cea565b602060405180830381865af41580156123fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124209190614d38565b611d77565b612464576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245b90614db1565b60405180910390fd5b6001600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124b491906145ed565b925050819055506000600190505b6001856124cf91906145ed565b81101561252757600160116000836124e5610e5e565b6124ef91906145ed565b815260200190815260200160002060006101000a81548160ff021916908315150217905550808061251f9061471b565b9150506124c2565b50836014600082825461253a91906145ed565b9250508190555061255633868661255191906145ed565b612a69565b5050505050565b612565612836565b6001600b60006101000a81548160ff021916908315150217905550565b61258b826112de565b61259481612a55565b61259e8383612e4d565b505050565b7f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f6125cd81612a55565b82829050878790501480156125e757508282905085859050145b612626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261d90615031565b60405180910390fd5b60005b838390508110156126ab5761269888888381811061264a57612649614a60565b5b9050602002013587878481811061266457612663614a60565b5b9050602002013586868581811061267e5761267d614a60565b5b90506020020160208101906126939190613bf3565b610e99565b80806126a39061471b565b915050612629565b5050505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b612751612836565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b8906150c3565b60405180910390fd5b6127ca81612f3d565b50565b600080601254601354915091509091565b6060601080548060200260200160405190810160405280929190818152602001828054801561282c57602002820191906000526020600020905b815481526020019060010190808311612818575b5050505050905090565b61283e612e45565b73ffffffffffffffffffffffffffffffffffffffff1661285c611d05565b73ffffffffffffffffffffffffffffffffffffffff16146128b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128a99061512f565b60405180910390fd5b565b6000816128bf612a4c565b111580156128ce575060005482105b801561290c575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b8060005260046000fd5b6000612928836117e7565b905081801561296a57508073ffffffffffffffffffffffffffffffffffffffff16612951612cb9565b73ffffffffffffffffffffffffffffffffffffffff1614155b15612996576129808161297b612cb9565b6126b5565b6129955761299463cfb3b94260e01b612913565b5b5b836006600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550828473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a450505050565b60006001905090565b612a6681612a61612e45565b61318c565b50565b6000805490506000821415612a8957612a8863b562e8dd60e01b612913565b5b612a966000848385612d05565b612ab683612aa76000866000612d0b565b612ab085613229565b17612d33565b6004600083815260200190815260200160002081905550600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161690506000811415612b6f57612b6e632e07630060e01b612913565b5b6000838301905060008390505b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a481816001019150811415612b7c5781600081905550505050612bca6000848385612d5e565b505050565b600081612bda612a4c565b11612c7c576004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612c7b576000811415612c76576000548210612c4057612c3f63df2d9b4260e01b612913565b5b5b60046000836001900393508381526020019081526020016000205490506000811415612c6c57612c71565b612c8d565b612c41565b612c8d565b5b612c8c63df2d9b4260e01b612913565b5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612d22868684613239565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b612d6e8282611d77565b612e415760016009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612de6612e45565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b612e578282611d77565b15612f2b5760006009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612ed0612e45565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b612f3a816000613242565b50565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613029612cb9565b8786866040518563ffffffff1660e01b815260040161304b9493929190615199565b6020604051808303816000875af192505050801561308757506040513d601f19601f8201168201806040525081019061308491906151fa565b60015b6130e0573d80600081146130b7576040519150601f19603f3d011682016040523d82523d6000602084013e6130bc565b606091505b506000815114156130d8576130d763d1a57ed660e01b612913565b5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b606060a060405101806040526020810391506000825281835b60011561317757600184039350600a81066030018453600a810490508061317257613177565b61314c565b50828103602084039350808452505050919050565b6131968282611d77565b613225576131bb8173ffffffffffffffffffffffffffffffffffffffff166014613475565b6131c98360001c6020613475565b6040516020016131da9291906152bf565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161321c919061397f565b60405180910390fd5b5050565b60006001821460e11b9050919050565b60009392505050565b600061324d83612bcf565b9050600081905060008061326086612c92565b9150915084156132a85761327c8184613277612cb9565b612cc1565b6132a7576132918361328c612cb9565b6126b5565b6132a6576132a56359c896be60e01b612913565b5b5b5b6132b6836000886001612d05565b80156132c157600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506133698361332685600088612d0b565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717612d33565b600460008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851614156133f15760006001870190506000600460008381526020019081526020016000205414156133ef5760005481146133ee578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461345b836000886001612d5e565b600160008154809291906001019190505550505050505050565b60606000600283600261348891906148ce565b61349291906145ed565b67ffffffffffffffff8111156134ab576134aa613f2d565b5b6040519080825280601f01601f1916602001820160405280156134dd5781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061351557613514614a60565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061357957613578614a60565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026135b991906148ce565b6135c391906145ed565b90505b6001811115613663577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061360557613604614a60565b5b1a60f81b82828151811061361c5761361b614a60565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061365c906152f9565b90506135c6565b50600084146136a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161369e9061536f565b60405180910390fd5b8091505092915050565b8280548282559060005260206000209081019282156136ed579160200282015b828111156136ec5782358255916020019190600101906136d1565b5b5090506136fa9190613784565b5090565b82805461370a906145bb565b90600052602060002090601f01602090048101928261372c5760008555613773565b82601f1061374557803560ff1916838001178555613773565b82800160010185558215613773579182015b82811115613772578235825591602001919060010190613757565b5b5090506137809190613784565b5090565b5b8082111561379d576000816000905550600101613785565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6137ea816137b5565b81146137f557600080fd5b50565b600081359050613807816137e1565b92915050565b600060208284031215613823576138226137ab565b5b6000613831848285016137f8565b91505092915050565b60008115159050919050565b61384f8161383a565b82525050565b600060208201905061386a6000830184613846565b92915050565b6000819050919050565b61388381613870565b811461388e57600080fd5b50565b6000813590506138a08161387a565b92915050565b600080604083850312156138bd576138bc6137ab565b5b60006138cb85828601613891565b92505060206138dc85828601613891565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613920578082015181840152602081019050613905565b8381111561392f576000848401525b50505050565b6000601f19601f8301169050919050565b6000613951826138e6565b61395b81856138f1565b935061396b818560208601613902565b61397481613935565b840191505092915050565b600060208201905081810360008301526139998184613946565b905092915050565b6000602082840312156139b7576139b66137ab565b5b60006139c584828501613891565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006139f9826139ce565b9050919050565b613a09816139ee565b82525050565b6000602082019050613a246000830184613a00565b92915050565b613a33816139ee565b8114613a3e57600080fd5b50565b600081359050613a5081613a2a565b92915050565b60008060408385031215613a6d57613a6c6137ab565b5b6000613a7b85828601613a41565b9250506020613a8c85828601613891565b9150509250929050565b613a9f81613870565b82525050565b6000602082019050613aba6000830184613a96565b92915050565b6000819050919050565b613ad381613ac0565b82525050565b6000602082019050613aee6000830184613aca565b92915050565b600080600060608486031215613b0d57613b0c6137ab565b5b6000613b1b86828701613891565b9350506020613b2c86828701613891565b9250506040613b3d86828701613a41565b9150509250925092565b600080600060608486031215613b6057613b5f6137ab565b5b6000613b6e86828701613a41565b9350506020613b7f86828701613a41565b9250506040613b9086828701613891565b9150509250925092565b613ba381613ac0565b8114613bae57600080fd5b50565b600081359050613bc081613b9a565b92915050565b600060208284031215613bdc57613bdb6137ab565b5b6000613bea84828501613bb1565b91505092915050565b600060208284031215613c0957613c086137ab565b5b6000613c1784828501613a41565b91505092915050565b60008060408385031215613c3757613c366137ab565b5b6000613c4585828601613bb1565b9250506020613c5685828601613a41565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f840112613c8557613c84613c60565b5b8235905067ffffffffffffffff811115613ca257613ca1613c65565b5b602083019150836020820283011115613cbe57613cbd613c6a565b5b9250929050565b60008060208385031215613cdc57613cdb6137ab565b5b600083013567ffffffffffffffff811115613cfa57613cf96137b0565b5b613d0685828601613c6f565b92509250509250929050565b60008083601f840112613d2857613d27613c60565b5b8235905067ffffffffffffffff811115613d4557613d44613c65565b5b602083019150836001820283011115613d6157613d60613c6a565b5b9250929050565b60008060208385031215613d7f57613d7e6137ab565b5b600083013567ffffffffffffffff811115613d9d57613d9c6137b0565b5b613da985828601613d12565b92509250509250929050565b60008083601f840112613dcb57613dca613c60565b5b8235905067ffffffffffffffff811115613de857613de7613c65565b5b602083019150836001820283011115613e0457613e03613c6a565b5b9250929050565b600080600080600060808688031215613e2757613e266137ab565b5b6000613e3588828901613891565b9550506020613e4688828901613891565b9450506040613e5788828901613891565b935050606086013567ffffffffffffffff811115613e7857613e776137b0565b5b613e8488828901613db5565b92509250509295509295909350565b613e9c8161383a565b8114613ea757600080fd5b50565b600081359050613eb981613e93565b92915050565b60008060408385031215613ed657613ed56137ab565b5b6000613ee485828601613a41565b9250506020613ef585828601613eaa565b9150509250929050565b6000604082019050613f146000830185613a96565b613f216020830184613a96565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613f6582613935565b810181811067ffffffffffffffff82111715613f8457613f83613f2d565b5b80604052505050565b6000613f976137a1565b9050613fa38282613f5c565b919050565b600067ffffffffffffffff821115613fc357613fc2613f2d565b5b613fcc82613935565b9050602081019050919050565b82818337600083830152505050565b6000613ffb613ff684613fa8565b613f8d565b90508281526020810184848401111561401757614016613f28565b5b614022848285613fd9565b509392505050565b600082601f83011261403f5761403e613c60565b5b813561404f848260208601613fe8565b91505092915050565b60008060008060808587031215614072576140716137ab565b5b600061408087828801613a41565b945050602061409187828801613a41565b93505060406140a287828801613891565b925050606085013567ffffffffffffffff8111156140c3576140c26137b0565b5b6140cf8782880161402a565b91505092959194509250565b600080600080606085870312156140f5576140f46137ab565b5b600061410387828801613891565b945050602061411487828801613891565b935050604085013567ffffffffffffffff811115614135576141346137b0565b5b61414187828801613db5565b925092505092959194509250565b60008083601f84011261416557614164613c60565b5b8235905067ffffffffffffffff81111561418257614181613c65565b5b60208301915083602082028301111561419e5761419d613c6a565b5b9250929050565b600080600080600080606087890312156141c2576141c16137ab565b5b600087013567ffffffffffffffff8111156141e0576141df6137b0565b5b6141ec89828a01613c6f565b9650965050602087013567ffffffffffffffff81111561420f5761420e6137b0565b5b61421b89828a01613c6f565b9450945050604087013567ffffffffffffffff81111561423e5761423d6137b0565b5b61424a89828a0161414f565b92509250509295509295509295565b600080604083850312156142705761426f6137ab565b5b600061427e85828601613a41565b925050602061428f85828601613a41565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6142ce81613870565b82525050565b60006142e083836142c5565b60208301905092915050565b6000602082019050919050565b600061430482614299565b61430e81856142a4565b9350614319836142b5565b8060005b8381101561434a57815161433188826142d4565b975061433c836142ec565b92505060018101905061431d565b5085935050505092915050565b6000602082019050818103600083015261437181846142f9565b905092915050565b7f4138000000000000000000000000000000000000000000000000000000000000600082015250565b60006143af6002836138f1565b91506143ba82614379565b602082019050919050565b600060208201905081810360008301526143de816143a2565b9050919050565b7f4139000000000000000000000000000000000000000000000000000000000000600082015250565b600061441b6002836138f1565b9150614426826143e5565b602082019050919050565b6000602082019050818103600083015261444a8161440e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061448b82613870565b915061449683613870565b9250828210156144a9576144a8614451565b5b828203905092915050565b7f4131300000000000000000000000000000000000000000000000000000000000600082015250565b60006144ea6003836138f1565b91506144f5826144b4565b602082019050919050565b60006020820190508181036000830152614519816144dd565b9050919050565b7f4131310000000000000000000000000000000000000000000000000000000000600082015250565b60006145566003836138f1565b915061456182614520565b602082019050919050565b6000602082019050818103600083015261458581614549565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806145d357607f821691505b602082108114156145e7576145e661458c565b5b50919050565b60006145f882613870565b915061460383613870565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561463857614637614451565b5b828201905092915050565b7f4133000000000000000000000000000000000000000000000000000000000000600082015250565b60006146796002836138f1565b915061468482614643565b602082019050919050565b600060208201905081810360008301526146a88161466c565b9050919050565b7f4134000000000000000000000000000000000000000000000000000000000000600082015250565b60006146e56002836138f1565b91506146f0826146af565b602082019050919050565b60006020820190508181036000830152614714816146d8565b9050919050565b600061472682613870565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561475957614758614451565b5b600182019050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b60006147c0602f836138f1565b91506147cb82614764565b604082019050919050565b600060208201905081810360008301526147ef816147b3565b9050919050565b7f4131320000000000000000000000000000000000000000000000000000000000600082015250565b600061482c6003836138f1565b9150614837826147f6565b602082019050919050565b6000602082019050818103600083015261485b8161481f565b9050919050565b7f4131340000000000000000000000000000000000000000000000000000000000600082015250565b60006148986003836138f1565b91506148a382614862565b602082019050919050565b600060208201905081810360008301526148c78161488b565b9050919050565b60006148d982613870565b91506148e483613870565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561491d5761491c614451565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061496282613870565b915061496d83613870565b92508261497d5761497c614928565b5b828204905092915050565b7f4131350000000000000000000000000000000000000000000000000000000000600082015250565b60006149be6003836138f1565b91506149c982614988565b602082019050919050565b600060208201905081810360008301526149ed816149b1565b9050919050565b7f4131330000000000000000000000000000000000000000000000000000000000600082015250565b6000614a2a6003836138f1565b9150614a35826149f4565b602082019050919050565b60006020820190508181036000830152614a5981614a1d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4131000000000000000000000000000000000000000000000000000000000000600082015250565b6000614ac56002836138f1565b9150614ad082614a8f565b602082019050919050565b60006020820190508181036000830152614af481614ab8565b9050919050565b7f4132000000000000000000000000000000000000000000000000000000000000600082015250565b6000614b316002836138f1565b9150614b3c82614afb565b602082019050919050565b60006020820190508181036000830152614b6081614b24565b9050919050565b7f4135000000000000000000000000000000000000000000000000000000000000600082015250565b6000614b9d6002836138f1565b9150614ba882614b67565b602082019050919050565b60006020820190508181036000830152614bcc81614b90565b9050919050565b60008160601b9050919050565b6000614beb82614bd3565b9050919050565b6000614bfd82614be0565b9050919050565b614c15614c10826139ee565b614bf2565b82525050565b6000819050919050565b614c36614c3182613870565b614c1b565b82525050565b6000614c488285614c04565b601482019150614c588284614c25565b6020820191508190509392505050565b600081519050919050565b600082825260208201905092915050565b6000614c8f82614c68565b614c998185614c73565b9350614ca9818560208601613902565b614cb281613935565b840191505092915050565b6000614cc98385614c73565b9350614cd6838584613fd9565b614cdf83613935565b840190509392505050565b60006040820190508181036000830152614d048186614c84565b90508181036020830152614d19818486614cbd565b9050949350505050565b600081519050614d3281613a2a565b92915050565b600060208284031215614d4e57614d4d6137ab565b5b6000614d5c84828501614d23565b91505092915050565b7f4136000000000000000000000000000000000000000000000000000000000000600082015250565b6000614d9b6002836138f1565b9150614da682614d65565b602082019050919050565b60006020820190508181036000830152614dca81614d8e565b9050919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154614dfe816145bb565b614e088186614dd1565b94506001821660008114614e235760018114614e3457614e67565b60ff19831686528186019350614e67565b614e3d85614ddc565b60005b83811015614e5f57815481890152600182019150602081019050614e40565b838801955050505b50505092915050565b7f6d6564757361732f000000000000000000000000000000000000000000000000600082015250565b6000614ea6600883614dd1565b9150614eb182614e70565b600882019050919050565b6000614ec7826138e6565b614ed18185614dd1565b9350614ee1818560208601613902565b80840191505092915050565b6000614ef98285614df1565b9150614f0482614e99565b9150614f108284614ebc565b91508190509392505050565b7f6d696e6f74617572732f00000000000000000000000000000000000000000000600082015250565b6000614f52600a83614dd1565b9150614f5d82614f1c565b600a82019050919050565b6000614f748285614df1565b9150614f7f82614f45565b9150614f8b8284614ebc565b91508190509392505050565b6000614fa38287614c04565b601482019150614fb38286614c25565b602082019150614fc38285614c25565b602082019150614fd38284614c25565b60208201915081905095945050505050565b7f4137000000000000000000000000000000000000000000000000000000000000600082015250565b600061501b6002836138f1565b915061502682614fe5565b602082019050919050565b6000602082019050818103600083015261504a8161500e565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006150ad6026836138f1565b91506150b882615051565b604082019050919050565b600060208201905081810360008301526150dc816150a0565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006151196020836138f1565b9150615124826150e3565b602082019050919050565b600060208201905081810360008301526151488161510c565b9050919050565b600082825260208201905092915050565b600061516b82614c68565b615175818561514f565b9350615185818560208601613902565b61518e81613935565b840191505092915050565b60006080820190506151ae6000830187613a00565b6151bb6020830186613a00565b6151c86040830185613a96565b81810360608301526151da8184615160565b905095945050505050565b6000815190506151f4816137e1565b92915050565b6000602082840312156152105761520f6137ab565b5b600061521e848285016151e5565b91505092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061525d601783614dd1565b915061526882615227565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006152a9601183614dd1565b91506152b482615273565b601182019050919050565b60006152ca82615250565b91506152d68285614ebc565b91506152e18261529c565b91506152ed8284614ebc565b91508190509392505050565b600061530482613870565b9150600082141561531857615317614451565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006153596020836138f1565b915061536482615323565b602082019050919050565b600060208201905081810360008301526153888161534c565b905091905056fea2646970667358221220005d771958746eba13e8ede2151c0d5f47f182efe3adb559eba23399c0530f1264736f6c634300080b0033697066733a2f2f516d646459534b574e4747575333687452424451763774376f337851683648477456785341677350474552474e572f
Deployed Bytecode
0x6080604052600436106102ae5760003560e01c806370a0823111610175578063af35e4d9116100dc578063d111515d11610095578063e985e9c51161006f578063e985e9c514610a67578063f2fde38b14610aa4578063f3ad59fd14610acd578063fb5aeaef14610af9576102ae565b8063d111515d146109fe578063d547741f14610a15578063d55d4df614610a3e576102ae565b8063af35e4d9146108f9578063b88d4fde14610925578063bd9a548b14610941578063c87b56dd1461096d578063cbf21fe4146109aa578063d0ae52d2146109d5576102ae565b806395d89b411161012e57806395d89b41146107e9578063963c3546146108145780639a74f0ce1461083d578063a1ebf35d1461087a578063a217fddf146108a5578063a22cb465146108d0576102ae565b806370a08231146106c5578063715018a61461070257806374e701bd146107195780638da5cb5b146107445780639065ea471461076f57806391d14854146107ac576102ae565b80632f2ff15d1161021957806351cff8d9116101d257806351cff8d9146105c857806355bb1ecb146105f157806355f804b31461061a5780635abe7dff146106435780636352211e1461066c57806365c649a2146106a9576102ae565b80632f2ff15d146104dd57806336568abe146105065780633bd2b67d1461052f5780633eb427a01461055857806342842e0e1461058357806342966c681461059f576102ae565b80631e0fbfa21161026b5780631e0fbfa2146103c85780631e2e8c95146103f357806323b872dd1461041c578063248a9ca31461043857806325dc61fb146104755780632d0335ab146104a0576102ae565b806301ffc9a7146102b357806306d4c8b4146102f057806306fdde0314610319578063081812fc14610344578063095ea7b31461038157806318160ddd1461039d575b600080fd5b3480156102bf57600080fd5b506102da60048036038101906102d5919061380d565b610b24565b6040516102e79190613855565b60405180910390f35b3480156102fc57600080fd5b50610317600480360381019061031291906138a6565b610c1e565b005b34801561032557600080fd5b5061032e610d5e565b60405161033b919061397f565b60405180910390f35b34801561035057600080fd5b5061036b600480360381019061036691906139a1565b610df0565b6040516103789190613a0f565b60405180910390f35b61039b60048036038101906103969190613a56565b610e4e565b005b3480156103a957600080fd5b506103b2610e5e565b6040516103bf9190613aa5565b60405180910390f35b3480156103d457600080fd5b506103dd610e75565b6040516103ea9190613ad9565b60405180910390f35b3480156103ff57600080fd5b5061041a60048036038101906104159190613af4565b610e99565b005b61043660048036038101906104319190613b47565b61101a565b005b34801561044457600080fd5b5061045f600480360381019061045a9190613bc6565b6112de565b60405161046c9190613ad9565b60405180910390f35b34801561048157600080fd5b5061048a6112fe565b6040516104979190613855565b60405180910390f35b3480156104ac57600080fd5b506104c760048036038101906104c29190613bf3565b611311565b6040516104d49190613aa5565b60405180910390f35b3480156104e957600080fd5b5061050460048036038101906104ff9190613c20565b61135a565b005b34801561051257600080fd5b5061052d60048036038101906105289190613c20565b61137b565b005b34801561053b57600080fd5b50610556600480360381019061055191906139a1565b6113fe565b005b34801561056457600080fd5b5061056d611410565b60405161057a9190613ad9565b60405180910390f35b61059d60048036038101906105989190613b47565b611434565b005b3480156105ab57600080fd5b506105c660048036038101906105c191906139a1565b611454565b005b3480156105d457600080fd5b506105ef60048036038101906105ea9190613bf3565b6114d6565b005b3480156105fd57600080fd5b5061061860048036038101906106139190613cc5565b611741565b005b34801561062657600080fd5b50610641600480360381019061063c9190613d68565b61175f565b005b34801561064f57600080fd5b5061066a600480360381019061066591906138a6565b6117cd565b005b34801561067857600080fd5b50610693600480360381019061068e91906139a1565b6117e7565b6040516106a09190613a0f565b60405180910390f35b6106c360048036038101906106be9190613e0b565b6117f9565b005b3480156106d157600080fd5b506106ec60048036038101906106e79190613bf3565b611c4f565b6040516106f99190613aa5565b60405180910390f35b34801561070e57600080fd5b50610717611ce7565b005b34801561072557600080fd5b5061072e611cfb565b60405161073b9190613aa5565b60405180910390f35b34801561075057600080fd5b50610759611d05565b6040516107669190613a0f565b60405180910390f35b34801561077b57600080fd5b50610796600480360381019061079191906139a1565b611d2f565b6040516107a39190613855565b60405180910390f35b3480156107b857600080fd5b506107d360048036038101906107ce9190613c20565b611d77565b6040516107e09190613855565b60405180910390f35b3480156107f557600080fd5b506107fe611de2565b60405161080b919061397f565b60405180910390f35b34801561082057600080fd5b5061083b600480360381019061083691906139a1565b611e74565b005b34801561084957600080fd5b50610864600480360381019061085f9190613bf3565b611e86565b6040516108719190613aa5565b60405180910390f35b34801561088657600080fd5b5061088f611ecf565b60405161089c9190613ad9565b60405180910390f35b3480156108b157600080fd5b506108ba611ef3565b6040516108c79190613ad9565b60405180910390f35b3480156108dc57600080fd5b506108f760048036038101906108f29190613ebf565b611efa565b005b34801561090557600080fd5b5061090e612005565b60405161091c929190613eff565b60405180910390f35b61093f600480360381019061093a9190614058565b612028565b005b34801561094d57600080fd5b5061095661207a565b604051610964929190613eff565b60405180910390f35b34801561097957600080fd5b50610994600480360381019061098f91906139a1565b61208b565b6040516109a1919061397f565b60405180910390f35b3480156109b657600080fd5b506109bf6121b1565b6040516109cc9190613aa5565b60405180910390f35b3480156109e157600080fd5b506109fc60048036038101906109f791906140db565b6121bb565b005b348015610a0a57600080fd5b50610a1361255d565b005b348015610a2157600080fd5b50610a3c6004803603810190610a379190613c20565b612582565b005b348015610a4a57600080fd5b50610a656004803603810190610a6091906141a5565b6125a3565b005b348015610a7357600080fd5b50610a8e6004803603810190610a899190614259565b6126b5565b604051610a9b9190613855565b60405180910390f35b348015610ab057600080fd5b50610acb6004803603810190610ac69190613bf3565b612749565b005b348015610ad957600080fd5b50610ae26127cd565b604051610af0929190613eff565b60405180910390f35b348015610b0557600080fd5b50610b0e6127de565b604051610b1b9190614357565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b7f57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610baf5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610c1757507f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b610c26612836565b601254821115610c6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c62906143c5565b60405180910390fd5b601354811115610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790614431565b60405180910390fd5b601454610cbb610e5e565b610cc59190614480565b821015610d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfe90614500565b60405180910390fd5b601454811015610d4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d439061456c565b60405180910390fd5b81601281905550806013819055505050565b606060028054610d6d906145bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610d99906145bb565b8015610de65780601f10610dbb57610100808354040283529160200191610de6565b820191906000526020600020905b815481529060010190602001808311610dc957829003601f168201915b5050505050905090565b6000610dfb826128b4565b610e1057610e0f63cf4700e460e01b612913565b5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b610e5a8282600161291d565b5050565b6000610e68612a4c565b6001546000540303905090565b7f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f81565b7f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f610ec381612a55565b60125484601454610ed2610e5e565b610edc9190614480565b610ee691906145ed565b1115610f27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1e9061468f565b60405180910390fd5b60135483601454610f3891906145ed565b1115610f79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f70906146fb565b60405180910390fd5b6000600190505b600184610f8d91906145ed565b811015610fe55760016011600083610fa3610e5e565b610fad91906145ed565b815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610fdd9061471b565b915050610f80565b508260146000828254610ff891906145ed565b9250508190555061101482858561100f91906145ed565b612a69565b50505050565b600061102582612bcf565b905073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161693508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461109a5761109963a114810060e01b612913565b5b6000806110a684612c92565b915091506110bc81876110b7612cb9565b612cc1565b6110e7576110d1866110cc612cb9565b6126b5565b6110e6576110e56359c896be60e01b612913565b5b5b6110f48686866001612d05565b80156110ff57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506111cd856111a9888887612d0b565b7c020000000000000000000000000000000000000000000000000000000017612d33565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415611255576000600185019050600060046000838152602001908152602001600020541415611253576000548114611252578360046000838152602001908152602001600020819055505b5b505b600073ffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff161690508481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460008114156112c8576112c763ea553b3460e01b612913565b5b6112d58787876001612d5e565b50505050505050565b600060096000838152602001908152602001600020600101549050919050565b600b60009054906101000a900460ff1681565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611363826112de565b61136c81612a55565b6113768383612d64565b505050565b611383612e45565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146113f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e7906147d6565b60405180910390fd5b6113fa8282612e4d565b5050565b611406612836565b80600d8190555050565b7fc0d53b6b38dafcad2617ec1d5660bc901206f6e857c2d4538ad90ae7220802f581565b61144f83838360405180602001604052806000815250612028565b505050565b3373ffffffffffffffffffffffffffffffffffffffff16611474826117e7565b73ffffffffffffffffffffffffffffffffffffffff16146114ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c190614842565b60405180910390fd5b6114d381612f2f565b50565b6000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154f906148ae565b60405180910390fd5b60006017544761156891906145ed565b90506000601860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103e8601960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846115fa91906148ce565b6116049190614957565b61160e9190614480565b905080601860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165b91906145ed565b601860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806017546116ac91906145ed565b601781905550600081116116f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ec906149d4565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561173b573d6000803e3d6000fd5b50505050565b611749612836565b81816010919061175a9291906136b1565b505050565b611767612836565b600b60009054906101000a900460ff16156117b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ae90614a40565b60405180910390fd5b8181600a91906117c89291906136fe565b505050565b6117d5612836565b81600e8190555080600f819055505050565b60006117f282612bcf565b9050919050565b60646010848154811061180f5761180e614a60565b5b906000526020600020015485600f5461182891906148ce565b87600e5461183691906148ce565b61184091906145ed565b61184a91906148ce565b6118549190614957565b3414611895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188c90614adb565b60405180910390fd5b6015548486601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e491906145ed565b6118ee91906145ed565b111561192f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192690614b47565b60405180910390fd5b6012548560145461193e610e5e565b6119489190614480565b61195291906145ed565b1115611993576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198a9061468f565b60405180910390fd5b601354846014546119a491906145ed565b11156119e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dc906146fb565b60405180910390fd5b600d544211611a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2090614bb3565b60405180910390fd5b8385611a3591906145ed565b601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a8391906145ed565b92505081905550611b6e7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f707374338262a35ec73567ad6a04946976f1a6cb647a631ed13d1b3360108881548110611add57611adc614a60565b5b9060005260206000200154604051602001611af9929190614c3c565b60405160208183030381529060405286866040518463ffffffff1660e01b8152600401611b2893929190614cea565b602060405180830381865af4158015611b45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b699190614d38565b611d77565b611bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba490614db1565b60405180910390fd5b6000600190505b600185611bc191906145ed565b811015611c195760016011600083611bd7610e5e565b611be191906145ed565b815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611c119061471b565b915050611bb4565b508360146000828254611c2c91906145ed565b92505081905550611c48338587611c4391906145ed565b612a69565b5050505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c9657611c95638f4eb60460e01b612913565b5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611cef612836565b611cf96000612f3d565b565b6000601554905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000611d3a826128b4565b611d4f57611d4e633a85a02360e01b612913565b5b6011600083815260200190815260200160002060009054906101000a900460ff169050919050565b60006009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b606060038054611df1906145bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611e1d906145bb565b8015611e6a5780601f10611e3f57610100808354040283529160200191611e6a565b820191906000526020600020905b815481529060010190602001808311611e4d57829003601f168201915b5050505050905090565b611e7c612836565b8060158190555050565b6000601660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b7fe2f4eaae4a9751e85a3e4a7b9587827a877f29914755229b07a7b2da98285f7081565b6000801b81565b8060076000611f07612cb9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611fb4612cb9565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611ff99190613855565b60405180910390a35050565b600080601454612013610e5e565b61201d9190614480565b601454915091509091565b61203384848461101a565b60008373ffffffffffffffffffffffffffffffffffffffff163b146120745761205e84848484613003565b6120735761207263d1a57ed660e01b612913565b5b5b50505050565b600080600e54600f54915091509091565b6060612096826128b4565b6120cc576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6011600083815260200190815260200160002060009054906101000a900460ff1615612151576000600a8054612101906145bb565b9050141561211e576040518060200160405280600081525061214a565b600a61212983613133565b60405160200161213a929190614eed565b6040516020818303038152906040525b90506121ac565b6000600a8054612160906145bb565b9050141561217d57604051806020016040528060008152506121a9565b600a61218883613133565b604051602001612199929190614f68565b6040516020818303038152906040525b90505b919050565b6000600d54905090565b6015548385601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461220a91906145ed565b61221491906145ed565b1115612255576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224c90614b47565b60405180910390fd5b60125484601454612264610e5e565b61226e9190614480565b61227891906145ed565b11156122b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b09061468f565b60405180910390fd5b601354836014546122ca91906145ed565b111561230b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612302906146fb565b60405180910390fd5b60006001600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461235991906145ed565b90506124257fc0d53b6b38dafcad2617ec1d5660bc901206f6e857c2d4538ad90ae7220802f57374338262a35ec73567ad6a04946976f1a6cb647a631ed13d1b338989876040516020016123b09493929190614f97565b60405160208183030381529060405287876040518463ffffffff1660e01b81526004016123df93929190614cea565b602060405180830381865af41580156123fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124209190614d38565b611d77565b612464576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245b90614db1565b60405180910390fd5b6001600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124b491906145ed565b925050819055506000600190505b6001856124cf91906145ed565b81101561252757600160116000836124e5610e5e565b6124ef91906145ed565b815260200190815260200160002060006101000a81548160ff021916908315150217905550808061251f9061471b565b9150506124c2565b50836014600082825461253a91906145ed565b9250508190555061255633868661255191906145ed565b612a69565b5050505050565b612565612836565b6001600b60006101000a81548160ff021916908315150217905550565b61258b826112de565b61259481612a55565b61259e8383612e4d565b505050565b7f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f6125cd81612a55565b82829050878790501480156125e757508282905085859050145b612626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261d90615031565b60405180910390fd5b60005b838390508110156126ab5761269888888381811061264a57612649614a60565b5b9050602002013587878481811061266457612663614a60565b5b9050602002013586868581811061267e5761267d614a60565b5b90506020020160208101906126939190613bf3565b610e99565b80806126a39061471b565b915050612629565b5050505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b612751612836565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156127c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b8906150c3565b60405180910390fd5b6127ca81612f3d565b50565b600080601254601354915091509091565b6060601080548060200260200160405190810160405280929190818152602001828054801561282c57602002820191906000526020600020905b815481526020019060010190808311612818575b5050505050905090565b61283e612e45565b73ffffffffffffffffffffffffffffffffffffffff1661285c611d05565b73ffffffffffffffffffffffffffffffffffffffff16146128b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128a99061512f565b60405180910390fd5b565b6000816128bf612a4c565b111580156128ce575060005482105b801561290c575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b8060005260046000fd5b6000612928836117e7565b905081801561296a57508073ffffffffffffffffffffffffffffffffffffffff16612951612cb9565b73ffffffffffffffffffffffffffffffffffffffff1614155b15612996576129808161297b612cb9565b6126b5565b6129955761299463cfb3b94260e01b612913565b5b5b836006600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550828473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a450505050565b60006001905090565b612a6681612a61612e45565b61318c565b50565b6000805490506000821415612a8957612a8863b562e8dd60e01b612913565b5b612a966000848385612d05565b612ab683612aa76000866000612d0b565b612ab085613229565b17612d33565b6004600083815260200190815260200160002081905550600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161690506000811415612b6f57612b6e632e07630060e01b612913565b5b6000838301905060008390505b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a481816001019150811415612b7c5781600081905550505050612bca6000848385612d5e565b505050565b600081612bda612a4c565b11612c7c576004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612c7b576000811415612c76576000548210612c4057612c3f63df2d9b4260e01b612913565b5b5b60046000836001900393508381526020019081526020016000205490506000811415612c6c57612c71565b612c8d565b612c41565b612c8d565b5b612c8c63df2d9b4260e01b612913565b5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612d22868684613239565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b612d6e8282611d77565b612e415760016009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612de6612e45565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b612e578282611d77565b15612f2b5760006009600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612ed0612e45565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b612f3a816000613242565b50565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613029612cb9565b8786866040518563ffffffff1660e01b815260040161304b9493929190615199565b6020604051808303816000875af192505050801561308757506040513d601f19601f8201168201806040525081019061308491906151fa565b60015b6130e0573d80600081146130b7576040519150601f19603f3d011682016040523d82523d6000602084013e6130bc565b606091505b506000815114156130d8576130d763d1a57ed660e01b612913565b5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b606060a060405101806040526020810391506000825281835b60011561317757600184039350600a81066030018453600a810490508061317257613177565b61314c565b50828103602084039350808452505050919050565b6131968282611d77565b613225576131bb8173ffffffffffffffffffffffffffffffffffffffff166014613475565b6131c98360001c6020613475565b6040516020016131da9291906152bf565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161321c919061397f565b60405180910390fd5b5050565b60006001821460e11b9050919050565b60009392505050565b600061324d83612bcf565b9050600081905060008061326086612c92565b9150915084156132a85761327c8184613277612cb9565b612cc1565b6132a7576132918361328c612cb9565b6126b5565b6132a6576132a56359c896be60e01b612913565b5b5b5b6132b6836000886001612d05565b80156132c157600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506133698361332685600088612d0b565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717612d33565b600460008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851614156133f15760006001870190506000600460008381526020019081526020016000205414156133ef5760005481146133ee578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461345b836000886001612d5e565b600160008154809291906001019190505550505050505050565b60606000600283600261348891906148ce565b61349291906145ed565b67ffffffffffffffff8111156134ab576134aa613f2d565b5b6040519080825280601f01601f1916602001820160405280156134dd5781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061351557613514614a60565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061357957613578614a60565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026135b991906148ce565b6135c391906145ed565b90505b6001811115613663577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061360557613604614a60565b5b1a60f81b82828151811061361c5761361b614a60565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061365c906152f9565b90506135c6565b50600084146136a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161369e9061536f565b60405180910390fd5b8091505092915050565b8280548282559060005260206000209081019282156136ed579160200282015b828111156136ec5782358255916020019190600101906136d1565b5b5090506136fa9190613784565b5090565b82805461370a906145bb565b90600052602060002090601f01602090048101928261372c5760008555613773565b82601f1061374557803560ff1916838001178555613773565b82800160010185558215613773579182015b82811115613772578235825591602001919060010190613757565b5b5090506137809190613784565b5090565b5b8082111561379d576000816000905550600101613785565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6137ea816137b5565b81146137f557600080fd5b50565b600081359050613807816137e1565b92915050565b600060208284031215613823576138226137ab565b5b6000613831848285016137f8565b91505092915050565b60008115159050919050565b61384f8161383a565b82525050565b600060208201905061386a6000830184613846565b92915050565b6000819050919050565b61388381613870565b811461388e57600080fd5b50565b6000813590506138a08161387a565b92915050565b600080604083850312156138bd576138bc6137ab565b5b60006138cb85828601613891565b92505060206138dc85828601613891565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613920578082015181840152602081019050613905565b8381111561392f576000848401525b50505050565b6000601f19601f8301169050919050565b6000613951826138e6565b61395b81856138f1565b935061396b818560208601613902565b61397481613935565b840191505092915050565b600060208201905081810360008301526139998184613946565b905092915050565b6000602082840312156139b7576139b66137ab565b5b60006139c584828501613891565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006139f9826139ce565b9050919050565b613a09816139ee565b82525050565b6000602082019050613a246000830184613a00565b92915050565b613a33816139ee565b8114613a3e57600080fd5b50565b600081359050613a5081613a2a565b92915050565b60008060408385031215613a6d57613a6c6137ab565b5b6000613a7b85828601613a41565b9250506020613a8c85828601613891565b9150509250929050565b613a9f81613870565b82525050565b6000602082019050613aba6000830184613a96565b92915050565b6000819050919050565b613ad381613ac0565b82525050565b6000602082019050613aee6000830184613aca565b92915050565b600080600060608486031215613b0d57613b0c6137ab565b5b6000613b1b86828701613891565b9350506020613b2c86828701613891565b9250506040613b3d86828701613a41565b9150509250925092565b600080600060608486031215613b6057613b5f6137ab565b5b6000613b6e86828701613a41565b9350506020613b7f86828701613a41565b9250506040613b9086828701613891565b9150509250925092565b613ba381613ac0565b8114613bae57600080fd5b50565b600081359050613bc081613b9a565b92915050565b600060208284031215613bdc57613bdb6137ab565b5b6000613bea84828501613bb1565b91505092915050565b600060208284031215613c0957613c086137ab565b5b6000613c1784828501613a41565b91505092915050565b60008060408385031215613c3757613c366137ab565b5b6000613c4585828601613bb1565b9250506020613c5685828601613a41565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f840112613c8557613c84613c60565b5b8235905067ffffffffffffffff811115613ca257613ca1613c65565b5b602083019150836020820283011115613cbe57613cbd613c6a565b5b9250929050565b60008060208385031215613cdc57613cdb6137ab565b5b600083013567ffffffffffffffff811115613cfa57613cf96137b0565b5b613d0685828601613c6f565b92509250509250929050565b60008083601f840112613d2857613d27613c60565b5b8235905067ffffffffffffffff811115613d4557613d44613c65565b5b602083019150836001820283011115613d6157613d60613c6a565b5b9250929050565b60008060208385031215613d7f57613d7e6137ab565b5b600083013567ffffffffffffffff811115613d9d57613d9c6137b0565b5b613da985828601613d12565b92509250509250929050565b60008083601f840112613dcb57613dca613c60565b5b8235905067ffffffffffffffff811115613de857613de7613c65565b5b602083019150836001820283011115613e0457613e03613c6a565b5b9250929050565b600080600080600060808688031215613e2757613e266137ab565b5b6000613e3588828901613891565b9550506020613e4688828901613891565b9450506040613e5788828901613891565b935050606086013567ffffffffffffffff811115613e7857613e776137b0565b5b613e8488828901613db5565b92509250509295509295909350565b613e9c8161383a565b8114613ea757600080fd5b50565b600081359050613eb981613e93565b92915050565b60008060408385031215613ed657613ed56137ab565b5b6000613ee485828601613a41565b9250506020613ef585828601613eaa565b9150509250929050565b6000604082019050613f146000830185613a96565b613f216020830184613a96565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613f6582613935565b810181811067ffffffffffffffff82111715613f8457613f83613f2d565b5b80604052505050565b6000613f976137a1565b9050613fa38282613f5c565b919050565b600067ffffffffffffffff821115613fc357613fc2613f2d565b5b613fcc82613935565b9050602081019050919050565b82818337600083830152505050565b6000613ffb613ff684613fa8565b613f8d565b90508281526020810184848401111561401757614016613f28565b5b614022848285613fd9565b509392505050565b600082601f83011261403f5761403e613c60565b5b813561404f848260208601613fe8565b91505092915050565b60008060008060808587031215614072576140716137ab565b5b600061408087828801613a41565b945050602061409187828801613a41565b93505060406140a287828801613891565b925050606085013567ffffffffffffffff8111156140c3576140c26137b0565b5b6140cf8782880161402a565b91505092959194509250565b600080600080606085870312156140f5576140f46137ab565b5b600061410387828801613891565b945050602061411487828801613891565b935050604085013567ffffffffffffffff811115614135576141346137b0565b5b61414187828801613db5565b925092505092959194509250565b60008083601f84011261416557614164613c60565b5b8235905067ffffffffffffffff81111561418257614181613c65565b5b60208301915083602082028301111561419e5761419d613c6a565b5b9250929050565b600080600080600080606087890312156141c2576141c16137ab565b5b600087013567ffffffffffffffff8111156141e0576141df6137b0565b5b6141ec89828a01613c6f565b9650965050602087013567ffffffffffffffff81111561420f5761420e6137b0565b5b61421b89828a01613c6f565b9450945050604087013567ffffffffffffffff81111561423e5761423d6137b0565b5b61424a89828a0161414f565b92509250509295509295509295565b600080604083850312156142705761426f6137ab565b5b600061427e85828601613a41565b925050602061428f85828601613a41565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6142ce81613870565b82525050565b60006142e083836142c5565b60208301905092915050565b6000602082019050919050565b600061430482614299565b61430e81856142a4565b9350614319836142b5565b8060005b8381101561434a57815161433188826142d4565b975061433c836142ec565b92505060018101905061431d565b5085935050505092915050565b6000602082019050818103600083015261437181846142f9565b905092915050565b7f4138000000000000000000000000000000000000000000000000000000000000600082015250565b60006143af6002836138f1565b91506143ba82614379565b602082019050919050565b600060208201905081810360008301526143de816143a2565b9050919050565b7f4139000000000000000000000000000000000000000000000000000000000000600082015250565b600061441b6002836138f1565b9150614426826143e5565b602082019050919050565b6000602082019050818103600083015261444a8161440e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061448b82613870565b915061449683613870565b9250828210156144a9576144a8614451565b5b828203905092915050565b7f4131300000000000000000000000000000000000000000000000000000000000600082015250565b60006144ea6003836138f1565b91506144f5826144b4565b602082019050919050565b60006020820190508181036000830152614519816144dd565b9050919050565b7f4131310000000000000000000000000000000000000000000000000000000000600082015250565b60006145566003836138f1565b915061456182614520565b602082019050919050565b6000602082019050818103600083015261458581614549565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806145d357607f821691505b602082108114156145e7576145e661458c565b5b50919050565b60006145f882613870565b915061460383613870565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561463857614637614451565b5b828201905092915050565b7f4133000000000000000000000000000000000000000000000000000000000000600082015250565b60006146796002836138f1565b915061468482614643565b602082019050919050565b600060208201905081810360008301526146a88161466c565b9050919050565b7f4134000000000000000000000000000000000000000000000000000000000000600082015250565b60006146e56002836138f1565b91506146f0826146af565b602082019050919050565b60006020820190508181036000830152614714816146d8565b9050919050565b600061472682613870565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561475957614758614451565b5b600182019050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b60006147c0602f836138f1565b91506147cb82614764565b604082019050919050565b600060208201905081810360008301526147ef816147b3565b9050919050565b7f4131320000000000000000000000000000000000000000000000000000000000600082015250565b600061482c6003836138f1565b9150614837826147f6565b602082019050919050565b6000602082019050818103600083015261485b8161481f565b9050919050565b7f4131340000000000000000000000000000000000000000000000000000000000600082015250565b60006148986003836138f1565b91506148a382614862565b602082019050919050565b600060208201905081810360008301526148c78161488b565b9050919050565b60006148d982613870565b91506148e483613870565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561491d5761491c614451565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061496282613870565b915061496d83613870565b92508261497d5761497c614928565b5b828204905092915050565b7f4131350000000000000000000000000000000000000000000000000000000000600082015250565b60006149be6003836138f1565b91506149c982614988565b602082019050919050565b600060208201905081810360008301526149ed816149b1565b9050919050565b7f4131330000000000000000000000000000000000000000000000000000000000600082015250565b6000614a2a6003836138f1565b9150614a35826149f4565b602082019050919050565b60006020820190508181036000830152614a5981614a1d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4131000000000000000000000000000000000000000000000000000000000000600082015250565b6000614ac56002836138f1565b9150614ad082614a8f565b602082019050919050565b60006020820190508181036000830152614af481614ab8565b9050919050565b7f4132000000000000000000000000000000000000000000000000000000000000600082015250565b6000614b316002836138f1565b9150614b3c82614afb565b602082019050919050565b60006020820190508181036000830152614b6081614b24565b9050919050565b7f4135000000000000000000000000000000000000000000000000000000000000600082015250565b6000614b9d6002836138f1565b9150614ba882614b67565b602082019050919050565b60006020820190508181036000830152614bcc81614b90565b9050919050565b60008160601b9050919050565b6000614beb82614bd3565b9050919050565b6000614bfd82614be0565b9050919050565b614c15614c10826139ee565b614bf2565b82525050565b6000819050919050565b614c36614c3182613870565b614c1b565b82525050565b6000614c488285614c04565b601482019150614c588284614c25565b6020820191508190509392505050565b600081519050919050565b600082825260208201905092915050565b6000614c8f82614c68565b614c998185614c73565b9350614ca9818560208601613902565b614cb281613935565b840191505092915050565b6000614cc98385614c73565b9350614cd6838584613fd9565b614cdf83613935565b840190509392505050565b60006040820190508181036000830152614d048186614c84565b90508181036020830152614d19818486614cbd565b9050949350505050565b600081519050614d3281613a2a565b92915050565b600060208284031215614d4e57614d4d6137ab565b5b6000614d5c84828501614d23565b91505092915050565b7f4136000000000000000000000000000000000000000000000000000000000000600082015250565b6000614d9b6002836138f1565b9150614da682614d65565b602082019050919050565b60006020820190508181036000830152614dca81614d8e565b9050919050565b600081905092915050565b60008190508160005260206000209050919050565b60008154614dfe816145bb565b614e088186614dd1565b94506001821660008114614e235760018114614e3457614e67565b60ff19831686528186019350614e67565b614e3d85614ddc565b60005b83811015614e5f57815481890152600182019150602081019050614e40565b838801955050505b50505092915050565b7f6d6564757361732f000000000000000000000000000000000000000000000000600082015250565b6000614ea6600883614dd1565b9150614eb182614e70565b600882019050919050565b6000614ec7826138e6565b614ed18185614dd1565b9350614ee1818560208601613902565b80840191505092915050565b6000614ef98285614df1565b9150614f0482614e99565b9150614f108284614ebc565b91508190509392505050565b7f6d696e6f74617572732f00000000000000000000000000000000000000000000600082015250565b6000614f52600a83614dd1565b9150614f5d82614f1c565b600a82019050919050565b6000614f748285614df1565b9150614f7f82614f45565b9150614f8b8284614ebc565b91508190509392505050565b6000614fa38287614c04565b601482019150614fb38286614c25565b602082019150614fc38285614c25565b602082019150614fd38284614c25565b60208201915081905095945050505050565b7f4137000000000000000000000000000000000000000000000000000000000000600082015250565b600061501b6002836138f1565b915061502682614fe5565b602082019050919050565b6000602082019050818103600083015261504a8161500e565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006150ad6026836138f1565b91506150b882615051565b604082019050919050565b600060208201905081810360008301526150dc816150a0565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006151196020836138f1565b9150615124826150e3565b602082019050919050565b600060208201905081810360008301526151488161510c565b9050919050565b600082825260208201905092915050565b600061516b82614c68565b615175818561514f565b9350615185818560208601613902565b61518e81613935565b840191505092915050565b60006080820190506151ae6000830187613a00565b6151bb6020830186613a00565b6151c86040830185613a96565b81810360608301526151da8184615160565b905095945050505050565b6000815190506151f4816137e1565b92915050565b6000602082840312156152105761520f6137ab565b5b600061521e848285016151e5565b91505092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061525d601783614dd1565b915061526882615227565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006152a9601183614dd1565b91506152b482615273565b601182019050919050565b60006152ca82615250565b91506152d68285614ebc565b91506152e18261529c565b91506152ed8284614ebc565b91508190509392505050565b600061530482613870565b9150600082141561531857615317614451565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006153596020836138f1565b915061536482615323565b602082019050919050565b600060208201905081810360008301526153888161534c565b905091905056fea2646970667358221220005d771958746eba13e8ede2151c0d5f47f182efe3adb559eba23399c0530f1264736f6c634300080b0033
Loading...
Loading
Loading...
Loading
[ 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.