Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
3,000 HUMANS
Holders
1,091
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 HUMANSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HumansToken
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import "./interfaces/IGenesisToken.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; /** * @title HumansToken * */ contract HumansToken is ERC721Enumerable, Ownable { using SignatureChecker for address; using Strings for uint256; /// Avatar Token tokens owners can mint a Humans Token (up to 1.000) IERC721 private avatarToken; /// Genesis Token is needed to mint a Humans Token and it is set in constructor IGenesisToken private genesisToken; /// Token URI string private baseURI; /// Controls if tokens can be burned or not. Default to false bool public canBurn; /// @dev Sets when Robots Owners can mint bool public canMintUsingRobots; /// @dev Sets when can mint using Genesis Token bool public canMintUsingGenesis; /// @dev Sets when priority minting is allowed bool public canPriorityMint; /// Seed used inside random function uint256 private randomSeed; /// @dev address used to sign priority list addresses address private signer; /// @dev mapping of Robots redemptions - robot tokenId -> true/false mapping(uint256 => bool) public robotsRedemptions; /// @dev mapping of Priority address -> quantityRedeemed mapping(address => uint256) public priorityQtyRedeemed; /// Human supply. Genesis token categories from 1 to 10 uint256[11] private humansSupplyRobotsOwners = [ 0, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 ]; /// Human supply. Genesis token categories from 1 to 10 uint256[11] private humansSupply = [0, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200]; event RobotMintExecuted(address _sender, uint256 _tokenId, uint256 _humanTokenId); /** * @dev Initializes the contract by setting a `name` and a `symbol` for the token and `uri`. * It also sets the Admin role and GenesisToken address. */ constructor(address genesisTokenAddress, address avatarTokenAddress) ERC721("HUXLEY Humans", "HUMANS") { genesisToken = IGenesisToken(genesisTokenAddress); avatarToken = IERC721(avatarTokenAddress); } /** * @dev To redeem a Human Token, user needs to have at least one Robot Token * @param _robotTokenId Token Id of a Robot Token */ function redeemAndMintRobot(uint256 _robotTokenId) external { require(canMintUsingRobots, "HT: Mint not allowed"); require(avatarToken.ownerOf(_robotTokenId) == msg.sender, "HT: Not owner"); require(robotsRedemptions[_robotTokenId] == false, "HT: Robot used"); robotsRedemptions[_robotTokenId] = true; uint256 _category = 1; if (_robotTokenId > 100) { uint256 result = _robotTokenId; while (result > 100) { _category++; result = result - 100; } } // mint human token uint256 tokenId = _mintRobot(_category); emit RobotMintExecuted(msg.sender, _robotTokenId, tokenId); } function _mintRobot(uint256 _category) internal returns (uint256 tokenId) { uint256 supplyLeftRobotsOwners = humansSupplyRobotsOwners[_category]; require(supplyLeftRobotsOwners > 0, "HT: No robot supply lefted"); // updates humans supply humansSupplyRobotsOwners[_category] = supplyLeftRobotsOwners - 1; // mint Human Token tokenId = _mintToken(_category); } /** * @dev To redeem a human, user needs to have at least one Genesis Token. * @param _category Genesis token category between 1 and 10. */ function priorityRedeemAndMint( uint256 _category, uint256 _amount, uint256 _quantityAllowed, bytes memory _signature ) external { require(canPriorityMint, "HT: Priority mint not allowed"); uint256 qtyRedeemed = priorityQtyRedeemed[msg.sender] + _amount; require(qtyRedeemed <= _quantityAllowed, "HT: Over qty allowed"); require(hasPriority(_signature, _quantityAllowed), "HT: has no priority"); priorityQtyRedeemed[msg.sender] = qtyRedeemed; _mintGenesis(_category, _amount); } /** * @dev To redeem a human, user needs to have at least one Genesis Token. * @param _category Genesis token category between 1 and 10. */ function redeemAndMintGenesis(uint256 _category, uint256 _amount) external { require(canMintUsingGenesis, "HT: Mint not allowed"); _mintGenesis(_category, _amount); } /** * @dev To redeem a human, user needs to have at least one Genesis Token. * @param _category Genesis token category between 1 and 10. */ function _mintGenesis(uint256 _category, uint256 _amount) internal { require(humansSupply[_category] > 0, "HT: no supply using Genesis"); require(_amount > 0, "HT: Amount is 0"); for (uint256 i = 1; i <= _amount; i++) { uint256 supplyLeft = humansSupply[_category]; if (supplyLeft > 0) { // updates humans supply humansSupply[_category] = supplyLeft - 1; // burn genesis token genesisToken.redeem(msg.sender, _category); // mint human token _mintToken(_category); } } } function _mintToken(uint256 _category) internal returns (uint256 tokenId) { tokenId = getRandomTokenId(_category); super._safeMint(msg.sender, tokenId); } /** * @dev To redeem a human, user needs to have at least one Genesis Token. * @param _category Genesis token category between 1 and 10. */ function privateMint( uint256 _category, uint256 _amount, bool isRobot ) external onlyOwner { for (uint256 i = 1; i <= _amount; i++) { if (isRobot) { _mintRobot(_category); } else { uint256 supplyLeft = humansSupply[_category]; require(supplyLeft > 0, "HT: No supply lefted for private mint."); humansSupply[_category] = supplyLeft - 1; _mintToken(_category); } } } /** * @dev Get a random token id for the specific <b>_category</b>. * If it was already minted, get the next available one. * @param _category Category to mint avatar * @return randomTokenId A random token id */ function getRandomTokenId(uint256 _category) private view returns (uint256 randomTokenId) { uint256 maxValue = 300 * _category; uint256 minValue = maxValue - 299; // first number of the category. if category is 2, it would be 301. unchecked { randomTokenId = uint256( keccak256( abi.encode( keccak256( abi.encodePacked( msg.sender, tx.origin, gasleft(), randomSeed, block.timestamp, block.number, blockhash(block.number), blockhash(block.number - 300) ) ) ) ) ) % 300; // randomTokenId is a number from 0 to 299. // final result is randomTokenId + minValue // if minValue is 301 and randomTokenId is 256, final result is 557 randomTokenId = randomTokenId + minValue; } // Returns the random number found if it wasnt minted already. // If it was already minted, get the next available number. If no number is available, it should fail. if (!_exists(randomTokenId)) { return randomTokenId; } else { // control is 300 tokens per category uint256 control = randomTokenId + 299; // Loop starts at the next token id (randomTokenId + 1). // If it is greater than maxValue, it subtracts 100. for (uint256 i = randomTokenId + 1; i <= control; i++) { uint256 index = i; if (index > maxValue) { index = index - 300; } if (!_exists(index)) { return index; } } revert("HT: No token number"); } } /** * @dev Check if an address has priority to mint Humans Tokens. * @param _signature Signature to check. * @param _quantityAllowed Total amount that can priority mint */ function hasPriority(bytes memory _signature, uint256 _quantityAllowed) internal view returns (bool) { bytes32 result = keccak256(abi.encodePacked(_quantityAllowed, msg.sender)); bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", result)); return signer.isValidSignatureNow(hash, _signature); } /** * @dev Returns all supply lefted * @return supplyLeftCat1 Supply lefted for category 1 * @return supplyLeftCat2 Supply lefted for category 2 * @return supplyLeftCat3 Supply lefted for category 3 * @return supplyLeftCat4 Supply lefted for category 4 * @return supplyLeftCat5 Supply lefted for category 5 * @return supplyLeftCat6 Supply lefted for category 6 * @return supplyLeftCat7 Supply lefted for category 7 * @return supplyLeftCat8 Supply lefted for category 8 * @return supplyLeftCat9 Supply lefted for category 9 * @return supplyLeftCat10 Supply lefted for category 10 */ function getAllSupplyLeftRobotsOwners() external view returns ( uint256 supplyLeftCat1, uint256 supplyLeftCat2, uint256 supplyLeftCat3, uint256 supplyLeftCat4, uint256 supplyLeftCat5, uint256 supplyLeftCat6, uint256 supplyLeftCat7, uint256 supplyLeftCat8, uint256 supplyLeftCat9, uint256 supplyLeftCat10 ) { supplyLeftCat1 = humansSupplyRobotsOwners[1]; supplyLeftCat2 = humansSupplyRobotsOwners[2]; supplyLeftCat3 = humansSupplyRobotsOwners[3]; supplyLeftCat4 = humansSupplyRobotsOwners[4]; supplyLeftCat5 = humansSupplyRobotsOwners[5]; supplyLeftCat6 = humansSupplyRobotsOwners[6]; supplyLeftCat7 = humansSupplyRobotsOwners[7]; supplyLeftCat8 = humansSupplyRobotsOwners[8]; supplyLeftCat9 = humansSupplyRobotsOwners[9]; supplyLeftCat10 = humansSupplyRobotsOwners[10]; } /** * @dev Returns all supply lefted * @return supplyLeftCat1 Supply lefted for category 1 * @return supplyLeftCat2 Supply lefted for category 2 * @return supplyLeftCat3 Supply lefted for category 3 * @return supplyLeftCat4 Supply lefted for category 4 * @return supplyLeftCat5 Supply lefted for category 5 * @return supplyLeftCat6 Supply lefted for category 6 * @return supplyLeftCat7 Supply lefted for category 7 * @return supplyLeftCat8 Supply lefted for category 8 * @return supplyLeftCat9 Supply lefted for category 9 * @return supplyLeftCat10 Supply lefted for category 10 */ function getAllSupplyLeft() external view returns ( uint256 supplyLeftCat1, uint256 supplyLeftCat2, uint256 supplyLeftCat3, uint256 supplyLeftCat4, uint256 supplyLeftCat5, uint256 supplyLeftCat6, uint256 supplyLeftCat7, uint256 supplyLeftCat8, uint256 supplyLeftCat9, uint256 supplyLeftCat10 ) { supplyLeftCat1 = humansSupply[1]; supplyLeftCat2 = humansSupply[2]; supplyLeftCat3 = humansSupply[3]; supplyLeftCat4 = humansSupply[4]; supplyLeftCat5 = humansSupply[5]; supplyLeftCat6 = humansSupply[6]; supplyLeftCat7 = humansSupply[7]; supplyLeftCat8 = humansSupply[8]; supplyLeftCat9 = humansSupply[9]; supplyLeftCat10 = humansSupply[10]; } /// @dev See {IERC721Metadata-tokenURI}. function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require(_exists(_tokenId), "HT: URI query for invalid token"); string memory uri = _baseURI(); return bytes(uri).length > 0 ? string(abi.encodePacked(uri, _tokenId.toString())) : ""; } /// @dev IP Licenses function IPLicensesIncluded() public pure returns (string memory) { return "Personal Use, Commercial Display, Merchandising"; } /// @dev Update random seed function updateSeedValue(uint256 _randomSeed) public onlyOwner { randomSeed = _randomSeed; } /// @dev Sets URI for Avatar Token function setBaseURI(string memory _uri) external onlyOwner { baseURI = _uri; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. */ function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 _tokenId) public virtual { require(canBurn, "HT: not burnable"); //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), _tokenId), "HT: caller is not owner nor approved" ); super._burn(_tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev Updates address of 'signer' * @param _signer New address for 'signer' */ function setSigner(address _signer) external onlyOwner { signer = _signer; } /// @dev Sets if it is allowed to burn tokens. Default is 'false'. Only Minter can call this function. function setCanBurn(bool _canBurn) external onlyOwner { canBurn = _canBurn; } /// @dev Sets if it is allowed to mint using Robots token ids. Default is 'false'. Only Minter can call this function. function setCanMintUsingRobots(bool _canMintUsingRobots) external onlyOwner { canMintUsingRobots = _canMintUsingRobots; } /// @dev Sets if it is allowed to mint using Genesis tokens. Default is 'false'. Only Minter can call this function. function setCanMintUsingGenesis(bool _canMintUsingGenesis) external onlyOwner { canMintUsingGenesis = _canMintUsingGenesis; } function setCanPriorityMint(bool _canPriorityMint) external onlyOwner { canPriorityMint = _canPriorityMint; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface IGenesisToken { function mint( address account, uint256 category, bytes memory data ) external; function mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) external; function burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) external; function redeem(address _account, uint256 _category) external; function privateMintBatch( address _account, uint256 _amountToMint, uint256 _category, bytes memory _data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../Address.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && recovered == signer) { return true; } (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-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. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// 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); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "berlin", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"genesisTokenAddress","type":"address"},{"internalType":"address","name":"avatarTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_humanTokenId","type":"uint256"}],"name":"RobotMintExecuted","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":"IPLicensesIncluded","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"canBurn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canMintUsingGenesis","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canMintUsingRobots","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canPriorityMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllSupplyLeft","outputs":[{"internalType":"uint256","name":"supplyLeftCat1","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat2","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat3","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat4","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat5","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat6","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat7","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat8","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat9","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat10","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllSupplyLeftRobotsOwners","outputs":[{"internalType":"uint256","name":"supplyLeftCat1","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat2","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat3","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat4","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat5","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat6","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat7","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat8","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat9","type":"uint256"},{"internalType":"uint256","name":"supplyLeftCat10","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"priorityQtyRedeemed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_category","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_quantityAllowed","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"priorityRedeemAndMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_category","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"isRobot","type":"bool"}],"name":"privateMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_category","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeemAndMintGenesis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_robotTokenId","type":"uint256"}],"name":"redeemAndMintRobot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"robotsRedemptions","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_canBurn","type":"bool"}],"name":"setCanBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_canMintUsingGenesis","type":"bool"}],"name":"setCanMintUsingGenesis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_canMintUsingRobots","type":"bool"}],"name":"setCanMintUsingRobots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_canPriorityMint","type":"bool"}],"name":"setCanPriorityMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_randomSeed","type":"uint256"}],"name":"updateSeedValue","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052604051806101600160405280600060ff168152602001606460ff168152602001606460ff168152602001606460ff168152602001606460ff168152602001606460ff168152602001606460ff168152602001606460ff168152602001606460ff168152602001606460ff168152602001606460ff16815250601390600b6200008e92919062000365565b50604051806101600160405280600060ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815260200160c860ff16815250601e90600b6200011992919062000365565b503480156200012757600080fd5b5060405162005ae738038062005ae783398181016040528101906200014d919062000476565b6040518060400160405280600d81526020017f4855584c45592048756d616e73000000000000000000000000000000000000008152506040518060400160405280600681526020017f48554d414e5300000000000000000000000000000000000000000000000000008152508160009080519060200190620001d1929190620003af565b508060019080519060200190620001ea929190620003af565b5050506200020d620002016200029760201b60201c565b6200029f60201b60201c565b81600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505062000575565b600033905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b82600b81019282156200039c579160200282015b828111156200039b578251829060ff1690559160200191906001019062000379565b5b509050620003ab919062000440565b5090565b828054620003bd90620004f1565b90600052602060002090601f016020900481019282620003e157600085556200042d565b82601f10620003fc57805160ff19168380011785556200042d565b828001600101855582156200042d579182015b828111156200042c5782518255916020019190600101906200040f565b5b5090506200043c919062000440565b5090565b5b808211156200045b57600081600090555060010162000441565b5090565b60008151905062000470816200055b565b92915050565b6000806040838503121562000490576200048f62000556565b5b6000620004a0858286016200045f565b9250506020620004b3858286016200045f565b9150509250929050565b6000620004ca82620004d1565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200050a57607f821691505b6020821081141562000521576200052062000527565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b6200056681620004bd565b81146200057257600080fd5b50565b61556280620005856000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c8063550e15a41161013b578063928366c7116100b8578063c1eb18401161007c578063c1eb1840146106d5578063c87b56dd146106f3578063e78b838414610723578063e985e9c51461073f578063f2fde38b1461076f57610248565b8063928366c71461063157806395d89b4114610661578063a22cb4651461067f578063b6b733061461069b578063b88d4fde146106b957610248565b806370a08231116100ff57806370a082311461059f578063715018a6146105cf5780638a518e5e146105d95780638cc9e6fc146105f75780638da5cb5b1461061357610248565b8063550e15a4146104f457806355f804b31461051b5780636352211e14610537578063639c7d77146105675780636c19e7831461058357610248565b806326c58e4e116101c95780633189d25d1161018d5780633189d25d14610454578063386c69f21461047057806342842e0e1461048c57806342966c68146104a85780634f6ccce7146104c457610248565b806326c58e4e146103a55780632b8cdcef146103cc5780632d80efd4146103ea5780632f745c59146104065780632fb896761461043657610248565b806314f576141161021057806314f576141461031757806318160ddd146103335780631afbd133146103515780631bc9865e1461036d57806323b872dd1461038957610248565b806301ffc9a71461024d57806303f63b331461027d57806306fdde03146102ad578063081812fc146102cb578063095ea7b3146102fb575b600080fd5b61026760048036038101906102629190613a56565b61078b565b60405161027491906143a0565b60405180910390f35b61029760048036038101906102929190613839565b61079d565b6040516102a4919061480d565b60405180910390f35b6102b56107b5565b6040516102c2919061444b565b60405180910390f35b6102e560048036038101906102e09190613af9565b610847565b6040516102f291906142d9565b60405180910390f35b610315600480360381019061031091906139e9565b61088d565b005b610331600480360381019061032c9190613a29565b6109a5565b005b61033b6109ca565b604051610348919061480d565b60405180910390f35b61036b60048036038101906103669190613a29565b6109d7565b005b61038760048036038101906103829190613af9565b6109fc565b005b6103a3600480360381019061039e91906138d3565b610c85565b005b6103ad610ce5565b6040516103c39a99989796959493929190614828565b60405180910390f35b6103d4610dfa565b6040516103e191906143a0565b60405180910390f35b61040460048036038101906103ff9190613b26565b610e0d565b005b610420600480360381019061041b91906139e9565b610e6a565b60405161042d919061480d565b60405180910390f35b61043e610f0f565b60405161044b919061444b565b60405180910390f35b61046e60048036038101906104699190613b66565b610f2f565b005b61048a60048036038101906104859190613a29565b611002565b005b6104a660048036038101906104a191906138d3565b611027565b005b6104c260048036038101906104bd9190613af9565b611047565b005b6104de60048036038101906104d99190613af9565b6110f2565b6040516104eb919061480d565b60405180910390f35b6104fc611163565b6040516105129a99989796959493929190614828565b60405180910390f35b61053560048036038101906105309190613ab0565b611278565b005b610551600480360381019061054c9190613af9565b61129a565b60405161055e91906142d9565b60405180910390f35b610581600480360381019061057c9190613a29565b61134c565b005b61059d60048036038101906105989190613839565b611371565b005b6105b960048036038101906105b49190613839565b6113bd565b6040516105c6919061480d565b60405180910390f35b6105d7611475565b005b6105e1611489565b6040516105ee91906143a0565b60405180910390f35b610611600480360381019061060c9190613af9565b61149c565b005b61061b6114ae565b60405161062891906142d9565b60405180910390f35b61064b60048036038101906106469190613af9565b6114d8565b60405161065891906143a0565b60405180910390f35b6106696114f8565b604051610676919061444b565b60405180910390f35b610699600480360381019061069491906139a9565b61158a565b005b6106a36115a0565b6040516106b091906143a0565b60405180910390f35b6106d360048036038101906106ce9190613926565b6115b3565b005b6106dd611615565b6040516106ea91906143a0565b60405180910390f35b61070d60048036038101906107089190613af9565b611628565b60405161071a919061444b565b60405180910390f35b61073d60048036038101906107389190613bb9565b6116cf565b005b61075960048036038101906107549190613893565b61184e565b60405161076691906143a0565b60405180910390f35b61078960048036038101906107849190613839565b6118e2565b005b600061079682611966565b9050919050565b60126020528060005260406000206000915090505481565b6060600080546107c490614b7b565b80601f01602080910402602001604051908101604052809291908181526020018280546107f090614b7b565b801561083d5780601f106108125761010080835404028352916020019161083d565b820191906000526020600020905b81548152906001019060200180831161082057829003601f168201915b5050505050905090565b6000610852826119e0565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108988261129a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610909576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109009061472d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610928611a2b565b73ffffffffffffffffffffffffffffffffffffffff161480610957575061095681610951611a2b565b61184e565b5b610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098d9061462d565b60405180910390fd5b6109a08383611a33565b505050565b6109ad611aec565b80600e60016101000a81548160ff02191690831515021790555050565b6000600880549050905090565b6109df611aec565b80600e60036101000a81548160ff02191690831515021790555050565b600e60019054906101000a900460ff16610a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a42906144ad565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610abd919061480d565b60206040518083038186803b158015610ad557600080fd5b505afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d9190613866565b73ffffffffffffffffffffffffffffffffffffffff1614610b63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5a906145ed565b60405180910390fd5b600015156011600083815260200190815260200160002060009054906101000a900460ff16151514610bca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc19061460d565b60405180910390fd5b60016011600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600190506064821115610c385760008290505b6064811115610c36578180610c1f90614bde565b925050606481610c2f9190614a7a565b9050610c0b565b505b6000610c4382611b6a565b90507f54cb0ada18acc76613298c0077a8a82e75798997d7f4a6c8687377a90b1fa02b338483604051610c7893929190614369565b60405180910390a1505050565b610c96610c90611a2b565b82611bff565b610cd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ccc906147ed565b60405180910390fd5b610ce0838383611c94565b505050565b600080600080600080600080600080601e6001600b8110610d0957610d08614d7b565b5b01549950601e6002600b8110610d2257610d21614d7b565b5b01549850601e6003600b8110610d3b57610d3a614d7b565b5b01549750601e6004600b8110610d5457610d53614d7b565b5b01549650601e6005600b8110610d6d57610d6c614d7b565b5b01549550601e6006600b8110610d8657610d85614d7b565b5b01549450601e6007600b8110610d9f57610d9e614d7b565b5b01549350601e6008600b8110610db857610db7614d7b565b5b01549250601e6009600b8110610dd157610dd0614d7b565b5b01549150601e600a600b8110610dea57610de9614d7b565b5b0154905090919293949596979899565b600e60039054906101000a900460ff1681565b600e60029054906101000a900460ff16610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e53906144ad565b60405180910390fd5b610e668282611efb565b5050565b6000610e75836113bd565b8210610eb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ead906144cd565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b60606040518060600160405280602f81526020016154fe602f9139905090565b610f37611aec565b6000600190505b828111610ffc578115610f5a57610f5484611b6a565b50610fe9565b6000601e85600b8110610f7057610f6f614d7b565b5b0154905060008111610fb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fae9061446d565b60405180910390fd5b600181610fc49190614a7a565b601e86600b8110610fd857610fd7614d7b565b5b0181905550610fe6856120a0565b50505b8080610ff490614bde565b915050610f3e565b50505050565b61100a611aec565b80600e60006101000a81548160ff02191690831515021790555050565b611042838383604051806020016040528060008152506115b3565b505050565b600e60009054906101000a900460ff16611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108d906146ed565b60405180910390fd5b6110a76110a1611a2b565b82611bff565b6110e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110dd9061448d565b60405180910390fd5b6110ef816120bc565b50565b60006110fc6109ca565b821061113d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111349061478d565b60405180910390fd5b6008828154811061115157611150614d7b565b5b90600052602060002001549050919050565b60008060008060008060008060008060136001600b811061118757611186614d7b565b5b0154995060136002600b81106111a05761119f614d7b565b5b0154985060136003600b81106111b9576111b8614d7b565b5b0154975060136004600b81106111d2576111d1614d7b565b5b0154965060136005600b81106111eb576111ea614d7b565b5b0154955060136006600b811061120457611203614d7b565b5b0154945060136007600b811061121d5761121c614d7b565b5b0154935060136008600b811061123657611235614d7b565b5b0154925060136009600b811061124f5761124e614d7b565b5b015491506013600a600b811061126857611267614d7b565b5b0154905090919293949596979899565b611280611aec565b80600d9080519060200190611296929190613638565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611343576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133a9061470d565b60405180910390fd5b80915050919050565b611354611aec565b80600e60026101000a81548160ff02191690831515021790555050565b611379611aec565b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561142e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611425906145cd565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61147d611aec565b61148760006121d9565b565b600e60029054906101000a900460ff1681565b6114a4611aec565b80600f8190555050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60116020528060005260406000206000915054906101000a900460ff1681565b60606001805461150790614b7b565b80601f016020809104026020016040519081016040528092919081815260200182805461153390614b7b565b80156115805780601f1061155557610100808354040283529160200191611580565b820191906000526020600020905b81548152906001019060200180831161156357829003601f168201915b5050505050905090565b61159c611595611a2b565b838361229f565b5050565b600e60019054906101000a900460ff1681565b6115c46115be611a2b565b83611bff565b611603576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fa906147ed565b60405180910390fd5b61160f8484848461240c565b50505050565b600e60009054906101000a900460ff1681565b606061163382612468565b611672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116699061476d565b60405180910390fd5b600061167c6124d4565b9050600081511161169c57604051806020016040528060008152506116c7565b806116a684612566565b6040516020016116b7929190614263565b6040516020818303038152906040525b915050919050565b600e60039054906101000a900460ff1661171e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611715906146ad565b60405180910390fd5b600083601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461176b9190614999565b9050828111156117b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a7906146cd565b60405180910390fd5b6117ba82846126c7565b6117f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f09061468d565b60405180910390fd5b80601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118478585611efb565b5050505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6118ea611aec565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561195a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119519061450d565b60405180910390fd5b611963816121d9565b50565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119d957506119d882612777565b5b9050919050565b6119e981612468565b611a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1f9061470d565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611aa68361129a565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611af4611a2b565b73ffffffffffffffffffffffffffffffffffffffff16611b126114ae565b73ffffffffffffffffffffffffffffffffffffffff1614611b68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5f9061466d565b60405180910390fd5b565b600080601383600b8110611b8157611b80614d7b565b5b0154905060008111611bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbf9061474d565b60405180910390fd5b600181611bd59190614a7a565b601384600b8110611be957611be8614d7b565b5b0181905550611bf7836120a0565b915050919050565b600080611c0b8361129a565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611c4d5750611c4c818561184e565b5b80611c8b57508373ffffffffffffffffffffffffffffffffffffffff16611c7384610847565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611cb48261129a565b73ffffffffffffffffffffffffffffffffffffffff1614611d0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d019061452d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d719061458d565b60405180910390fd5b611d85838383612859565b611d90600082611a33565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611de09190614a7a565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e379190614999565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611ef683838361296d565b505050565b6000601e83600b8110611f1157611f10614d7b565b5b015411611f53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4a9061456d565b60405180910390fd5b60008111611f96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8d906147cd565b60405180910390fd5b6000600190505b81811161209b576000601e84600b8110611fba57611fb9614d7b565b5b01549050600081111561208757600181611fd49190614a7a565b601e85600b8110611fe857611fe7614d7b565b5b0181905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e9a695033866040518363ffffffff1660e01b815260040161204a929190614340565b600060405180830381600087803b15801561206457600080fd5b505af1158015612078573d6000803e3d6000fd5b50505050612085846120a0565b505b50808061209390614bde565b915050611f9d565b505050565b60006120ab82612972565b90506120b73382612ae2565b919050565b60006120c78261129a565b90506120d581600084612859565b6120e0600083611a33565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121309190614a7a565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46121d58160008461296d565b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561230e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612305906145ad565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516123ff91906143a0565b60405180910390a3505050565b612417848484611c94565b61242384848484612b00565b612462576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612459906144ed565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6060600d80546124e390614b7b565b80601f016020809104026020016040519081016040528092919081815260200182805461250f90614b7b565b801561255c5780601f106125315761010080835404028352916020019161255c565b820191906000526020600020905b81548152906001019060200180831161253f57829003601f168201915b5050505050905090565b606060008214156125ae576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506126c2565b600082905060005b600082146125e05780806125c990614bde565b915050600a826125d991906149ef565b91506125b6565b60008167ffffffffffffffff8111156125fc576125fb614daa565b5b6040519080825280601f01601f19166020018201604052801561262e5781602001600182028036833780820191505090505b5090505b600085146126bb576001826126479190614a7a565b9150600a856126569190614c5f565b60306126629190614999565b60f81b81838151811061267857612677614d7b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856126b491906149ef565b9450612632565b8093505050505b919050565b60008082336040516020016126dd9291906142ad565b6040516020818303038152906040528051906020012090506000816040516020016127089190614287565b60405160208183030381529060405280519060200120905061276d8186601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612c979092919063ffffffff16565b9250505092915050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061284257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612852575061285182612e7c565b5b9050919050565b612864838383612ee6565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128a7576128a281612eeb565b6128e6565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146128e5576128e48382612f34565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561292957612924816130a1565b612968565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612967576129668282613172565b5b5b505050565b505050565b6000808261012c6129839190614a20565b9050600061012b826129959190614a7a565b905061012c33325a600f544243434061012c4303406040516020016129c19897969594939291906141ba565b604051602081830303815290604052805190602001206040516020016129e791906143bb565b6040516020818303038152906040528051906020012060001c81612a0e57612a0d614cbf565b5b0692508083019250612a1f83612468565b612a2a575050612add565b600061012b84612a3a9190614999565b90506000600185612a4b9190614999565b90505b818111612aa157600081905084811115612a735761012c81612a709190614a7a565b90505b612a7c81612468565b612a8d578095505050505050612add565b508080612a9990614bde565b915050612a4e565b506040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ad4906147ad565b60405180910390fd5b919050565b612afc8282604051806020016040528060008152506131f1565b5050565b6000612b218473ffffffffffffffffffffffffffffffffffffffff1661324c565b15612c8a578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612b4a611a2b565b8786866040518563ffffffff1660e01b8152600401612b6c94939291906142f4565b602060405180830381600087803b158015612b8657600080fd5b505af1925050508015612bb757506040513d601f19601f82011682018060405250810190612bb49190613a83565b60015b612c3a573d8060008114612be7576040519150601f19603f3d011682016040523d82523d6000602084013e612bec565b606091505b50600081511415612c32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c29906144ed565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612c8f565b600190505b949350505050565b6000806000612ca6858561326f565b9150915060006004811115612cbe57612cbd614cee565b5b816004811115612cd157612cd0614cee565b5b148015612d0957508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15612d1957600192505050612e75565b6000808773ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b8888604051602401612d4e9291906143d6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051612db8919061424c565b600060405180830381855afa9150503d8060008114612df3576040519150601f19603f3d011682016040523d82523d6000602084013e612df8565b606091505b5091509150818015612e0b575060208151145b8015612e6e5750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681806020019051810190612e4d9190613a83565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9450505050505b9392505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006001612f41846113bd565b612f4b9190614a7a565b9050600060076000848152602001908152602001600020549050818114613030576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506130b59190614a7a565b90506000600960008481526020019081526020016000205490506000600883815481106130e5576130e4614d7b565b5b90600052602060002001549050806008838154811061310757613106614d7b565b5b90600052602060002001819055508160096000838152602001908152602001600020819055506009600085815260200190815260200160002060009055600880548061315657613155614d4c565b5b6001900381819060005260206000200160009055905550505050565b600061317d836113bd565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b6131fb83836132f2565b6132086000848484612b00565b613247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161323e906144ed565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000806041835114156132b15760008060006020860151925060408601519150606086015160001a90506132a5878285856134cc565b945094505050506132eb565b6040835114156132e25760008060208501519150604085015190506132d78683836135d9565b9350935050506132eb565b60006002915091505b9250929050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613362576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133599061464d565b60405180910390fd5b61336b81612468565b156133ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133a29061454d565b60405180910390fd5b6133b760008383612859565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546134079190614999565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46134c86000838361296d565b5050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156135075760006003915091506135d0565b601b8560ff161415801561351f5750601c8560ff1614155b156135315760006004915091506135d0565b6000600187878787604051600081526020016040526040516135569493929190614406565b6020604051602081039080840390855afa158015613578573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156135c7576000600192509250506135d0565b80600092509250505b94509492505050565b60008060007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b841690506000601b60ff8660001c901c61361c9190614999565b905061362a878288856134cc565b935093505050935093915050565b82805461364490614b7b565b90600052602060002090601f01602090048101928261366657600085556136ad565b82601f1061367f57805160ff19168380011785556136ad565b828001600101855582156136ad579182015b828111156136ac578251825591602001919060010190613691565b5b5090506136ba91906136be565b5090565b5b808211156136d75760008160009055506001016136bf565b5090565b60006136ee6136e9846148e9565b6148c4565b90508281526020810184848401111561370a57613709614dde565b5b613715848285614b39565b509392505050565b600061373061372b8461491a565b6148c4565b90508281526020810184848401111561374c5761374b614dde565b5b613757848285614b39565b509392505050565b60008135905061376e816154a1565b92915050565b600081519050613783816154a1565b92915050565b600081359050613798816154b8565b92915050565b6000813590506137ad816154cf565b92915050565b6000815190506137c2816154cf565b92915050565b600082601f8301126137dd576137dc614dd9565b5b81356137ed8482602086016136db565b91505092915050565b600082601f83011261380b5761380a614dd9565b5b813561381b84826020860161371d565b91505092915050565b600081359050613833816154e6565b92915050565b60006020828403121561384f5761384e614de8565b5b600061385d8482850161375f565b91505092915050565b60006020828403121561387c5761387b614de8565b5b600061388a84828501613774565b91505092915050565b600080604083850312156138aa576138a9614de8565b5b60006138b88582860161375f565b92505060206138c98582860161375f565b9150509250929050565b6000806000606084860312156138ec576138eb614de8565b5b60006138fa8682870161375f565b935050602061390b8682870161375f565b925050604061391c86828701613824565b9150509250925092565b600080600080608085870312156139405761393f614de8565b5b600061394e8782880161375f565b945050602061395f8782880161375f565b935050604061397087828801613824565b925050606085013567ffffffffffffffff81111561399157613990614de3565b5b61399d878288016137c8565b91505092959194509250565b600080604083850312156139c0576139bf614de8565b5b60006139ce8582860161375f565b92505060206139df85828601613789565b9150509250929050565b60008060408385031215613a00576139ff614de8565b5b6000613a0e8582860161375f565b9250506020613a1f85828601613824565b9150509250929050565b600060208284031215613a3f57613a3e614de8565b5b6000613a4d84828501613789565b91505092915050565b600060208284031215613a6c57613a6b614de8565b5b6000613a7a8482850161379e565b91505092915050565b600060208284031215613a9957613a98614de8565b5b6000613aa7848285016137b3565b91505092915050565b600060208284031215613ac657613ac5614de8565b5b600082013567ffffffffffffffff811115613ae457613ae3614de3565b5b613af0848285016137f6565b91505092915050565b600060208284031215613b0f57613b0e614de8565b5b6000613b1d84828501613824565b91505092915050565b60008060408385031215613b3d57613b3c614de8565b5b6000613b4b85828601613824565b9250506020613b5c85828601613824565b9150509250929050565b600080600060608486031215613b7f57613b7e614de8565b5b6000613b8d86828701613824565b9350506020613b9e86828701613824565b9250506040613baf86828701613789565b9150509250925092565b60008060008060808587031215613bd357613bd2614de8565b5b6000613be187828801613824565b9450506020613bf287828801613824565b9350506040613c0387828801613824565b925050606085013567ffffffffffffffff811115613c2457613c23614de3565b5b613c30878288016137c8565b91505092959194509250565b613c4581614aae565b82525050565b613c5c613c5782614aae565b614c27565b82525050565b613c6b81614ac0565b82525050565b613c7a81614acc565b82525050565b613c91613c8c82614acc565b614c39565b82525050565b6000613ca28261494b565b613cac8185614961565b9350613cbc818560208601614b48565b613cc581614ded565b840191505092915050565b6000613cdb8261494b565b613ce58185614972565b9350613cf5818560208601614b48565b80840191505092915050565b6000613d0c82614956565b613d16818561497d565b9350613d26818560208601614b48565b613d2f81614ded565b840191505092915050565b6000613d4582614956565b613d4f818561498e565b9350613d5f818560208601614b48565b80840191505092915050565b6000613d7860268361497d565b9150613d8382614e0b565b604082019050919050565b6000613d9b60248361497d565b9150613da682614e5a565b604082019050919050565b6000613dbe60148361497d565b9150613dc982614ea9565b602082019050919050565b6000613de1601c8361498e565b9150613dec82614ed2565b601c82019050919050565b6000613e04602b8361497d565b9150613e0f82614efb565b604082019050919050565b6000613e2760328361497d565b9150613e3282614f4a565b604082019050919050565b6000613e4a60268361497d565b9150613e5582614f99565b604082019050919050565b6000613e6d60258361497d565b9150613e7882614fe8565b604082019050919050565b6000613e90601c8361497d565b9150613e9b82615037565b602082019050919050565b6000613eb3601b8361497d565b9150613ebe82615060565b602082019050919050565b6000613ed660248361497d565b9150613ee182615089565b604082019050919050565b6000613ef960198361497d565b9150613f04826150d8565b602082019050919050565b6000613f1c60298361497d565b9150613f2782615101565b604082019050919050565b6000613f3f600d8361497d565b9150613f4a82615150565b602082019050919050565b6000613f62600e8361497d565b9150613f6d82615179565b602082019050919050565b6000613f85603e8361497d565b9150613f90826151a2565b604082019050919050565b6000613fa860208361497d565b9150613fb3826151f1565b602082019050919050565b6000613fcb60208361497d565b9150613fd68261521a565b602082019050919050565b6000613fee60138361497d565b9150613ff982615243565b602082019050919050565b6000614011601d8361497d565b915061401c8261526c565b602082019050919050565b600061403460148361497d565b915061403f82615295565b602082019050919050565b600061405760108361497d565b9150614062826152be565b602082019050919050565b600061407a60188361497d565b9150614085826152e7565b602082019050919050565b600061409d60218361497d565b91506140a882615310565b604082019050919050565b60006140c0601a8361497d565b91506140cb8261535f565b602082019050919050565b60006140e3601f8361497d565b91506140ee82615388565b602082019050919050565b6000614106602c8361497d565b9150614111826153b1565b604082019050919050565b600061412960138361497d565b915061413482615400565b602082019050919050565b600061414c600f8361497d565b915061415782615429565b602082019050919050565b600061416f602e8361497d565b915061417a82615452565b604082019050919050565b61418e81614b22565b82525050565b6141a56141a082614b22565b614c55565b82525050565b6141b481614b2c565b82525050565b60006141c6828b613c4b565b6014820191506141d6828a613c4b565b6014820191506141e68289614194565b6020820191506141f68288614194565b6020820191506142068287614194565b6020820191506142168286614194565b6020820191506142268285613c80565b6020820191506142368284613c80565b6020820191508190509998505050505050505050565b60006142588284613cd0565b915081905092915050565b600061426f8285613d3a565b915061427b8284613d3a565b91508190509392505050565b600061429282613dd4565b915061429e8284613c80565b60208201915081905092915050565b60006142b98285614194565b6020820191506142c98284613c4b565b6014820191508190509392505050565b60006020820190506142ee6000830184613c3c565b92915050565b60006080820190506143096000830187613c3c565b6143166020830186613c3c565b6143236040830185614185565b81810360608301526143358184613c97565b905095945050505050565b60006040820190506143556000830185613c3c565b6143626020830184614185565b9392505050565b600060608201905061437e6000830186613c3c565b61438b6020830185614185565b6143986040830184614185565b949350505050565b60006020820190506143b56000830184613c62565b92915050565b60006020820190506143d06000830184613c71565b92915050565b60006040820190506143eb6000830185613c71565b81810360208301526143fd8184613c97565b90509392505050565b600060808201905061441b6000830187613c71565b61442860208301866141ab565b6144356040830185613c71565b6144426060830184613c71565b95945050505050565b600060208201905081810360008301526144658184613d01565b905092915050565b6000602082019050818103600083015261448681613d6b565b9050919050565b600060208201905081810360008301526144a681613d8e565b9050919050565b600060208201905081810360008301526144c681613db1565b9050919050565b600060208201905081810360008301526144e681613df7565b9050919050565b6000602082019050818103600083015261450681613e1a565b9050919050565b6000602082019050818103600083015261452681613e3d565b9050919050565b6000602082019050818103600083015261454681613e60565b9050919050565b6000602082019050818103600083015261456681613e83565b9050919050565b6000602082019050818103600083015261458681613ea6565b9050919050565b600060208201905081810360008301526145a681613ec9565b9050919050565b600060208201905081810360008301526145c681613eec565b9050919050565b600060208201905081810360008301526145e681613f0f565b9050919050565b6000602082019050818103600083015261460681613f32565b9050919050565b6000602082019050818103600083015261462681613f55565b9050919050565b6000602082019050818103600083015261464681613f78565b9050919050565b6000602082019050818103600083015261466681613f9b565b9050919050565b6000602082019050818103600083015261468681613fbe565b9050919050565b600060208201905081810360008301526146a681613fe1565b9050919050565b600060208201905081810360008301526146c681614004565b9050919050565b600060208201905081810360008301526146e681614027565b9050919050565b600060208201905081810360008301526147068161404a565b9050919050565b600060208201905081810360008301526147268161406d565b9050919050565b6000602082019050818103600083015261474681614090565b9050919050565b60006020820190508181036000830152614766816140b3565b9050919050565b60006020820190508181036000830152614786816140d6565b9050919050565b600060208201905081810360008301526147a6816140f9565b9050919050565b600060208201905081810360008301526147c68161411c565b9050919050565b600060208201905081810360008301526147e68161413f565b9050919050565b6000602082019050818103600083015261480681614162565b9050919050565b60006020820190506148226000830184614185565b92915050565b60006101408201905061483e600083018d614185565b61484b602083018c614185565b614858604083018b614185565b614865606083018a614185565b6148726080830189614185565b61487f60a0830188614185565b61488c60c0830187614185565b61489960e0830186614185565b6148a7610100830185614185565b6148b5610120830184614185565b9b9a5050505050505050505050565b60006148ce6148df565b90506148da8282614bad565b919050565b6000604051905090565b600067ffffffffffffffff82111561490457614903614daa565b5b61490d82614ded565b9050602081019050919050565b600067ffffffffffffffff82111561493557614934614daa565b5b61493e82614ded565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006149a482614b22565b91506149af83614b22565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156149e4576149e3614c90565b5b828201905092915050565b60006149fa82614b22565b9150614a0583614b22565b925082614a1557614a14614cbf565b5b828204905092915050565b6000614a2b82614b22565b9150614a3683614b22565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614a6f57614a6e614c90565b5b828202905092915050565b6000614a8582614b22565b9150614a9083614b22565b925082821015614aa357614aa2614c90565b5b828203905092915050565b6000614ab982614b02565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015614b66578082015181840152602081019050614b4b565b83811115614b75576000848401525b50505050565b60006002820490506001821680614b9357607f821691505b60208210811415614ba757614ba6614d1d565b5b50919050565b614bb682614ded565b810181811067ffffffffffffffff82111715614bd557614bd4614daa565b5b80604052505050565b6000614be982614b22565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614c1c57614c1b614c90565b5b600182019050919050565b6000614c3282614c43565b9050919050565b6000819050919050565b6000614c4e82614dfe565b9050919050565b6000819050919050565b6000614c6a82614b22565b9150614c7583614b22565b925082614c8557614c84614cbf565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f48543a204e6f20737570706c79206c656674656420666f72207072697661746560008201527f206d696e742e0000000000000000000000000000000000000000000000000000602082015250565b7f48543a2063616c6c6572206973206e6f74206f776e6572206e6f72206170707260008201527f6f76656400000000000000000000000000000000000000000000000000000000602082015250565b7f48543a204d696e74206e6f7420616c6c6f776564000000000000000000000000600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f48543a206e6f20737570706c79207573696e672047656e657369730000000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b7f48543a204e6f74206f776e657200000000000000000000000000000000000000600082015250565b7f48543a20526f626f742075736564000000000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f48543a20686173206e6f207072696f7269747900000000000000000000000000600082015250565b7f48543a205072696f72697479206d696e74206e6f7420616c6c6f776564000000600082015250565b7f48543a204f7665722071747920616c6c6f776564000000000000000000000000600082015250565b7f48543a206e6f74206275726e61626c6500000000000000000000000000000000600082015250565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f48543a204e6f20726f626f7420737570706c79206c6566746564000000000000600082015250565b7f48543a2055524920717565727920666f7220696e76616c696420746f6b656e00600082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f48543a204e6f20746f6b656e206e756d62657200000000000000000000000000600082015250565b7f48543a20416d6f756e7420697320300000000000000000000000000000000000600082015250565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b6154aa81614aae565b81146154b557600080fd5b50565b6154c181614ac0565b81146154cc57600080fd5b50565b6154d881614ad6565b81146154e357600080fd5b50565b6154ef81614b22565b81146154fa57600080fd5b5056fe506572736f6e616c205573652c20436f6d6d65726369616c20446973706c61792c204d65726368616e646973696e67a2646970667358221220286f682c460fcc96537bdcb6afcfa4452a0e85687083b931a2f34fdc9144297b64736f6c6343000806003300000000000000000000000038221a026370360d8c0767c232f39f72f8f3ffde000000000000000000000000beb1d3357cd525947b16a9f7a2b3d50b50b977bd
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102485760003560e01c8063550e15a41161013b578063928366c7116100b8578063c1eb18401161007c578063c1eb1840146106d5578063c87b56dd146106f3578063e78b838414610723578063e985e9c51461073f578063f2fde38b1461076f57610248565b8063928366c71461063157806395d89b4114610661578063a22cb4651461067f578063b6b733061461069b578063b88d4fde146106b957610248565b806370a08231116100ff57806370a082311461059f578063715018a6146105cf5780638a518e5e146105d95780638cc9e6fc146105f75780638da5cb5b1461061357610248565b8063550e15a4146104f457806355f804b31461051b5780636352211e14610537578063639c7d77146105675780636c19e7831461058357610248565b806326c58e4e116101c95780633189d25d1161018d5780633189d25d14610454578063386c69f21461047057806342842e0e1461048c57806342966c68146104a85780634f6ccce7146104c457610248565b806326c58e4e146103a55780632b8cdcef146103cc5780632d80efd4146103ea5780632f745c59146104065780632fb896761461043657610248565b806314f576141161021057806314f576141461031757806318160ddd146103335780631afbd133146103515780631bc9865e1461036d57806323b872dd1461038957610248565b806301ffc9a71461024d57806303f63b331461027d57806306fdde03146102ad578063081812fc146102cb578063095ea7b3146102fb575b600080fd5b61026760048036038101906102629190613a56565b61078b565b60405161027491906143a0565b60405180910390f35b61029760048036038101906102929190613839565b61079d565b6040516102a4919061480d565b60405180910390f35b6102b56107b5565b6040516102c2919061444b565b60405180910390f35b6102e560048036038101906102e09190613af9565b610847565b6040516102f291906142d9565b60405180910390f35b610315600480360381019061031091906139e9565b61088d565b005b610331600480360381019061032c9190613a29565b6109a5565b005b61033b6109ca565b604051610348919061480d565b60405180910390f35b61036b60048036038101906103669190613a29565b6109d7565b005b61038760048036038101906103829190613af9565b6109fc565b005b6103a3600480360381019061039e91906138d3565b610c85565b005b6103ad610ce5565b6040516103c39a99989796959493929190614828565b60405180910390f35b6103d4610dfa565b6040516103e191906143a0565b60405180910390f35b61040460048036038101906103ff9190613b26565b610e0d565b005b610420600480360381019061041b91906139e9565b610e6a565b60405161042d919061480d565b60405180910390f35b61043e610f0f565b60405161044b919061444b565b60405180910390f35b61046e60048036038101906104699190613b66565b610f2f565b005b61048a60048036038101906104859190613a29565b611002565b005b6104a660048036038101906104a191906138d3565b611027565b005b6104c260048036038101906104bd9190613af9565b611047565b005b6104de60048036038101906104d99190613af9565b6110f2565b6040516104eb919061480d565b60405180910390f35b6104fc611163565b6040516105129a99989796959493929190614828565b60405180910390f35b61053560048036038101906105309190613ab0565b611278565b005b610551600480360381019061054c9190613af9565b61129a565b60405161055e91906142d9565b60405180910390f35b610581600480360381019061057c9190613a29565b61134c565b005b61059d60048036038101906105989190613839565b611371565b005b6105b960048036038101906105b49190613839565b6113bd565b6040516105c6919061480d565b60405180910390f35b6105d7611475565b005b6105e1611489565b6040516105ee91906143a0565b60405180910390f35b610611600480360381019061060c9190613af9565b61149c565b005b61061b6114ae565b60405161062891906142d9565b60405180910390f35b61064b60048036038101906106469190613af9565b6114d8565b60405161065891906143a0565b60405180910390f35b6106696114f8565b604051610676919061444b565b60405180910390f35b610699600480360381019061069491906139a9565b61158a565b005b6106a36115a0565b6040516106b091906143a0565b60405180910390f35b6106d360048036038101906106ce9190613926565b6115b3565b005b6106dd611615565b6040516106ea91906143a0565b60405180910390f35b61070d60048036038101906107089190613af9565b611628565b60405161071a919061444b565b60405180910390f35b61073d60048036038101906107389190613bb9565b6116cf565b005b61075960048036038101906107549190613893565b61184e565b60405161076691906143a0565b60405180910390f35b61078960048036038101906107849190613839565b6118e2565b005b600061079682611966565b9050919050565b60126020528060005260406000206000915090505481565b6060600080546107c490614b7b565b80601f01602080910402602001604051908101604052809291908181526020018280546107f090614b7b565b801561083d5780601f106108125761010080835404028352916020019161083d565b820191906000526020600020905b81548152906001019060200180831161082057829003601f168201915b5050505050905090565b6000610852826119e0565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006108988261129a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610909576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109009061472d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610928611a2b565b73ffffffffffffffffffffffffffffffffffffffff161480610957575061095681610951611a2b565b61184e565b5b610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098d9061462d565b60405180910390fd5b6109a08383611a33565b505050565b6109ad611aec565b80600e60016101000a81548160ff02191690831515021790555050565b6000600880549050905090565b6109df611aec565b80600e60036101000a81548160ff02191690831515021790555050565b600e60019054906101000a900460ff16610a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a42906144ad565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610abd919061480d565b60206040518083038186803b158015610ad557600080fd5b505afa158015610ae9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0d9190613866565b73ffffffffffffffffffffffffffffffffffffffff1614610b63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5a906145ed565b60405180910390fd5b600015156011600083815260200190815260200160002060009054906101000a900460ff16151514610bca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc19061460d565b60405180910390fd5b60016011600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600190506064821115610c385760008290505b6064811115610c36578180610c1f90614bde565b925050606481610c2f9190614a7a565b9050610c0b565b505b6000610c4382611b6a565b90507f54cb0ada18acc76613298c0077a8a82e75798997d7f4a6c8687377a90b1fa02b338483604051610c7893929190614369565b60405180910390a1505050565b610c96610c90611a2b565b82611bff565b610cd5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ccc906147ed565b60405180910390fd5b610ce0838383611c94565b505050565b600080600080600080600080600080601e6001600b8110610d0957610d08614d7b565b5b01549950601e6002600b8110610d2257610d21614d7b565b5b01549850601e6003600b8110610d3b57610d3a614d7b565b5b01549750601e6004600b8110610d5457610d53614d7b565b5b01549650601e6005600b8110610d6d57610d6c614d7b565b5b01549550601e6006600b8110610d8657610d85614d7b565b5b01549450601e6007600b8110610d9f57610d9e614d7b565b5b01549350601e6008600b8110610db857610db7614d7b565b5b01549250601e6009600b8110610dd157610dd0614d7b565b5b01549150601e600a600b8110610dea57610de9614d7b565b5b0154905090919293949596979899565b600e60039054906101000a900460ff1681565b600e60029054906101000a900460ff16610e5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e53906144ad565b60405180910390fd5b610e668282611efb565b5050565b6000610e75836113bd565b8210610eb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ead906144cd565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b60606040518060600160405280602f81526020016154fe602f9139905090565b610f37611aec565b6000600190505b828111610ffc578115610f5a57610f5484611b6a565b50610fe9565b6000601e85600b8110610f7057610f6f614d7b565b5b0154905060008111610fb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fae9061446d565b60405180910390fd5b600181610fc49190614a7a565b601e86600b8110610fd857610fd7614d7b565b5b0181905550610fe6856120a0565b50505b8080610ff490614bde565b915050610f3e565b50505050565b61100a611aec565b80600e60006101000a81548160ff02191690831515021790555050565b611042838383604051806020016040528060008152506115b3565b505050565b600e60009054906101000a900460ff16611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108d906146ed565b60405180910390fd5b6110a76110a1611a2b565b82611bff565b6110e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110dd9061448d565b60405180910390fd5b6110ef816120bc565b50565b60006110fc6109ca565b821061113d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111349061478d565b60405180910390fd5b6008828154811061115157611150614d7b565b5b90600052602060002001549050919050565b60008060008060008060008060008060136001600b811061118757611186614d7b565b5b0154995060136002600b81106111a05761119f614d7b565b5b0154985060136003600b81106111b9576111b8614d7b565b5b0154975060136004600b81106111d2576111d1614d7b565b5b0154965060136005600b81106111eb576111ea614d7b565b5b0154955060136006600b811061120457611203614d7b565b5b0154945060136007600b811061121d5761121c614d7b565b5b0154935060136008600b811061123657611235614d7b565b5b0154925060136009600b811061124f5761124e614d7b565b5b015491506013600a600b811061126857611267614d7b565b5b0154905090919293949596979899565b611280611aec565b80600d9080519060200190611296929190613638565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611343576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133a9061470d565b60405180910390fd5b80915050919050565b611354611aec565b80600e60026101000a81548160ff02191690831515021790555050565b611379611aec565b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561142e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611425906145cd565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61147d611aec565b61148760006121d9565b565b600e60029054906101000a900460ff1681565b6114a4611aec565b80600f8190555050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60116020528060005260406000206000915054906101000a900460ff1681565b60606001805461150790614b7b565b80601f016020809104026020016040519081016040528092919081815260200182805461153390614b7b565b80156115805780601f1061155557610100808354040283529160200191611580565b820191906000526020600020905b81548152906001019060200180831161156357829003601f168201915b5050505050905090565b61159c611595611a2b565b838361229f565b5050565b600e60019054906101000a900460ff1681565b6115c46115be611a2b565b83611bff565b611603576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fa906147ed565b60405180910390fd5b61160f8484848461240c565b50505050565b600e60009054906101000a900460ff1681565b606061163382612468565b611672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116699061476d565b60405180910390fd5b600061167c6124d4565b9050600081511161169c57604051806020016040528060008152506116c7565b806116a684612566565b6040516020016116b7929190614263565b6040516020818303038152906040525b915050919050565b600e60039054906101000a900460ff1661171e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611715906146ad565b60405180910390fd5b600083601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461176b9190614999565b9050828111156117b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a7906146cd565b60405180910390fd5b6117ba82846126c7565b6117f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f09061468d565b60405180910390fd5b80601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118478585611efb565b5050505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6118ea611aec565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561195a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119519061450d565b60405180910390fd5b611963816121d9565b50565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119d957506119d882612777565b5b9050919050565b6119e981612468565b611a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1f9061470d565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611aa68361129a565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611af4611a2b565b73ffffffffffffffffffffffffffffffffffffffff16611b126114ae565b73ffffffffffffffffffffffffffffffffffffffff1614611b68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5f9061466d565b60405180910390fd5b565b600080601383600b8110611b8157611b80614d7b565b5b0154905060008111611bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbf9061474d565b60405180910390fd5b600181611bd59190614a7a565b601384600b8110611be957611be8614d7b565b5b0181905550611bf7836120a0565b915050919050565b600080611c0b8361129a565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611c4d5750611c4c818561184e565b5b80611c8b57508373ffffffffffffffffffffffffffffffffffffffff16611c7384610847565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611cb48261129a565b73ffffffffffffffffffffffffffffffffffffffff1614611d0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d019061452d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d719061458d565b60405180910390fd5b611d85838383612859565b611d90600082611a33565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611de09190614a7a565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611e379190614999565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611ef683838361296d565b505050565b6000601e83600b8110611f1157611f10614d7b565b5b015411611f53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4a9061456d565b60405180910390fd5b60008111611f96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8d906147cd565b60405180910390fd5b6000600190505b81811161209b576000601e84600b8110611fba57611fb9614d7b565b5b01549050600081111561208757600181611fd49190614a7a565b601e85600b8110611fe857611fe7614d7b565b5b0181905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e9a695033866040518363ffffffff1660e01b815260040161204a929190614340565b600060405180830381600087803b15801561206457600080fd5b505af1158015612078573d6000803e3d6000fd5b50505050612085846120a0565b505b50808061209390614bde565b915050611f9d565b505050565b60006120ab82612972565b90506120b73382612ae2565b919050565b60006120c78261129a565b90506120d581600084612859565b6120e0600083611a33565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121309190614a7a565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46121d58160008461296d565b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561230e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612305906145ad565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516123ff91906143a0565b60405180910390a3505050565b612417848484611c94565b61242384848484612b00565b612462576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612459906144ed565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6060600d80546124e390614b7b565b80601f016020809104026020016040519081016040528092919081815260200182805461250f90614b7b565b801561255c5780601f106125315761010080835404028352916020019161255c565b820191906000526020600020905b81548152906001019060200180831161253f57829003601f168201915b5050505050905090565b606060008214156125ae576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506126c2565b600082905060005b600082146125e05780806125c990614bde565b915050600a826125d991906149ef565b91506125b6565b60008167ffffffffffffffff8111156125fc576125fb614daa565b5b6040519080825280601f01601f19166020018201604052801561262e5781602001600182028036833780820191505090505b5090505b600085146126bb576001826126479190614a7a565b9150600a856126569190614c5f565b60306126629190614999565b60f81b81838151811061267857612677614d7b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856126b491906149ef565b9450612632565b8093505050505b919050565b60008082336040516020016126dd9291906142ad565b6040516020818303038152906040528051906020012090506000816040516020016127089190614287565b60405160208183030381529060405280519060200120905061276d8186601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612c979092919063ffffffff16565b9250505092915050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061284257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612852575061285182612e7c565b5b9050919050565b612864838383612ee6565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128a7576128a281612eeb565b6128e6565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146128e5576128e48382612f34565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561292957612924816130a1565b612968565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612967576129668282613172565b5b5b505050565b505050565b6000808261012c6129839190614a20565b9050600061012b826129959190614a7a565b905061012c33325a600f544243434061012c4303406040516020016129c19897969594939291906141ba565b604051602081830303815290604052805190602001206040516020016129e791906143bb565b6040516020818303038152906040528051906020012060001c81612a0e57612a0d614cbf565b5b0692508083019250612a1f83612468565b612a2a575050612add565b600061012b84612a3a9190614999565b90506000600185612a4b9190614999565b90505b818111612aa157600081905084811115612a735761012c81612a709190614a7a565b90505b612a7c81612468565b612a8d578095505050505050612add565b508080612a9990614bde565b915050612a4e565b506040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ad4906147ad565b60405180910390fd5b919050565b612afc8282604051806020016040528060008152506131f1565b5050565b6000612b218473ffffffffffffffffffffffffffffffffffffffff1661324c565b15612c8a578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612b4a611a2b565b8786866040518563ffffffff1660e01b8152600401612b6c94939291906142f4565b602060405180830381600087803b158015612b8657600080fd5b505af1925050508015612bb757506040513d601f19601f82011682018060405250810190612bb49190613a83565b60015b612c3a573d8060008114612be7576040519150601f19603f3d011682016040523d82523d6000602084013e612bec565b606091505b50600081511415612c32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c29906144ed565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612c8f565b600190505b949350505050565b6000806000612ca6858561326f565b9150915060006004811115612cbe57612cbd614cee565b5b816004811115612cd157612cd0614cee565b5b148015612d0957508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15612d1957600192505050612e75565b6000808773ffffffffffffffffffffffffffffffffffffffff16631626ba7e60e01b8888604051602401612d4e9291906143d6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051612db8919061424c565b600060405180830381855afa9150503d8060008114612df3576040519150601f19603f3d011682016040523d82523d6000602084013e612df8565b606091505b5091509150818015612e0b575060208151145b8015612e6e5750631626ba7e60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681806020019051810190612e4d9190613a83565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9450505050505b9392505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006001612f41846113bd565b612f4b9190614a7a565b9050600060076000848152602001908152602001600020549050818114613030576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506130b59190614a7a565b90506000600960008481526020019081526020016000205490506000600883815481106130e5576130e4614d7b565b5b90600052602060002001549050806008838154811061310757613106614d7b565b5b90600052602060002001819055508160096000838152602001908152602001600020819055506009600085815260200190815260200160002060009055600880548061315657613155614d4c565b5b6001900381819060005260206000200160009055905550505050565b600061317d836113bd565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b6131fb83836132f2565b6132086000848484612b00565b613247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161323e906144ed565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000806041835114156132b15760008060006020860151925060408601519150606086015160001a90506132a5878285856134cc565b945094505050506132eb565b6040835114156132e25760008060208501519150604085015190506132d78683836135d9565b9350935050506132eb565b60006002915091505b9250929050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613362576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133599061464d565b60405180910390fd5b61336b81612468565b156133ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133a29061454d565b60405180910390fd5b6133b760008383612859565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546134079190614999565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46134c86000838361296d565b5050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156135075760006003915091506135d0565b601b8560ff161415801561351f5750601c8560ff1614155b156135315760006004915091506135d0565b6000600187878787604051600081526020016040526040516135569493929190614406565b6020604051602081039080840390855afa158015613578573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156135c7576000600192509250506135d0565b80600092509250505b94509492505050565b60008060007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b841690506000601b60ff8660001c901c61361c9190614999565b905061362a878288856134cc565b935093505050935093915050565b82805461364490614b7b565b90600052602060002090601f01602090048101928261366657600085556136ad565b82601f1061367f57805160ff19168380011785556136ad565b828001600101855582156136ad579182015b828111156136ac578251825591602001919060010190613691565b5b5090506136ba91906136be565b5090565b5b808211156136d75760008160009055506001016136bf565b5090565b60006136ee6136e9846148e9565b6148c4565b90508281526020810184848401111561370a57613709614dde565b5b613715848285614b39565b509392505050565b600061373061372b8461491a565b6148c4565b90508281526020810184848401111561374c5761374b614dde565b5b613757848285614b39565b509392505050565b60008135905061376e816154a1565b92915050565b600081519050613783816154a1565b92915050565b600081359050613798816154b8565b92915050565b6000813590506137ad816154cf565b92915050565b6000815190506137c2816154cf565b92915050565b600082601f8301126137dd576137dc614dd9565b5b81356137ed8482602086016136db565b91505092915050565b600082601f83011261380b5761380a614dd9565b5b813561381b84826020860161371d565b91505092915050565b600081359050613833816154e6565b92915050565b60006020828403121561384f5761384e614de8565b5b600061385d8482850161375f565b91505092915050565b60006020828403121561387c5761387b614de8565b5b600061388a84828501613774565b91505092915050565b600080604083850312156138aa576138a9614de8565b5b60006138b88582860161375f565b92505060206138c98582860161375f565b9150509250929050565b6000806000606084860312156138ec576138eb614de8565b5b60006138fa8682870161375f565b935050602061390b8682870161375f565b925050604061391c86828701613824565b9150509250925092565b600080600080608085870312156139405761393f614de8565b5b600061394e8782880161375f565b945050602061395f8782880161375f565b935050604061397087828801613824565b925050606085013567ffffffffffffffff81111561399157613990614de3565b5b61399d878288016137c8565b91505092959194509250565b600080604083850312156139c0576139bf614de8565b5b60006139ce8582860161375f565b92505060206139df85828601613789565b9150509250929050565b60008060408385031215613a00576139ff614de8565b5b6000613a0e8582860161375f565b9250506020613a1f85828601613824565b9150509250929050565b600060208284031215613a3f57613a3e614de8565b5b6000613a4d84828501613789565b91505092915050565b600060208284031215613a6c57613a6b614de8565b5b6000613a7a8482850161379e565b91505092915050565b600060208284031215613a9957613a98614de8565b5b6000613aa7848285016137b3565b91505092915050565b600060208284031215613ac657613ac5614de8565b5b600082013567ffffffffffffffff811115613ae457613ae3614de3565b5b613af0848285016137f6565b91505092915050565b600060208284031215613b0f57613b0e614de8565b5b6000613b1d84828501613824565b91505092915050565b60008060408385031215613b3d57613b3c614de8565b5b6000613b4b85828601613824565b9250506020613b5c85828601613824565b9150509250929050565b600080600060608486031215613b7f57613b7e614de8565b5b6000613b8d86828701613824565b9350506020613b9e86828701613824565b9250506040613baf86828701613789565b9150509250925092565b60008060008060808587031215613bd357613bd2614de8565b5b6000613be187828801613824565b9450506020613bf287828801613824565b9350506040613c0387828801613824565b925050606085013567ffffffffffffffff811115613c2457613c23614de3565b5b613c30878288016137c8565b91505092959194509250565b613c4581614aae565b82525050565b613c5c613c5782614aae565b614c27565b82525050565b613c6b81614ac0565b82525050565b613c7a81614acc565b82525050565b613c91613c8c82614acc565b614c39565b82525050565b6000613ca28261494b565b613cac8185614961565b9350613cbc818560208601614b48565b613cc581614ded565b840191505092915050565b6000613cdb8261494b565b613ce58185614972565b9350613cf5818560208601614b48565b80840191505092915050565b6000613d0c82614956565b613d16818561497d565b9350613d26818560208601614b48565b613d2f81614ded565b840191505092915050565b6000613d4582614956565b613d4f818561498e565b9350613d5f818560208601614b48565b80840191505092915050565b6000613d7860268361497d565b9150613d8382614e0b565b604082019050919050565b6000613d9b60248361497d565b9150613da682614e5a565b604082019050919050565b6000613dbe60148361497d565b9150613dc982614ea9565b602082019050919050565b6000613de1601c8361498e565b9150613dec82614ed2565b601c82019050919050565b6000613e04602b8361497d565b9150613e0f82614efb565b604082019050919050565b6000613e2760328361497d565b9150613e3282614f4a565b604082019050919050565b6000613e4a60268361497d565b9150613e5582614f99565b604082019050919050565b6000613e6d60258361497d565b9150613e7882614fe8565b604082019050919050565b6000613e90601c8361497d565b9150613e9b82615037565b602082019050919050565b6000613eb3601b8361497d565b9150613ebe82615060565b602082019050919050565b6000613ed660248361497d565b9150613ee182615089565b604082019050919050565b6000613ef960198361497d565b9150613f04826150d8565b602082019050919050565b6000613f1c60298361497d565b9150613f2782615101565b604082019050919050565b6000613f3f600d8361497d565b9150613f4a82615150565b602082019050919050565b6000613f62600e8361497d565b9150613f6d82615179565b602082019050919050565b6000613f85603e8361497d565b9150613f90826151a2565b604082019050919050565b6000613fa860208361497d565b9150613fb3826151f1565b602082019050919050565b6000613fcb60208361497d565b9150613fd68261521a565b602082019050919050565b6000613fee60138361497d565b9150613ff982615243565b602082019050919050565b6000614011601d8361497d565b915061401c8261526c565b602082019050919050565b600061403460148361497d565b915061403f82615295565b602082019050919050565b600061405760108361497d565b9150614062826152be565b602082019050919050565b600061407a60188361497d565b9150614085826152e7565b602082019050919050565b600061409d60218361497d565b91506140a882615310565b604082019050919050565b60006140c0601a8361497d565b91506140cb8261535f565b602082019050919050565b60006140e3601f8361497d565b91506140ee82615388565b602082019050919050565b6000614106602c8361497d565b9150614111826153b1565b604082019050919050565b600061412960138361497d565b915061413482615400565b602082019050919050565b600061414c600f8361497d565b915061415782615429565b602082019050919050565b600061416f602e8361497d565b915061417a82615452565b604082019050919050565b61418e81614b22565b82525050565b6141a56141a082614b22565b614c55565b82525050565b6141b481614b2c565b82525050565b60006141c6828b613c4b565b6014820191506141d6828a613c4b565b6014820191506141e68289614194565b6020820191506141f68288614194565b6020820191506142068287614194565b6020820191506142168286614194565b6020820191506142268285613c80565b6020820191506142368284613c80565b6020820191508190509998505050505050505050565b60006142588284613cd0565b915081905092915050565b600061426f8285613d3a565b915061427b8284613d3a565b91508190509392505050565b600061429282613dd4565b915061429e8284613c80565b60208201915081905092915050565b60006142b98285614194565b6020820191506142c98284613c4b565b6014820191508190509392505050565b60006020820190506142ee6000830184613c3c565b92915050565b60006080820190506143096000830187613c3c565b6143166020830186613c3c565b6143236040830185614185565b81810360608301526143358184613c97565b905095945050505050565b60006040820190506143556000830185613c3c565b6143626020830184614185565b9392505050565b600060608201905061437e6000830186613c3c565b61438b6020830185614185565b6143986040830184614185565b949350505050565b60006020820190506143b56000830184613c62565b92915050565b60006020820190506143d06000830184613c71565b92915050565b60006040820190506143eb6000830185613c71565b81810360208301526143fd8184613c97565b90509392505050565b600060808201905061441b6000830187613c71565b61442860208301866141ab565b6144356040830185613c71565b6144426060830184613c71565b95945050505050565b600060208201905081810360008301526144658184613d01565b905092915050565b6000602082019050818103600083015261448681613d6b565b9050919050565b600060208201905081810360008301526144a681613d8e565b9050919050565b600060208201905081810360008301526144c681613db1565b9050919050565b600060208201905081810360008301526144e681613df7565b9050919050565b6000602082019050818103600083015261450681613e1a565b9050919050565b6000602082019050818103600083015261452681613e3d565b9050919050565b6000602082019050818103600083015261454681613e60565b9050919050565b6000602082019050818103600083015261456681613e83565b9050919050565b6000602082019050818103600083015261458681613ea6565b9050919050565b600060208201905081810360008301526145a681613ec9565b9050919050565b600060208201905081810360008301526145c681613eec565b9050919050565b600060208201905081810360008301526145e681613f0f565b9050919050565b6000602082019050818103600083015261460681613f32565b9050919050565b6000602082019050818103600083015261462681613f55565b9050919050565b6000602082019050818103600083015261464681613f78565b9050919050565b6000602082019050818103600083015261466681613f9b565b9050919050565b6000602082019050818103600083015261468681613fbe565b9050919050565b600060208201905081810360008301526146a681613fe1565b9050919050565b600060208201905081810360008301526146c681614004565b9050919050565b600060208201905081810360008301526146e681614027565b9050919050565b600060208201905081810360008301526147068161404a565b9050919050565b600060208201905081810360008301526147268161406d565b9050919050565b6000602082019050818103600083015261474681614090565b9050919050565b60006020820190508181036000830152614766816140b3565b9050919050565b60006020820190508181036000830152614786816140d6565b9050919050565b600060208201905081810360008301526147a6816140f9565b9050919050565b600060208201905081810360008301526147c68161411c565b9050919050565b600060208201905081810360008301526147e68161413f565b9050919050565b6000602082019050818103600083015261480681614162565b9050919050565b60006020820190506148226000830184614185565b92915050565b60006101408201905061483e600083018d614185565b61484b602083018c614185565b614858604083018b614185565b614865606083018a614185565b6148726080830189614185565b61487f60a0830188614185565b61488c60c0830187614185565b61489960e0830186614185565b6148a7610100830185614185565b6148b5610120830184614185565b9b9a5050505050505050505050565b60006148ce6148df565b90506148da8282614bad565b919050565b6000604051905090565b600067ffffffffffffffff82111561490457614903614daa565b5b61490d82614ded565b9050602081019050919050565b600067ffffffffffffffff82111561493557614934614daa565b5b61493e82614ded565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006149a482614b22565b91506149af83614b22565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156149e4576149e3614c90565b5b828201905092915050565b60006149fa82614b22565b9150614a0583614b22565b925082614a1557614a14614cbf565b5b828204905092915050565b6000614a2b82614b22565b9150614a3683614b22565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614a6f57614a6e614c90565b5b828202905092915050565b6000614a8582614b22565b9150614a9083614b22565b925082821015614aa357614aa2614c90565b5b828203905092915050565b6000614ab982614b02565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015614b66578082015181840152602081019050614b4b565b83811115614b75576000848401525b50505050565b60006002820490506001821680614b9357607f821691505b60208210811415614ba757614ba6614d1d565b5b50919050565b614bb682614ded565b810181811067ffffffffffffffff82111715614bd557614bd4614daa565b5b80604052505050565b6000614be982614b22565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614c1c57614c1b614c90565b5b600182019050919050565b6000614c3282614c43565b9050919050565b6000819050919050565b6000614c4e82614dfe565b9050919050565b6000819050919050565b6000614c6a82614b22565b9150614c7583614b22565b925082614c8557614c84614cbf565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f48543a204e6f20737570706c79206c656674656420666f72207072697661746560008201527f206d696e742e0000000000000000000000000000000000000000000000000000602082015250565b7f48543a2063616c6c6572206973206e6f74206f776e6572206e6f72206170707260008201527f6f76656400000000000000000000000000000000000000000000000000000000602082015250565b7f48543a204d696e74206e6f7420616c6c6f776564000000000000000000000000600082015250565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f48543a206e6f20737570706c79207573696e672047656e657369730000000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b7f48543a204e6f74206f776e657200000000000000000000000000000000000000600082015250565b7f48543a20526f626f742075736564000000000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f48543a20686173206e6f207072696f7269747900000000000000000000000000600082015250565b7f48543a205072696f72697479206d696e74206e6f7420616c6c6f776564000000600082015250565b7f48543a204f7665722071747920616c6c6f776564000000000000000000000000600082015250565b7f48543a206e6f74206275726e61626c6500000000000000000000000000000000600082015250565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f48543a204e6f20726f626f7420737570706c79206c6566746564000000000000600082015250565b7f48543a2055524920717565727920666f7220696e76616c696420746f6b656e00600082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f48543a204e6f20746f6b656e206e756d62657200000000000000000000000000600082015250565b7f48543a20416d6f756e7420697320300000000000000000000000000000000000600082015250565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b6154aa81614aae565b81146154b557600080fd5b50565b6154c181614ac0565b81146154cc57600080fd5b50565b6154d881614ad6565b81146154e357600080fd5b50565b6154ef81614b22565b81146154fa57600080fd5b5056fe506572736f6e616c205573652c20436f6d6d65726369616c20446973706c61792c204d65726368616e646973696e67a2646970667358221220286f682c460fcc96537bdcb6afcfa4452a0e85687083b931a2f34fdc9144297b64736f6c63430008060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000038221a026370360d8c0767c232f39f72f8f3ffde000000000000000000000000beb1d3357cd525947b16a9f7a2b3d50b50b977bd
-----Decoded View---------------
Arg [0] : genesisTokenAddress (address): 0x38221A026370360d8C0767C232F39F72F8f3fFde
Arg [1] : avatarTokenAddress (address): 0xbeB1d3357cD525947b16A9f7a2b3d50B50b977BD
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000038221a026370360d8c0767c232f39f72f8f3ffde
Arg [1] : 000000000000000000000000beb1d3357cd525947b16a9f7a2b3d50b50b977bd
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.