Overview
ETH Balance
0.015 ETH
Eth Value
$47.02 (@ $3,134.60/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 51 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 14248058 | 1001 days ago | IN | 0 ETH | 0.00247069 | ||||
Set Approval For... | 13980531 | 1042 days ago | IN | 0 ETH | 0.00625995 | ||||
Mint With N | 13416753 | 1130 days ago | IN | 0.015 ETH | 0.01628932 | ||||
Withdraw Funds | 13416228 | 1130 days ago | IN | 0 ETH | 0.00256448 | ||||
Multi Mint With ... | 13415866 | 1130 days ago | IN | 0.045 ETH | 0.03505867 | ||||
Mint With N | 13413424 | 1131 days ago | IN | 0.015 ETH | 0.01749432 | ||||
Mint With N | 13413414 | 1131 days ago | IN | 0.015 ETH | 0.02137243 | ||||
Mint With N | 13413412 | 1131 days ago | IN | 0.015 ETH | 0.01910615 | ||||
Mint With N | 13413403 | 1131 days ago | IN | 0.015 ETH | 0.0197025 | ||||
Withdraw Funds | 13410239 | 1131 days ago | IN | 0 ETH | 0.00331874 | ||||
Multi Mint With ... | 13408258 | 1132 days ago | IN | 0.15 ETH | 0.09585592 | ||||
Mint With N | 13407938 | 1132 days ago | IN | 0.015 ETH | 0.01000759 | ||||
Withdraw Funds | 13407589 | 1132 days ago | IN | 0 ETH | 0.00305475 | ||||
Mint With N | 13406602 | 1132 days ago | IN | 0.015 ETH | 0.00993698 | ||||
Mint With N | 13406438 | 1132 days ago | IN | 0.015 ETH | 0.00940811 | ||||
Mint With N | 13405908 | 1132 days ago | IN | 0.015 ETH | 0.01836575 | ||||
Mint With N | 13405903 | 1132 days ago | IN | 0.015 ETH | 0.01299862 | ||||
Mint With N | 13405498 | 1132 days ago | IN | 0.015 ETH | 0.01527383 | ||||
Mint With N | 13404926 | 1132 days ago | IN | 0.015 ETH | 0.01033893 | ||||
Mint With N | 13404691 | 1132 days ago | IN | 0.015 ETH | 0.01334467 | ||||
Set Public Sale | 13404394 | 1132 days ago | IN | 0 ETH | 0.00329206 | ||||
Withdraw Funds | 13404241 | 1132 days ago | IN | 0 ETH | 0.00339417 | ||||
Mint With N | 13401992 | 1133 days ago | IN | 0.015 ETH | 0.01140486 | ||||
Mint With N | 13401769 | 1133 days ago | IN | 0.015 ETH | 0.01418724 | ||||
Mint With N | 13399940 | 1133 days ago | IN | 0.015 ETH | 0.01077917 |
Latest 10 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
13416228 | 1130 days ago | 0.03465 ETH | ||||
13416228 | 1130 days ago | 0.07035 ETH | ||||
13410239 | 1131 days ago | 0.05445 ETH | ||||
13410239 | 1131 days ago | 0.11055 ETH | ||||
13407589 | 1132 days ago | 0.03465 ETH | ||||
13407589 | 1132 days ago | 0.07035 ETH | ||||
13404241 | 1132 days ago | 0.0198 ETH | ||||
13404241 | 1132 days ago | 0.0402 ETH | ||||
13398374 | 1133 days ago | 0.14355 ETH | ||||
13398374 | 1133 days ago | 0.29145 ETH |
Loading...
Loading
Contract Name:
DirtyBusiness
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.8.6; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "./core/NPassCore.sol"; import "./interfaces/IN.sol"; /** * @title Dirty Business * @author Written by michaelshimeles; Developed by zhark */ contract DirtyBusiness is NPassCore { string[] private height = [ "6'5", "5'3", "5'4", "5'5", "5'6", "5'7", "5'8", "5'9", "5'10", "5'11", "6'0", "6'1", "6'2", "6'3", "6'4" ]; string[] private firstname = [ "Mike", "Tony", "Tommy", "Al", "Carlo", "Clyde", "Johnny", "Sam", "Chad", "Frank", "Noah", "Pablo", "David", "Joseph", "Malique", "Dimitri", "Yapheth", "Finn", "Joshua", "Abraham", "Moses", "Sheldon", "Lando", "Lincoln", "Malcolm", "Niko", "Omar", "Ravi", "Santiago" ]; string[] private nickname = [ "Lucky", "8ball", "Scarface", "Enzo", "Mully", "Big Smoke", "Sweet", "The Bull", "Bando", "Bumpy", "Sunny", "Merky", "Houdini", "Durk", "Esco", "Dopey", "Drako", "Lil Baby", "Prince", "Blueface", "Benji", "Milli", "Nino", "Herbo", "Swervo", "Ras", "Sosa" ]; string[] private lastname = [ "Montana", "Malone", "Leone", "Woods", "Adonis", "Cipriani", "Santos", "Shelby", "Marino", "Castillo", "Buterin", "Johnson", "Gravano", "Solomon", "Lucas", "Lopez", "Hendrix", "Hunter", "Hayes", "Pierce", "Williams", "Jenkins", "Benjamin", "Petrov", "Soprano", "Brown", "Wayne", "D'Angelo", "Giuliani" ]; string[] private bodybuild = [ "Skinny", "Heavy", "Ample", "Stocky", "Bulky", "Athletic", "Swole", "Scrawny", "Burly", "Gangly", "Muscular", "Chubby", "Slim", "Toned" ]; string[] private specialty = [ "Martial Arts", "Shooting", "Money Management", "Business Expansion", "Networking", "Closer", "Leading", "Hacking", "Negotiation", "Driving", "Money Laundering", "Bootlegging", "Pickpocketing", "Identity Theft", "Bribery", "Carjacker", "Smuggling", "Counterfitting", "Looting (not for adventures)", "Lawyer", "Bookie", "Contraband" ]; string[] private accessories = [ "Designer Watch", "Watch", "Chain", "Grill", "Fedora", "Pocket Watch", "Earrings", "Cufflinks", "Ring", "Tobacco Pipe", "Glasses", "Brass Knuckles", "Gold Ring", "Designer Watch", "Diamond Chain" ]; constructor(address _nContractAddress) NPassCore("DirtyBusiness", "DIRTY", IN(_nContractAddress), false, 8888, 0, 15000000000000000, 30000000000000000) {} function random(string memory input) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))); } function getNSum(uint256 tokenId) internal view returns (uint256) { uint256 total = n.getFirst(tokenId) + n.getSecond(tokenId); total = total + n.getThird(tokenId); total = total + n.getFourth(tokenId); total = total + n.getFifth(tokenId); total = total + n.getSixth(tokenId); total = total + n.getSeventh(tokenId); total = total + n.getEight(tokenId); return total; } // N1 function getName(uint256 tokenId) public view returns (string memory) { // First Name uint256 rand = random(string(abi.encodePacked(toString(getNSum(tokenId)), toString(tokenId)))); string memory first = firstname[rand % firstname.length]; // Nickname rand = random(string(abi.encodePacked(toString(n.getFirst(tokenId)), toString(tokenId)))); string memory nick = nickname[rand % nickname.length]; // Last Name rand = random(string(abi.encodePacked(toString(tokenId)))); string memory last = lastname[rand % lastname.length]; return string(abi.encodePacked(first, ' "', nick, '" ', last)); } // N2 function getHeight(uint256 tokenId) public view returns (string memory) { return height[n.getSecond(tokenId) % height.length]; } // N3 function getBodyBuild(uint256 tokenId) public view returns (string memory) { uint256 rand = random(string(abi.encodePacked(toString(n.getThird(tokenId)), toString(tokenId)))); return bodybuild[rand % bodybuild.length]; } // N4 function getMentalFortitude(uint256 tokenId) public view returns (string memory) { uint256 rand = random(string(abi.encodePacked(toString(n.getFourth(tokenId)), toString(tokenId)))); uint256 fortitude = (rand % 50) + 51; if (fortitude > 94) { return "Mental Fortitude: Very High"; } else { return string(abi.encodePacked("Mental Fortitude: ", toString(fortitude))); } } // N5 function getPersonality(uint256 tokenId) public view returns (string memory) { uint256 rand = random(string(abi.encodePacked(toString(n.getFifth(tokenId)), toString(tokenId)))); uint256 personality = rand % 1000; if (personality < 164) return "ISTJ - The Logistician"; else if (personality < 276) return "ESTJ - The Executive"; else if (personality < 361) return "ISTP - The Virtuoso"; else if (personality < 442) return "ISFJ - The Defender"; else if (personality < 518) return "ISFP - The Adventurer"; else if (personality < 593) return "ESFJ - The Consul"; else if (personality < 662) return "ESFP - The Entertainer"; else if (personality < 726) return "ENFP - The Campaigner"; else if (personality < 782) return "ESTP - The Entrepreneur"; else if (personality < 830) return "INTP - The Logician"; else if (personality < 871) return "INFP - The Mediator"; else if (personality < 911) return "ENTP - The Debater"; else if (personality < 944) return "INTJ - The Architect"; else if (personality < 971) return "ENTJ - The Commander"; else if (personality < 987) return "ENFJ - The Protagonist"; else return "INFJ - The Advocate"; } // N6 function getAimAccuracy(uint256 tokenId) public view returns (string memory) { uint256 rand = random(string(abi.encodePacked(toString(n.getSixth(tokenId)), toString(tokenId)))); uint256 accuracy = (rand % 50) + 51; if (accuracy > 94) { return "Aim Accuracy: Sharpshooter"; } else { return string(abi.encodePacked("Aim Accuracy: ", toString(accuracy))); } } // N7 function getSpecialty(uint256 tokenId) public view returns (string memory) { uint256 rand = random(string(abi.encodePacked(toString(n.getSeventh(tokenId)), toString(tokenId)))); return specialty[rand % specialty.length]; } // N8 function getItem(uint256 tokenId) public view returns (string memory) { return accessories[n.getEight(tokenId) % accessories.length]; } function tokenURI(uint256 tokenId) public view override returns (string memory) { string[17] memory parts; parts[ 0 ] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; } .name {text-decoration: underline;}</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base name">'; parts[1] = getName(tokenId); // N1 parts[2] = '</text><text x="10" y="40" class="base">'; parts[3] = getHeight(tokenId); // N2 parts[4] = '</text><text x="10" y="60" class="base">'; parts[5] = getBodyBuild(tokenId); // N3 parts[6] = '</text><text x="10" y="80" class="base">'; parts[7] = getMentalFortitude(tokenId); // N4 parts[8] = '</text><text x="10" y="100" class="base">'; parts[9] = getPersonality(tokenId); // N5 parts[10] = '</text><text x="10" y="120" class="base">'; parts[11] = getAimAccuracy(tokenId); // N6 parts[12] = '</text><text x="10" y="140" class="base">'; parts[13] = getSpecialty(tokenId); // N7 parts[14] = '</text><text x="10" y="160" class="base">'; parts[15] = getItem(tokenId); // N8 parts[16] = "</text></svg>"; string memory output = string( abi.encodePacked(parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], parts[6], parts[7], parts[8]) ); output = string( abi.encodePacked( output, parts[9], parts[10], parts[11], parts[12], parts[13], parts[14], parts[15], parts[16] ) ); string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"name": "Dirty Business Character #', toString(tokenId), '", "description": "Welcome to Dirty Business, a virtual world of crime. There is only one choice. Get rich or die trying. Start a gang, equip them with weapons, purchase land, create profitable businesses, clean your money, and rise to the top of the food chain.", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}' ) ) ) ); output = string(abi.encodePacked("data:application/json;base64,", json)); return output; } function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT license // 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); } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IN.sol"; /** * @title NPassCore contract * @author Tony Snark * @notice This contract provides basic functionalities to allow minting using the NPass * @dev This contract should be used only for testing or testnet deployments */ abstract contract NPassCore is ERC721Enumerable, ReentrancyGuard, Ownable { uint256 public constant MAX_MULTI_MINT_AMOUNT = 32; uint256 public constant MAX_N_TOKEN_ID = 8888; IN public immutable n; bool public immutable onlyNHolders; uint16 public immutable reservedAllowance; uint16 public reserveMinted; uint256 public immutable maxTotalSupply; uint256 public immutable priceForNHoldersInWei; uint256 public immutable priceForOpenMintInWei; address public constant addrMS = 0x6811F7Fe9eA0B3D8eE02BdBd49c62aBFFe068A84; address public constant addrZ = 0x63e7C4170b38fFd6e2A9Ac22FF4ab91E5e8C0265; event Minted(address to, uint256 tokenId); bool public publicSale = false; /** * @notice Construct an NPassCore instance * @param name Name of the token * @param symbol Symbol of the token * @param n_ Address of your n instance (only for testing) * @param onlyNHolders_ True if only n tokens holders can mint this token * @param maxTotalSupply_ Maximum number of tokens that can ever be minted * @param reservedAllowance_ Number of tokens reserved for n token holders * @param priceForNHoldersInWei_ Price n token holders need to pay to mint * @param priceForOpenMintInWei_ Price open minter need to pay to mint */ constructor( string memory name, string memory symbol, IN n_, bool onlyNHolders_, uint256 maxTotalSupply_, uint16 reservedAllowance_, uint256 priceForNHoldersInWei_, uint256 priceForOpenMintInWei_ ) ERC721(name, symbol) { require(maxTotalSupply_ > 0, "NPass:INVALID_SUPPLY"); require(!onlyNHolders_ || (onlyNHolders_ && maxTotalSupply_ <= MAX_N_TOKEN_ID), "NPass:INVALID_SUPPLY"); require(maxTotalSupply_ >= reservedAllowance_, "NPass:INVALID_ALLOWANCE"); // If restricted to n token holders we limit max total supply n = n_; onlyNHolders = onlyNHolders_; maxTotalSupply = maxTotalSupply_; reservedAllowance = reservedAllowance_; priceForNHoldersInWei = priceForNHoldersInWei_; priceForOpenMintInWei = priceForOpenMintInWei_; } /** * @notice Allow a non n token holders to mint tokens * @param _publicSale The new publicSale state */ function setPublicSale(bool _publicSale) public onlyOwner { publicSale = _publicSale; } /** * @notice Allow a n token holder to bulk mint tokens with id of their n tokens' id * @param tokenIds Ids to be minted */ function multiMintWithN(uint256[] calldata tokenIds) public payable virtual nonReentrant { uint256 maxTokensToMint = tokenIds.length; require(maxTokensToMint <= MAX_MULTI_MINT_AMOUNT, "NPass:TOO_LARGE"); require( // If no reserved allowance we respect total supply contraint (reservedAllowance == 0 && totalSupply() + maxTokensToMint <= maxTotalSupply) || reserveMinted + maxTokensToMint <= reservedAllowance, "NPass:MAX_ALLOCATION_REACHED" ); require(msg.value == priceForNHoldersInWei * maxTokensToMint, "NPass:INVALID_PRICE"); // To avoid wasting gas we want to check all preconditions beforehand for (uint256 i = 0; i < maxTokensToMint; i++) { require(n.ownerOf(tokenIds[i]) == msg.sender, "NPass:INVALID_OWNER"); } // If reserved allowance is active we track mints count if (reservedAllowance > 0) { reserveMinted += uint16(maxTokensToMint); } for (uint256 i = 0; i < maxTokensToMint; i++) { _safeMint(msg.sender, tokenIds[i]); emit Minted(msg.sender, tokenIds[i]); } } /** * @notice Allow a n token holder to mint a token with one of their n token's id * @param tokenId Id to be minted */ function mintWithN(uint256 tokenId) public payable virtual nonReentrant { require( // If no reserved allowance we respect total supply contraint (reservedAllowance == 0 && totalSupply() < maxTotalSupply) || reserveMinted < reservedAllowance, "NPass:MAX_ALLOCATION_REACHED" ); require(n.ownerOf(tokenId) == msg.sender, "NPass:INVALID_OWNER"); require(msg.value == priceForNHoldersInWei, "NPass:INVALID_PRICE"); // If reserved allowance is active we track mints count if (reservedAllowance > 0) { reserveMinted++; } _safeMint(msg.sender, tokenId); emit Minted(msg.sender, tokenId); } /** * @notice Allow anyone to mint a token with the supply id if this pass is unrestricted. * n token holders can use this function without using the n token holders allowance, * this is useful when the allowance is fully utilized. * @param tokenId Id to be minted */ function mint(uint256 tokenId) public payable virtual nonReentrant { require(publicSale, "NPass:PUBLIC_SALE_IS_NOT_OPEN"); require(openMintsAvailable() > 0, "NPass:MAX_ALLOCATION_REACHED"); require(tokenId > 0 && tokenId <= 8888, "NPass:INVALID_ID"); require(msg.value == priceForOpenMintInWei, "NPass:INVALID_PRICE"); _safeMint(msg.sender, tokenId); emit Minted(msg.sender, tokenId); } /** * @notice Calculate the maximum token id that can ever be minted * @return Maximum token id */ function maxTokenId() public view returns (uint256) { uint256 maxOpenMints = maxTotalSupply - reservedAllowance; return MAX_N_TOKEN_ID + maxOpenMints; } /** * @notice Calculate the currently available number of reserved tokens for n token holders * @return Reserved mint available */ function nHoldersMintsAvailable() external view returns (uint256) { return reservedAllowance - reserveMinted; } /** * @notice Calculate the currently available number of open mints * @return Open mint available */ function openMintsAvailable() public view returns (uint256) { uint256 maxOpenMints = maxTotalSupply - reservedAllowance; uint256 currentOpenMints = totalSupply() - reserveMinted; return maxOpenMints - currentOpenMints; } /** * @notice Allows owner to withdraw amount */ function withdrawAll() external onlyOwner { payable(owner()).transfer(address(this).balance); } /** * @notice Allows owner to withdraw amount */ function withdrawFunds() external { payable(addrMS).transfer(address(this).balance * 67 / 100); payable(addrZ).transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; interface IN is IERC721Enumerable, IERC721Metadata { function getFirst(uint256 tokenId) external view returns (uint256); function getSecond(uint256 tokenId) external view returns (uint256); function getThird(uint256 tokenId) external view returns (uint256); function getFourth(uint256 tokenId) external view returns (uint256); function getFifth(uint256 tokenId) external view returns (uint256); function getSixth(uint256 tokenId) external view returns (uint256); function getSeventh(uint256 tokenId) external view returns (uint256); function getEight(uint256 tokenId) external view returns (uint256); }
{ "evmVersion": "berlin", "libraries": {}, "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 800 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_nContractAddress","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":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"MAX_MULTI_MINT_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_N_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addrMS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addrZ","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"getAimAccuracy","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"getBodyBuild","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getHeight","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getItem","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMentalFortitude","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPersonality","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSpecialty","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"maxTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintWithN","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"multiMintWithN","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"n","outputs":[{"internalType":"contract IN","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nHoldersMintsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onlyNHolders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openMintsAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceForNHoldersInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceForOpenMintInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveMinted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedAllowance","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":"bool","name":"_publicSale","type":"bool"}],"name":"setPublicSale","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":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
600b805460ff60b01b1916905560036103208181526236273560e81b610340526101409081526103608281526235273360e81b61038052610160526103a0828152620d49cd60ea1b6103c052610180526103e08281526235273560e81b610400526101a052610420828152621a939b60e91b610440526101c0526104608281526235273760e81b610480526101e0526104a08281526206a4e760eb1b6104c052610200526104e08281526235273960e81b61050052610220526004610520818152630352731360e41b6105405261024052610560908152633527313160e01b61058052610260526105a08281526203627360ec1b6105c052610280526105e08281526236273160e81b610600526102a052610620828152621b139960e91b610640526102c0526106608281526236273360e81b610680526102e0526106e06040526106a0918252620d89cd60ea1b6106c052610300919091526200016890600c90600f620015e9565b50604080516103e08101825260046103a08201818152634d696b6560e01b6103c084015282528251808401845281815263546f6e7960e01b6020828101919091528084019190915283518085018552600580825264546f6d6d7960d81b8284015284860191909152845180860186526002815261105b60f21b81840152606085015284518086018652818152644361726c6f60d81b8184015260808501528451808601865281815264436c79646560d81b8184015260a0850152845180860186526006808252654a6f686e6e7960d01b8285015260c086019190915285518087018752600381526253616d60e81b8185015260e0860152855180870187528481526310da185960e21b8185015261010086015285518087018752828152644672616e6b60d81b81850152610120860152855180870187528481526309cdec2d60e31b8185015261014086015285518087018752828152645061626c6f60d81b81850152610160860152855180870187528281526411185d9a5960da1b818501526101808601528551808701875281815265094dee6cae0d60d31b818501526101a0860152855180870187526007808252664d616c6971756560c81b828601526101c0870191909152865180880188528181526644696d6974726960c81b818601526101e087015286518088018852818152660b2c2e0d0cae8d60cb1b8186015261020087015286518088018852858152632334b73760e11b8186015261022087015286518088018852918252654a6f7368756160d01b8285015261024086019190915285518087018752818152664162726168616d60c81b8185015261026086015285518087018752828152644d6f73657360d81b81850152610280860152855180870187528181526629b432b63237b760c91b818501526102a086015285518087018752918252644c616e646f60d81b828401526102c085019190915284518086018652818152662634b731b7b63760c91b818401526102e085015284518086018652908152664d616c636f6c6d60c81b8183015261030084015283518085018552828152634e696b6f60e01b81830152610320840152835180850185528281526327b6b0b960e11b8183015261034084015283518085018552918252635261766960e01b828201526103608301919091528251808401909352600883526753616e746961676f60c01b90830152610380810191909152620004f090600d90601d6200164d565b50604080516103a08101825260056103608201818152644c75636b7960d81b610380840152825282518084018452818152640e18985b1b60da1b6020828101919091528084019190915283518085018552600880825267536361726661636560c01b828401528486019190915284518086018652600480825263456e7a6f60e01b82850152606086019190915285518087018752848152644d756c6c7960d81b81850152608086015285518087018752600981526842696720536d6f6b6560b81b8185015260a0860152855180870187528481526414ddd9595d60da1b8185015260c08601528551808701875282815267151a1948109d5b1b60c21b8185015260e0860152855180870187528481526442616e646f60d81b81850152610100860152855180870187528481526442756d707960d81b81850152610120860152855180870187528481526453756e6e7960d81b8185015261014086015285518087018752848152644d65726b7960d81b81850152610160860152855180870187526007815266486f7564696e6960c81b8185015261018086015285518087018752818152634475726b60e01b818501526101a086015285518087018752818152634573636f60e01b818501526101c08601528551808701875284815264446f70657960d81b818501526101e086015285518087018752848152644472616b6f60d81b8185015261020086015285518087018752828152674c696c204261627960c01b81850152610220860152855180870187526006808252655072696e636560d01b828601526102408701919091528651808801885292835267426c75656661636560c01b83850152610260860192909252855180870187528481526442656e6a6960d81b8185015261028086015285518087018752848152644d696c6c6960d81b818501526102a086015285518087018752818152634e696e6f60e01b818501526102c08601528551808701875293845264486572626f60d81b848401526102e0850193909352845180860186529081526553776572766f60d01b8183015261030084015283518085018552600381526252617360e81b81830152610320840152835180850190945290835263536f736160e01b908301526103408101919091526200084190600e90601b6200169f565b50604080516103e08101825260076103a08201818152664d6f6e74616e6160c81b6103c08401528252825180840184526006808252654d616c6f6e6560d01b60208381019190915280850192909252845180860186526005808252644c656f6e6560d81b82850152858701919091528551808701875281815264576f6f647360d81b818501526060860152855180870187528281526541646f6e697360d01b818501526080860152855180870187526008808252674369707269616e6960c01b8286015260a0870191909152865180880188528381526553616e746f7360d01b8186015260c087015286518088018852838152655368656c627960d01b8186015260e087015286518088018852838152654d6172696e6f60d01b81860152610100870152865180880188528181526743617374696c6c6f60c01b818601526101208701528651808801885285815266213aba32b934b760c91b8186015261014087015286518088018852858152662537b43739b7b760c91b81860152610160870152865180880188528581526647726176616e6f60c81b81860152610180870152865180880188528581526629b7b637b6b7b760c91b818601526101a087015286518088018852828152644c7563617360d81b818601526101c087015286518088018852828152642637b832bd60d91b818601526101e08701528651808801885285815266090cadcc8e4d2f60cb1b818601526102008701528651808801885283815265243ab73a32b960d11b818601526102208701528651808801885282815264486179657360d81b81860152610240870152865180880188528381526550696572636560d01b81860152610260870152865180880188528181526757696c6c69616d7360c01b8186015261028087015286518088018852858152664a656e6b696e7360c81b818601526102a087015286518088018852818152672132b73530b6b4b760c11b818601526102c087015286518088018852928352652832ba3937bb60d11b838501526102e08601929092528551808701875293845266536f7072616e6f60c81b848401526103008501939093528451808601865283815264213937bbb760d91b8184015261032085015284518086018652928352645761796e6560d81b8383015261034084019290925283518085018552828152674427416e67656c6f60c01b818301526103608401528351808501909452908352674769756c69616e6960c01b9083015261038081019190915262000be690600f90601d6200164d565b50604080516102008101825260066101c0820181815265536b696e6e7960d01b6101e0840152825282518084018452600580825264486561767960d81b602083810191909152808501929092528451808601865281815264416d706c6560d81b8184015284860152845180860186528381526553746f636b7960d01b818401526060850152845180860186528181526442756c6b7960d81b818401526080850152845180860186526008808252674174686c6574696360c01b8285015260a0860191909152855180870187528281526453776f6c6560d81b8185015260c086015285518087018752600781526653637261776e7960c81b8185015260e086015285518087018752828152644275726c7960d81b81850152610100860152855180870187528481526547616e676c7960d01b81850152610120860152855180870187529081526726bab9b1bab630b960c11b81840152610140850152845180860186529283526543687562627960d01b83830152610160840192909252835180850185526004815263536c696d60e01b81830152610180840152835180850190945290835264151bdb995960da1b908301526101a081019190915262000db090601090600e620016f1565b50604051806102c001604052806040518060400160405280600c81526020016b4d61727469616c204172747360a01b81525081526020016040518060400160405280600881526020016753686f6f74696e6760c01b81525081526020016040518060400160405280601081526020016f135bdb995e4813585b9859d95b595b9d60821b815250815260200160405180604001604052806012815260200171213ab9b4b732b9b99022bc3830b739b4b7b760711b81525081526020016040518060400160405280600a8152602001694e6574776f726b696e6760b01b81525081526020016040518060400160405280600681526020016521b637b9b2b960d11b8152508152602001604051806040016040528060078152602001664c656164696e6760c81b8152508152602001604051806040016040528060078152602001664861636b696e6760c81b81525081526020016040518060400160405280600b81526020016a2732b3b7ba34b0ba34b7b760a91b81525081526020016040518060400160405280600781526020016644726976696e6760c81b81525081526020016040518060400160405280601081526020016f4d6f6e6579204c61756e646572696e6760801b81525081526020016040518060400160405280600b81526020016a426f6f746c656767696e6760a81b81525081526020016040518060400160405280600d81526020016c5069636b706f636b6574696e6760981b81525081526020016040518060400160405280600e81526020016d1259195b9d1a5d1e48151a19599d60921b8152508152602001604051806040016040528060078152602001664272696265727960c81b81525081526020016040518060400160405280600981526020016821b0b93530b1b5b2b960b91b815250815260200160405180604001604052806009815260200168536d7567676c696e6760b81b81525081526020016040518060400160405280600e81526020016d436f756e74657266697474696e6760901b81525081526020016040518060400160405280601c81526020017f4c6f6f74696e6720286e6f7420666f7220616476656e747572657329000000008152508152602001604051806040016040528060068152602001652630bbbcb2b960d11b815250815260200160405180604001604052806006815260200165426f6f6b696560d01b81525081526020016040518060400160405280600a81526020016910dbdb9d1c9858985b9960b21b81525081525060119060166200115792919062001743565b506040805161022081018252600e6101e082018181526d088cae6d2cedccae440aec2e8c6d60931b6102008401819052908352835180850185526005808252640aec2e8c6d60db1b60208381019190915280860192909252855180870187528181526421b430b4b760d91b8184015285870152855180870187529081526411dc9a5b1b60da1b8183015260608501528451808601865260068152654665646f726160d01b81830152608085015284518086018652600c8082526b0a0dec6d6cae840aec2e8c6d60a31b8284015260a086019190915285518087018752600881526745617272696e677360c01b8184015260c086015285518087018752600980825268437566666c696e6b7360b81b8285015260e087019190915286518088018852600481526352696e6760e01b81850152610100870152865180880188529182526b546f626163636f205069706560a01b82840152610120860191909152855180870187526007815266476c617373657360c81b81840152610140860152855180870187528481526d4272617373204b6e75636b6c657360901b818401526101608601528551808701875290815268476f6c642052696e6760b81b8183015261018085015284518086018652928352828101919091526101a08301919091528251808401909352600d83526c2234b0b6b7b7321021b430b4b760991b908301526101c08101919091526200137090601290600f620015e9565b503480156200137e57600080fd5b506040516200661738038062006617833981016040819052620013a1916200189a565b6040518060400160405280600d81526020016c4469727479427573696e65737360981b81525060405180604001604052806005815260200164444952545960d81b8152508260006122b8600066354a6ba7a18000666a94d74f430000878781600090805190602001906200141792919062001795565b5080516200142d90600190602084019062001795565b50506001600a5550620014403362001597565b60008411620014965760405162461bcd60e51b815260206004820152601460248201527f4e506173733a494e56414c49445f535550504c5900000000000000000000000060448201526064015b60405180910390fd5b841580620014af5750848015620014af57506122b88411155b620014fd5760405162461bcd60e51b815260206004820152601460248201527f4e506173733a494e56414c49445f535550504c5900000000000000000000000060448201526064016200148d565b8261ffff16841015620015535760405162461bcd60e51b815260206004820152601760248201527f4e506173733a494e56414c49445f414c4c4f57414e434500000000000000000060448201526064016200148d565b60609590951b6001600160601b03191660805292151560f81b60a05260e09190915260f01b6001600160f01b03191660c05261010052610120525062001909915050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280548282559060005260206000209081019282156200163b579160200282015b828111156200163b57825180516200162a91849160209091019062001795565b50916020019190600101906200160a565b506200164992915062001820565b5090565b8280548282559060005260206000209081019282156200163b579160200282015b828111156200163b57825180516200168e91849160209091019062001795565b50916020019190600101906200166e565b8280548282559060005260206000209081019282156200163b579160200282015b828111156200163b5782518051620016e091849160209091019062001795565b5091602001919060010190620016c0565b8280548282559060005260206000209081019282156200163b579160200282015b828111156200163b57825180516200173291849160209091019062001795565b509160200191906001019062001712565b8280548282559060005260206000209081019282156200163b579160200282015b828111156200163b57825180516200178491849160209091019062001795565b509160200191906001019062001764565b828054620017a390620018cc565b90600052602060002090601f016020900481019282620017c7576000855562001812565b82601f10620017e257805160ff191683800117855562001812565b8280016001018555821562001812579182015b8281111562001812578251825591602001919060010190620017f5565b506200164992915062001841565b808211156200164957600062001837828262001858565b5060010162001820565b5b8082111562001649576000815560010162001842565b5080546200186690620018cc565b6000825580601f1062001877575050565b601f01602090049060005260206000209081019062001897919062001841565b50565b600060208284031215620018ad57600080fd5b81516001600160a01b0381168114620018c557600080fd5b9392505050565b600181811c90821680620018e157607f821691505b602082108114156200190357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c60a05160f81c60c05160f01c60e0516101005161012051614bc762001a5060003960008181610942015261268d01526000818161085d01528181610d040152611a370152600081816104a901528181610b6201528181611969015281816123bf01526124de01526000818161042d01528181610b3801528181610b9a01528181610d6c0152818161193f015281816119ad01528181611bcf0152818161239d015281816124bc015261285a015260006106840152600081816104fd01528181610c3201528181610f35015281816115990152818161173e01528181611aad01528181611f6b015281816122890152818161289301528181612bb701528181612d7b015281816132b201528181613342015281816133e70152818161348c01528181613531015281816135d60152818161367b01526137200152614bc76000f3fe6080604052600436106103135760003560e01c80636a4c19d91161019a578063ae5a583f116100e1578063e4432a471161008a578063f2fde38b11610064578063f2fde38b14610910578063f82cbbe814610930578063fdc3a9cc1461096457600080fd5b8063e4432a471461087f578063e985e9c51461089f578063f1c4035d146108e857600080fd5b8063c8124c4d116100bb578063c8124c4d1461080b578063c87b56dd1461082b578063daf5d3741461084b57600080fd5b8063ae5a583f146107c0578063b88d4fde146107d6578063c5de34a0146107f657600080fd5b8063853828b61161014357806395d89b411161011d57806395d89b4114610778578063a0712d681461078d578063a22cb465146107a057600080fd5b8063853828b6146107305780638da5cb5b1461074557806391ba317a1461076357600080fd5b8063715018a611610174578063715018a6146106e6578063746d86d3146106fb5780638416b6961461071b57600080fd5b80636a4c19d9146106725780636b8ff574146106a657806370a08231146106c657600080fd5b80632e52d6061161025e57806347febae8116102075780635aca1bb6116101e15780635aca1bb61461061d5780635d929f701461063d5780636352211e1461065257600080fd5b806347febae8146105c85780634c81433f146105db5780634f6ccce7146105fd57600080fd5b806333bc1c5c1161023857806333bc1c5c1461055f57806341c7ba1b1461058057806342842e0e146105a857600080fd5b80632e52d606146104eb5780632f745c591461051f5780633129e7731461053f57600080fd5b80631ade97f7116102c057806324600fc31161029a57806324600fc3146104825780632ab4d052146104975780632e354698146104cb57600080fd5b80631ade97f7146103fb57806320bc84ce1461041b57806323b872dd1461046257600080fd5b80630860b12c116102f15780630860b12c146103a7578063095ea7b3146103bc57806318160ddd146103dc57600080fd5b806301ffc9a71461031857806306fdde031461034d578063081812fc1461036f575b600080fd5b34801561032457600080fd5b50610338610333366004614217565b610984565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b506103626109af565b6040516103449190614732565b34801561037b57600080fd5b5061038f61038a366004614251565b610a41565b6040516001600160a01b039091168152602001610344565b6103ba6103b5366004614251565b610adb565b005b3480156103c857600080fd5b506103ba6103d736600461415b565b610e13565b3480156103e857600080fd5b506008545b604051908152602001610344565b34801561040757600080fd5b50610362610416366004614251565b610f29565b34801561042757600080fd5b5061044f7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff9091168152602001610344565b34801561046e57600080fd5b506103ba61047d366004614005565b61146b565b34801561048e57600080fd5b506103ba6114f2565b3480156104a357600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d757600080fd5b506103626104e6366004614251565b61158d565b3480156104f757600080fd5b5061038f7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052b57600080fd5b506103ed61053a36600461415b565b611677565b34801561054b57600080fd5b5061036261055a366004614251565b61171f565b34801561056b57600080fd5b50600b5461033890600160b01b900460ff1681565b34801561058c57600080fd5b5061038f7363e7c4170b38ffd6e2a9ac22ff4ab91e5e8c026581565b3480156105b457600080fd5b506103ba6105c3366004614005565b611875565b6103ba6105d6366004614187565b611890565b3480156105e757600080fd5b50600b5461044f90600160a01b900461ffff1681565b34801561060957600080fd5b506103ed610618366004614251565b611cd5565b34801561062957600080fd5b506103ba6106383660046141fc565b611d79565b34801561064957600080fd5b506103ed602081565b34801561065e57600080fd5b5061038f61066d366004614251565b611e0c565b34801561067e57600080fd5b506103387f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b257600080fd5b506103626106c1366004614251565b611e97565b3480156106d257600080fd5b506103ed6106e1366004613f92565b61217d565b3480156106f257600080fd5b506103ba612217565b34801561070757600080fd5b50610362610716366004614251565b61227d565b34801561072757600080fd5b506103ed612392565b34801561073c57600080fd5b506103ba61241e565b34801561075157600080fd5b50600b546001600160a01b031661038f565b34801561076f57600080fd5b506103ed6124b1565b34801561078457600080fd5b50610362612516565b6103ba61079b366004614251565b612525565b3480156107ac57600080fd5b506103ba6107bb366004614126565b6126f0565b3480156107cc57600080fd5b506103ed6122b881565b3480156107e257600080fd5b506103ba6107f1366004614046565b6127b5565b34801561080257600080fd5b506103ed612843565b34801561081757600080fd5b50610362610826366004614251565b612887565b34801561083757600080fd5b50610362610846366004614251565b6128f1565b34801561085757600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000081565b34801561088b57600080fd5b5061036261089a366004614251565b612bab565b3480156108ab57600080fd5b506103386108ba366004613fcc565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108f457600080fd5b5061038f736811f7fe9ea0b3d8ee02bdbd49c62abffe068a8481565b34801561091c57600080fd5b506103ba61092b366004613f92565b612c7d565b34801561093c57600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000081565b34801561097057600080fd5b5061036261097f366004614251565b612d5c565b60006001600160e01b0319821663780e9d6360e01b14806109a957506109a982612db2565b92915050565b6060600080546109be90614813565b80601f01602080910402602001604051908101604052809291908181526020018280546109ea90614813565b8015610a375780601f10610a0c57610100808354040283529160200191610a37565b820191906000526020600020905b815481529060010190602001808311610a1a57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610abf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6002600a541415610b2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab6565b6002600a5561ffff7f000000000000000000000000000000000000000000000000000000000000000016158015610b8c57507f0000000000000000000000000000000000000000000000000000000000000000610b8a60085490565b105b80610bc65750600b5461ffff7f00000000000000000000000000000000000000000000000000000000000000008116600160a01b90920416105b610c125760405162461bcd60e51b815260206004820152601c60248201527f4e506173733a4d41585f414c4c4f434154494f4e5f52454143484544000000006044820152606401610ab6565b6040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e9060240160206040518083038186803b158015610c7457600080fd5b505afa158015610c88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cac9190613faf565b6001600160a01b031614610d025760405162461bcd60e51b815260206004820152601360248201527f4e506173733a494e56414c49445f4f574e4552000000000000000000000000006044820152606401610ab6565b7f00000000000000000000000000000000000000000000000000000000000000003414610d675760405162461bcd60e51b81526020600482015260136024820152724e506173733a494e56414c49445f505249434560681b6044820152606401610ab6565b61ffff7f00000000000000000000000000000000000000000000000000000000000000001615610dc857600b8054600160a01b900461ffff16906014610dac8361484e565b91906101000a81548161ffff021916908361ffff160217905550505b610dd23382612e02565b60408051338152602081018390527f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe910160405180910390a1506001600a55565b6000610e1e82611e0c565b9050806001600160a01b0316836001600160a01b03161415610e8c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ab6565b336001600160a01b0382161480610ea85750610ea881336108ba565b610f1a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610ab6565b610f248383612e20565b505050565b60606000611004610fd67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630b2503a6866040518263ffffffff1660e01b8152600401610f8191815260200190565b60206040518083038186803b158015610f9957600080fd5b505afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd1919061426a565b612e8e565b610fdf85612e8e565b604051602001610ff09291906142e7565b604051602081830303815290604052612fac565b905060006110146103e88361488b565b905060a481101561105b57505060408051808201909152601681527f4953544a202d20546865204c6f67697374696369616e00000000000000000000602082015292915050565b6101148110156110a157505060408051808201909152601481527f4553544a202d2054686520457865637574697665000000000000000000000000602082015292915050565b6101698110156110e757505060408051808201909152601381527f49535450202d205468652056697274756f736f00000000000000000000000000602082015292915050565b6101ba81101561112d57505060408051808201909152601381527f4953464a202d2054686520446566656e64657200000000000000000000000000602082015292915050565b61020681101561117357505060408051808201909152601581527f49534650202d2054686520416476656e74757265720000000000000000000000602082015292915050565b6102518110156111b957505060408051808201909152601181527f4553464a202d2054686520436f6e73756c000000000000000000000000000000602082015292915050565b6102968110156111ff57505060408051808201909152601681527f45534650202d2054686520456e7465727461696e657200000000000000000000602082015292915050565b6102d681101561124557505060408051808201909152601581527f454e4650202d205468652043616d706169676e65720000000000000000000000602082015292915050565b61030e81101561128b57505060408051808201909152601781527f45535450202d2054686520456e7472657072656e657572000000000000000000602082015292915050565b61033e8110156112d157505060408051808201909152601381527f494e5450202d20546865204c6f67696369616e00000000000000000000000000602082015292915050565b61036781101561131757505060408051808201909152601381527f494e4650202d20546865204d65646961746f7200000000000000000000000000602082015292915050565b61038f81101561135d57505060408051808201909152601281527f454e5450202d2054686520446562617465720000000000000000000000000000602082015292915050565b6103b08110156113a357505060408051808201909152601481527f494e544a202d2054686520417263686974656374000000000000000000000000602082015292915050565b6103cb8110156113e957505060408051808201909152601481527f454e544a202d2054686520436f6d6d616e646572000000000000000000000000602082015292915050565b6103db81101561142f57505060408051808201909152601681527f454e464a202d205468652050726f7461676f6e69737400000000000000000000602082015292915050565b505060408051808201909152601381527f494e464a202d20546865204164766f6361746500000000000000000000000000602082015292915050565b6114753382612fdd565b6114e75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610ab6565b610f248383836130d0565b736811f7fe9ea0b3d8ee02bdbd49c62abffe068a846108fc606461151747604361478e565b611521919061477a565b6040518115909202916000818181858888f19350505050158015611549573d6000803e3d6000fd5b506040517363e7c4170b38ffd6e2a9ac22ff4ab91e5e8c0265904780156108fc02916000818181858888f1935050505015801561158a573d6000803e3d6000fd5b50565b606060006115e5610fd67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ec29b82866040518263ffffffff1660e01b8152600401610f8191815260200190565b905060006115f460328361488b565b6115ff906033614762565b9050605e81111561164657505060408051808201909152601b81527f4d656e74616c20466f727469747564653a205665727920486967680000000000602082015292915050565b61164f81612e8e565b60405160200161165f9190614437565b60405160208183030381529060405292505050919050565b60006116828361217d565b82106116f65760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610ab6565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60128054604051639347e43f60e01b81526004810184905260609291907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639347e43f906024015b60206040518083038186803b15801561178957600080fd5b505afa15801561179d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c1919061426a565b6117cb919061488b565b815481106117db576117db6148e1565b9060005260206000200180546117f090614813565b80601f016020809104026020016040519081016040528092919081815260200182805461181c90614813565b80156118695780601f1061183e57610100808354040283529160200191611869565b820191906000526020600020905b81548152906001019060200180831161184c57829003601f168201915b50505050509050919050565b610f24838383604051806020016040528060008152506127b5565b6002600a5414156118e35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab6565b6002600a5580602081111561193a5760405162461bcd60e51b815260206004820152600f60248201527f4e506173733a544f4f5f4c4152474500000000000000000000000000000000006044820152606401610ab6565b61ffff7f00000000000000000000000000000000000000000000000000000000000000001615801561199f57507f00000000000000000000000000000000000000000000000000000000000000008161199260085490565b61199c9190614762565b11155b806119e55750600b5461ffff7f00000000000000000000000000000000000000000000000000000000000000008116916119e2918491600160a01b900416614762565b11155b611a315760405162461bcd60e51b815260206004820152601c60248201527f4e506173733a4d41585f414c4c4f434154494f4e5f52454143484544000000006044820152606401610ab6565b611a5b817f000000000000000000000000000000000000000000000000000000000000000061478e565b3414611a9f5760405162461bcd60e51b81526020600482015260136024820152724e506173733a494e56414c49445f505249434560681b6044820152606401610ab6565b60005b81811015611bc957337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e868685818110611aec57611aec6148e1565b905060200201356040518263ffffffff1660e01b8152600401611b1191815260200190565b60206040518083038186803b158015611b2957600080fd5b505afa158015611b3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b619190613faf565b6001600160a01b031614611bb75760405162461bcd60e51b815260206004820152601360248201527f4e506173733a494e56414c49445f4f574e4552000000000000000000000000006044820152606401610ab6565b80611bc181614870565b915050611aa2565b5061ffff7f00000000000000000000000000000000000000000000000000000000000000001615611c2e5780600b60148282829054906101000a900461ffff16611c139190614745565b92506101000a81548161ffff021916908361ffff1602179055505b60005b81811015611cca57611c5b33858584818110611c4f57611c4f6148e1565b90506020020135612e02565b7f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe33858584818110611c8f57611c8f6148e1565b604080516001600160a01b0390951685526020918202939093013590840152500160405180910390a180611cc281614870565b915050611c31565b50506001600a555050565b6000611ce060085490565b8210611d545760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610ab6565b60088281548110611d6757611d676148e1565b90600052602060002001549050919050565b600b546001600160a01b03163314611dd35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b600b8054911515600160b01b027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000818152600260205260408120546001600160a01b0316806109a95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610ab6565b60606000611eaa610fd6610fd18561328f565b600d8054919250600091611ebe908461488b565b81548110611ece57611ece6148e1565b906000526020600020018054611ee390614813565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0f90614813565b8015611f5c5780601f10611f3157610100808354040283529160200191611f5c565b820191906000526020600020905b815481529060010190602001808311611f3f57829003601f168201915b50505050509050611fc0611fb77f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663667386f7876040518263ffffffff1660e01b8152600401610f8191815260200190565b610fdf86612e8e565b600e8054919350600091611fd4908561488b565b81548110611fe457611fe46148e1565b906000526020600020018054611ff990614813565b80601f016020809104026020016040519081016040528092919081815260200182805461202590614813565b80156120725780601f1061204757610100808354040283529160200191612072565b820191906000526020600020905b81548152906001019060200180831161205557829003601f168201915b5050505050905061209561208586612e8e565b604051602001610ff091906142cb565b600f80549194506000916120a9908661488b565b815481106120b9576120b96148e1565b9060005260206000200180546120ce90614813565b80601f01602080910402602001604051908101604052809291908181526020018280546120fa90614813565b80156121475780601f1061211c57610100808354040283529160200191612147565b820191906000526020600020905b81548152906001019060200180831161212a57829003601f168201915b50505050509050828282604051602001612163939291906143d6565b604051602081830303815290604052945050505050919050565b60006001600160a01b0382166121fb5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610ab6565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146122715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b61227b60006137b3565b565b606060006122d5610fd67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fa7f71b1866040518263ffffffff1660e01b8152600401610f8191815260200190565b60108054919250906122e7908361488b565b815481106122f7576122f76148e1565b90600052602060002001805461230c90614813565b80601f016020809104026020016040519081016040528092919081815260200182805461233890614813565b80156123855780601f1061235a57610100808354040283529160200191612385565b820191906000526020600020905b81548152906001019060200180831161236857829003601f168201915b5050505050915050919050565b6000806123e361ffff7f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006147d0565b600b5490915060009061ffff600160a01b9091041661240160085490565b61240b91906147d0565b905061241781836147d0565b9250505090565b600b546001600160a01b031633146124785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b600b546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561158a573d6000803e3d6000fd5b60008061250261ffff7f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006147d0565b9050612510816122b8614762565b91505090565b6060600180546109be90614813565b6002600a5414156125785760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab6565b6002600a55600b54600160b01b900460ff166125d65760405162461bcd60e51b815260206004820152601d60248201527f4e506173733a5055424c49435f53414c455f49535f4e4f545f4f50454e0000006044820152606401610ab6565b60006125e0612392565b1161262d5760405162461bcd60e51b815260206004820152601c60248201527f4e506173733a4d41585f414c4c4f434154494f4e5f52454143484544000000006044820152606401610ab6565b60008111801561263f57506122b88111155b61268b5760405162461bcd60e51b815260206004820152601060248201527f4e506173733a494e56414c49445f4944000000000000000000000000000000006044820152606401610ab6565b7f00000000000000000000000000000000000000000000000000000000000000003414610dc85760405162461bcd60e51b81526020600482015260136024820152724e506173733a494e56414c49445f505249434560681b6044820152606401610ab6565b6001600160a01b0382163314156127495760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ab6565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6127bf3383612fdd565b6128315760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610ab6565b61283d84848484613805565b50505050565b600b5460009061287e90600160a01b900461ffff167f00000000000000000000000000000000000000000000000000000000000000006147ad565b61ffff16905090565b606060006128df610fd67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638c921d06866040518263ffffffff1660e01b8152600401610f8191815260200190565b60118054919250906122e7908361488b565b60606128fb613f55565b6040518061016001604052806101268152602001614a046101269139815261292283611e97565b8160016020020181905250604051806060016040528060288152602001614b9360289139604082015261295483612d5c565b6060808301919091526040805191820190526028808252614939602083013960808201526129818361227d565b60a0820152604080516060810190915260288082526149b3602083013960c08201526129ac8361158d565b60e0820152604080516060810190915260298082526149db60208301396101008201526129d883610f29565b6101208201526040805160608101909152602980825261498a6020830139610140820152612a0583612bab565b61016082015260408051606081019091526029808252614b2a6020830139610180820152612a3283612887565b6101a08201526040805160608101909152602980825261496160208301396101c0820152612a5f8361171f565b6101e0820152604080518082018252600d81527f3c2f746578743e3c2f7376673e00000000000000000000000000000000000000602080830191909152610200840191909152825181840151838501516060860151608087015160a088015160c089015160e08a01516101008b0151995160009a612adf9a909101614316565b60408051808303601f19018152908290526101208401516101408501516101608601516101808701516101a08801516101c08901516101e08a01516102008b0151979950612b32988a9890602001614316565b60405160208183030381529060405290506000612b7f612b5186612e8e565b612b5a84613883565b604051602001612b6b9291906144c1565b604051602081830303815290604052613883565b905080604051602001612b92919061447c565b60408051601f1981840301815291905295945050505050565b60606000612c03610fd67f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166342d9d876866040518263ffffffff1660e01b8152600401610f8191815260200190565b90506000612c1260328361488b565b612c1d906033614762565b9050605e811115612c6457505060408051808201909152601a81527f41696d2041636375726163793a20536861727073686f6f746572000000000000602082015292915050565b612c6d81612e8e565b60405160200161165f91906146b1565b600b546001600160a01b03163314612cd75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b6001600160a01b038116612d535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ab6565b61158a816137b3565b600c80546040516322a8007f60e21b81526004810184905260609291907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638aa001fc90602401611771565b60006001600160e01b031982166380ac58cd60e01b1480612de357506001600160e01b03198216635b5e139f60e01b145b806109a957506301ffc9a760e01b6001600160e01b03198316146109a9565b612e1c8282604051806020016040528060008152506139e9565b5050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612e5582611e0c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b606081612eb25750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612edc5780612ec681614870565b9150612ed59050600a8361477a565b9150612eb6565b60008167ffffffffffffffff811115612ef757612ef76148f7565b6040519080825280601f01601f191660200182016040528015612f21576020820181803683370190505b5090505b8415612fa457612f366001836147d0565b9150612f43600a8661488b565b612f4e906030614762565b60f81b818381518110612f6357612f636148e1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612f9d600a8661477a565b9450612f25565b949350505050565b600081604051602001612fbf91906142cb565b60408051601f19818403018152919052805160209091012092915050565b6000818152600260205260408120546001600160a01b03166130565760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ab6565b600061306183611e0c565b9050806001600160a01b0316846001600160a01b0316148061309c5750836001600160a01b031661309184610a41565b6001600160a01b0316145b80612fa457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16612fa4565b826001600160a01b03166130e382611e0c565b6001600160a01b03161461315f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610ab6565b6001600160a01b0382166131c15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ab6565b6131cc838383613a67565b6131d7600082612e20565b6001600160a01b03831660009081526003602052604081208054600192906132009084906147d0565b90915550506001600160a01b038216600090815260036020526040812080546001929061322e908490614762565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040516322a8007f60e21b81526004810182905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638aa001fc9060240160206040518083038186803b1580156132f457600080fd5b505afa158015613308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061332c919061426a565b60405163667386f760e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063667386f79060240160206040518083038186803b15801561338c57600080fd5b505afa1580156133a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133c4919061426a565b6133ce9190614762565b60405163fa7f71b160e01b8152600481018590529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fa7f71b19060240160206040518083038186803b15801561343157600080fd5b505afa158015613445573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613469919061426a565b6134739082614762565b604051634f614dc160e11b8152600481018590529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639ec29b829060240160206040518083038186803b1580156134d657600080fd5b505afa1580156134ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061350e919061426a565b6135189082614762565b60405163059281d360e11b8152600481018590529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630b2503a69060240160206040518083038186803b15801561357b57600080fd5b505afa15801561358f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b3919061426a565b6135bd9082614762565b60405163216cec3b60e11b8152600481018590529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342d9d8769060240160206040518083038186803b15801561362057600080fd5b505afa158015613634573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613658919061426a565b6136629082614762565b6040516346490e8360e11b8152600481018590529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638c921d069060240160206040518083038186803b1580156136c557600080fd5b505afa1580156136d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136fd919061426a565b6137079082614762565b604051639347e43f60e01b8152600481018590529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639347e43f9060240160206040518083038186803b15801561376a57600080fd5b505afa15801561377e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137a2919061426a565b6137ac9082614762565b9392505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6138108484846130d0565b61381c84848484613b1f565b61283d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ab6565b8051606090806138a3575050604080516020810190915260008152919050565b600060036138b2836002614762565b6138bc919061477a565b6138c790600461478e565b905060006138d6826020614762565b67ffffffffffffffff8111156138ee576138ee6148f7565b6040519080825280601f01601f191660200182016040528015613918576020820181803683370190505b5090506000604051806060016040528060408152602001614b53604091399050600181016020830160005b868110156139a4576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101613943565b5060038606600181146139be57600281146139cf576139db565b613d3d60f01b6001198301526139db565b603d60f81b6000198301525b505050918152949350505050565b6139f38383613c77565b613a006000848484613b1f565b610f245760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ab6565b6001600160a01b038316613ac257613abd81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613ae5565b816001600160a01b0316836001600160a01b031614613ae557613ae58382613dc5565b6001600160a01b038216613afc57610f2481613e62565b826001600160a01b0316826001600160a01b031614610f2457610f248282613f11565b60006001600160a01b0384163b15613c6c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613b639033908990889088906004016146f6565b602060405180830381600087803b158015613b7d57600080fd5b505af1925050508015613bad575060408051601f3d908101601f19168201909252613baa91810190614234565b60015b613c52573d808015613bdb576040519150601f19603f3d011682016040523d82523d6000602084013e613be0565b606091505b508051613c4a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ab6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612fa4565b506001949350505050565b6001600160a01b038216613ccd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ab6565b6000818152600260205260409020546001600160a01b031615613d325760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ab6565b613d3e60008383613a67565b6001600160a01b0382166000908152600360205260408120805460019290613d67908490614762565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001613dd28461217d565b613ddc91906147d0565b600083815260076020526040902054909150808214613e2f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613e74906001906147d0565b60008381526009602052604081205460088054939450909284908110613e9c57613e9c6148e1565b906000526020600020015490508060088381548110613ebd57613ebd6148e1565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613ef557613ef56148cb565b6001900381819060005260206000200160009055905550505050565b6000613f1c8361217d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6040518061022001604052806011905b6060815260200190600190039081613f655790505090565b80358015158114613f8d57600080fd5b919050565b600060208284031215613fa457600080fd5b81356137ac8161490d565b600060208284031215613fc157600080fd5b81516137ac8161490d565b60008060408385031215613fdf57600080fd5b8235613fea8161490d565b91506020830135613ffa8161490d565b809150509250929050565b60008060006060848603121561401a57600080fd5b83356140258161490d565b925060208401356140358161490d565b929592945050506040919091013590565b6000806000806080858703121561405c57600080fd5b84356140678161490d565b935060208501356140778161490d565b925060408501359150606085013567ffffffffffffffff8082111561409b57600080fd5b818701915087601f8301126140af57600080fd5b8135818111156140c1576140c16148f7565b604051601f8201601f19908116603f011681019083821181831017156140e9576140e96148f7565b816040528281528a602084870101111561410257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561413957600080fd5b82356141448161490d565b915061415260208401613f7d565b90509250929050565b6000806040838503121561416e57600080fd5b82356141798161490d565b946020939093013593505050565b6000806020838503121561419a57600080fd5b823567ffffffffffffffff808211156141b257600080fd5b818501915085601f8301126141c657600080fd5b8135818111156141d557600080fd5b8660208260051b85010111156141ea57600080fd5b60209290920196919550909350505050565b60006020828403121561420e57600080fd5b6137ac82613f7d565b60006020828403121561422957600080fd5b81356137ac81614922565b60006020828403121561424657600080fd5b81516137ac81614922565b60006020828403121561426357600080fd5b5035919050565b60006020828403121561427c57600080fd5b5051919050565b6000815180845261429b8160208601602086016147e7565b601f01601f19169290920160200192915050565b600081516142c18185602086016147e7565b9290920192915050565b600082516142dd8184602087016147e7565b9190910192915050565b600083516142f98184602088016147e7565b83519083019061430d8183602088016147e7565b01949350505050565b60008a51614328818460208f016147e7565b8a5161433a8183860160208f016147e7565b8a51918401019061434f818360208e016147e7565b8951910190614362818360208d016147e7565b88516143748183850160208d016147e7565b885192909101019061438a818360208b016147e7565b865161439c8183850160208b016147e7565b86519290910101906143b28183602089016147e7565b84516143c481838501602089016147e7565b9101019b9a5050505050505050505050565b600084516143e88184602089016147e7565b61101160f11b90830190815284516144078160028401602089016147e7565b61011160f51b60029290910191820152835161442a8160048401602088016147e7565b0160040195945050505050565b7f4d656e74616c20466f727469747564653a20000000000000000000000000000081526000825161446f8160128501602087016147e7565b9190910160120192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516144b481601d8501602087016147e7565b91909101601d0192915050565b7f7b226e616d65223a2022446972747920427573696e65737320436861726163748152636572202360e01b6020820152600083516145068160248501602088016147e7565b7f222c20226465736372697074696f6e223a202257656c636f6d6520746f2044696024918401918201527f72747920427573696e6573732c2061207669727475616c20776f726c64206f6660448201527f206372696d652e205468657265206973206f6e6c79206f6e652063686f69636560648201527f2e204765742072696368206f722064696520747279696e672e2053746172742060848201527f612067616e672c206571756970207468656d207769746820776561706f6e732c60a48201527f207075726368617365206c616e642c206372656174652070726f66697461626c60c48201527f6520627573696e65737365732c20636c65616e20796f7572206d6f6e65792c2060e48201527f616e64207269736520746f2074686520746f70206f662074686520666f6f64206101048201527f636861696e2e222c2022696d616765223a2022646174613a696d6167652f73766101248201527f672b786d6c3b6261736536342c000000000000000000000000000000000000006101448201526146a861469a6101518301866142af565b61227d60f01b815260020190565b95945050505050565b7f41696d2041636375726163793a200000000000000000000000000000000000008152600082516146e981600e8501602087016147e7565b91909101600e0192915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526147286080830184614283565b9695505050505050565b6020815260006137ac6020830184614283565b600061ffff80831681851680830382111561430d5761430d61489f565b600082198211156147755761477561489f565b500190565b600082614789576147896148b5565b500490565b60008160001904831182151516156147a8576147a861489f565b500290565b600061ffff838116908316818110156147c8576147c861489f565b039392505050565b6000828210156147e2576147e261489f565b500390565b60005b838110156148025781810151838201526020016147ea565b8381111561283d5750506000910152565b600181811c9082168061482757607f821691505b6020821081141561484857634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156148665761486661489f565b6001019392505050565b60006000198214156148845761488461489f565b5060010190565b60008261489a5761489a6148b5565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461158a57600080fd5b6001600160e01b03198116811461158a57600080fdfe3c2f746578743e3c7465787420783d2231302220793d2236302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223136302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223132302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d2238302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223130302220636c6173733d2262617365223e3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d202e6e616d65207b746578742d6465636f726174696f6e3a20756e6465726c696e653b7d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365206e616d65223e3c2f746578743e3c7465787420783d2231302220793d223134302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173733d2262617365223ea164736f6c6343000806000a00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d6
Deployed Bytecode
0x6080604052600436106103135760003560e01c80636a4c19d91161019a578063ae5a583f116100e1578063e4432a471161008a578063f2fde38b11610064578063f2fde38b14610910578063f82cbbe814610930578063fdc3a9cc1461096457600080fd5b8063e4432a471461087f578063e985e9c51461089f578063f1c4035d146108e857600080fd5b8063c8124c4d116100bb578063c8124c4d1461080b578063c87b56dd1461082b578063daf5d3741461084b57600080fd5b8063ae5a583f146107c0578063b88d4fde146107d6578063c5de34a0146107f657600080fd5b8063853828b61161014357806395d89b411161011d57806395d89b4114610778578063a0712d681461078d578063a22cb465146107a057600080fd5b8063853828b6146107305780638da5cb5b1461074557806391ba317a1461076357600080fd5b8063715018a611610174578063715018a6146106e6578063746d86d3146106fb5780638416b6961461071b57600080fd5b80636a4c19d9146106725780636b8ff574146106a657806370a08231146106c657600080fd5b80632e52d6061161025e57806347febae8116102075780635aca1bb6116101e15780635aca1bb61461061d5780635d929f701461063d5780636352211e1461065257600080fd5b806347febae8146105c85780634c81433f146105db5780634f6ccce7146105fd57600080fd5b806333bc1c5c1161023857806333bc1c5c1461055f57806341c7ba1b1461058057806342842e0e146105a857600080fd5b80632e52d606146104eb5780632f745c591461051f5780633129e7731461053f57600080fd5b80631ade97f7116102c057806324600fc31161029a57806324600fc3146104825780632ab4d052146104975780632e354698146104cb57600080fd5b80631ade97f7146103fb57806320bc84ce1461041b57806323b872dd1461046257600080fd5b80630860b12c116102f15780630860b12c146103a7578063095ea7b3146103bc57806318160ddd146103dc57600080fd5b806301ffc9a71461031857806306fdde031461034d578063081812fc1461036f575b600080fd5b34801561032457600080fd5b50610338610333366004614217565b610984565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b506103626109af565b6040516103449190614732565b34801561037b57600080fd5b5061038f61038a366004614251565b610a41565b6040516001600160a01b039091168152602001610344565b6103ba6103b5366004614251565b610adb565b005b3480156103c857600080fd5b506103ba6103d736600461415b565b610e13565b3480156103e857600080fd5b506008545b604051908152602001610344565b34801561040757600080fd5b50610362610416366004614251565b610f29565b34801561042757600080fd5b5061044f7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff9091168152602001610344565b34801561046e57600080fd5b506103ba61047d366004614005565b61146b565b34801561048e57600080fd5b506103ba6114f2565b3480156104a357600080fd5b506103ed7f00000000000000000000000000000000000000000000000000000000000022b881565b3480156104d757600080fd5b506103626104e6366004614251565b61158d565b3480156104f757600080fd5b5061038f7f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d681565b34801561052b57600080fd5b506103ed61053a36600461415b565b611677565b34801561054b57600080fd5b5061036261055a366004614251565b61171f565b34801561056b57600080fd5b50600b5461033890600160b01b900460ff1681565b34801561058c57600080fd5b5061038f7363e7c4170b38ffd6e2a9ac22ff4ab91e5e8c026581565b3480156105b457600080fd5b506103ba6105c3366004614005565b611875565b6103ba6105d6366004614187565b611890565b3480156105e757600080fd5b50600b5461044f90600160a01b900461ffff1681565b34801561060957600080fd5b506103ed610618366004614251565b611cd5565b34801561062957600080fd5b506103ba6106383660046141fc565b611d79565b34801561064957600080fd5b506103ed602081565b34801561065e57600080fd5b5061038f61066d366004614251565b611e0c565b34801561067e57600080fd5b506103387f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b257600080fd5b506103626106c1366004614251565b611e97565b3480156106d257600080fd5b506103ed6106e1366004613f92565b61217d565b3480156106f257600080fd5b506103ba612217565b34801561070757600080fd5b50610362610716366004614251565b61227d565b34801561072757600080fd5b506103ed612392565b34801561073c57600080fd5b506103ba61241e565b34801561075157600080fd5b50600b546001600160a01b031661038f565b34801561076f57600080fd5b506103ed6124b1565b34801561078457600080fd5b50610362612516565b6103ba61079b366004614251565b612525565b3480156107ac57600080fd5b506103ba6107bb366004614126565b6126f0565b3480156107cc57600080fd5b506103ed6122b881565b3480156107e257600080fd5b506103ba6107f1366004614046565b6127b5565b34801561080257600080fd5b506103ed612843565b34801561081757600080fd5b50610362610826366004614251565b612887565b34801561083757600080fd5b50610362610846366004614251565b6128f1565b34801561085757600080fd5b506103ed7f00000000000000000000000000000000000000000000000000354a6ba7a1800081565b34801561088b57600080fd5b5061036261089a366004614251565b612bab565b3480156108ab57600080fd5b506103386108ba366004613fcc565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108f457600080fd5b5061038f736811f7fe9ea0b3d8ee02bdbd49c62abffe068a8481565b34801561091c57600080fd5b506103ba61092b366004613f92565b612c7d565b34801561093c57600080fd5b506103ed7f000000000000000000000000000000000000000000000000006a94d74f43000081565b34801561097057600080fd5b5061036261097f366004614251565b612d5c565b60006001600160e01b0319821663780e9d6360e01b14806109a957506109a982612db2565b92915050565b6060600080546109be90614813565b80601f01602080910402602001604051908101604052809291908181526020018280546109ea90614813565b8015610a375780601f10610a0c57610100808354040283529160200191610a37565b820191906000526020600020905b815481529060010190602001808311610a1a57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610abf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6002600a541415610b2e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab6565b6002600a5561ffff7f000000000000000000000000000000000000000000000000000000000000000016158015610b8c57507f00000000000000000000000000000000000000000000000000000000000022b8610b8a60085490565b105b80610bc65750600b5461ffff7f00000000000000000000000000000000000000000000000000000000000000008116600160a01b90920416105b610c125760405162461bcd60e51b815260206004820152601c60248201527f4e506173733a4d41585f414c4c4f434154494f4e5f52454143484544000000006044820152606401610ab6565b6040516331a9108f60e11b81526004810182905233906001600160a01b037f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d61690636352211e9060240160206040518083038186803b158015610c7457600080fd5b505afa158015610c88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cac9190613faf565b6001600160a01b031614610d025760405162461bcd60e51b815260206004820152601360248201527f4e506173733a494e56414c49445f4f574e4552000000000000000000000000006044820152606401610ab6565b7f00000000000000000000000000000000000000000000000000354a6ba7a180003414610d675760405162461bcd60e51b81526020600482015260136024820152724e506173733a494e56414c49445f505249434560681b6044820152606401610ab6565b61ffff7f00000000000000000000000000000000000000000000000000000000000000001615610dc857600b8054600160a01b900461ffff16906014610dac8361484e565b91906101000a81548161ffff021916908361ffff160217905550505b610dd23382612e02565b60408051338152602081018390527f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe910160405180910390a1506001600a55565b6000610e1e82611e0c565b9050806001600160a01b0316836001600160a01b03161415610e8c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ab6565b336001600160a01b0382161480610ea85750610ea881336108ba565b610f1a5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610ab6565b610f248383612e20565b505050565b60606000611004610fd67f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b0316630b2503a6866040518263ffffffff1660e01b8152600401610f8191815260200190565b60206040518083038186803b158015610f9957600080fd5b505afa158015610fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd1919061426a565b612e8e565b610fdf85612e8e565b604051602001610ff09291906142e7565b604051602081830303815290604052612fac565b905060006110146103e88361488b565b905060a481101561105b57505060408051808201909152601681527f4953544a202d20546865204c6f67697374696369616e00000000000000000000602082015292915050565b6101148110156110a157505060408051808201909152601481527f4553544a202d2054686520457865637574697665000000000000000000000000602082015292915050565b6101698110156110e757505060408051808201909152601381527f49535450202d205468652056697274756f736f00000000000000000000000000602082015292915050565b6101ba81101561112d57505060408051808201909152601381527f4953464a202d2054686520446566656e64657200000000000000000000000000602082015292915050565b61020681101561117357505060408051808201909152601581527f49534650202d2054686520416476656e74757265720000000000000000000000602082015292915050565b6102518110156111b957505060408051808201909152601181527f4553464a202d2054686520436f6e73756c000000000000000000000000000000602082015292915050565b6102968110156111ff57505060408051808201909152601681527f45534650202d2054686520456e7465727461696e657200000000000000000000602082015292915050565b6102d681101561124557505060408051808201909152601581527f454e4650202d205468652043616d706169676e65720000000000000000000000602082015292915050565b61030e81101561128b57505060408051808201909152601781527f45535450202d2054686520456e7472657072656e657572000000000000000000602082015292915050565b61033e8110156112d157505060408051808201909152601381527f494e5450202d20546865204c6f67696369616e00000000000000000000000000602082015292915050565b61036781101561131757505060408051808201909152601381527f494e4650202d20546865204d65646961746f7200000000000000000000000000602082015292915050565b61038f81101561135d57505060408051808201909152601281527f454e5450202d2054686520446562617465720000000000000000000000000000602082015292915050565b6103b08110156113a357505060408051808201909152601481527f494e544a202d2054686520417263686974656374000000000000000000000000602082015292915050565b6103cb8110156113e957505060408051808201909152601481527f454e544a202d2054686520436f6d6d616e646572000000000000000000000000602082015292915050565b6103db81101561142f57505060408051808201909152601681527f454e464a202d205468652050726f7461676f6e69737400000000000000000000602082015292915050565b505060408051808201909152601381527f494e464a202d20546865204164766f6361746500000000000000000000000000602082015292915050565b6114753382612fdd565b6114e75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610ab6565b610f248383836130d0565b736811f7fe9ea0b3d8ee02bdbd49c62abffe068a846108fc606461151747604361478e565b611521919061477a565b6040518115909202916000818181858888f19350505050158015611549573d6000803e3d6000fd5b506040517363e7c4170b38ffd6e2a9ac22ff4ab91e5e8c0265904780156108fc02916000818181858888f1935050505015801561158a573d6000803e3d6000fd5b50565b606060006115e5610fd67f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b0316639ec29b82866040518263ffffffff1660e01b8152600401610f8191815260200190565b905060006115f460328361488b565b6115ff906033614762565b9050605e81111561164657505060408051808201909152601b81527f4d656e74616c20466f727469747564653a205665727920486967680000000000602082015292915050565b61164f81612e8e565b60405160200161165f9190614437565b60405160208183030381529060405292505050919050565b60006116828361217d565b82106116f65760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610ab6565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60128054604051639347e43f60e01b81526004810184905260609291907f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031690639347e43f906024015b60206040518083038186803b15801561178957600080fd5b505afa15801561179d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c1919061426a565b6117cb919061488b565b815481106117db576117db6148e1565b9060005260206000200180546117f090614813565b80601f016020809104026020016040519081016040528092919081815260200182805461181c90614813565b80156118695780601f1061183e57610100808354040283529160200191611869565b820191906000526020600020905b81548152906001019060200180831161184c57829003601f168201915b50505050509050919050565b610f24838383604051806020016040528060008152506127b5565b6002600a5414156118e35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab6565b6002600a5580602081111561193a5760405162461bcd60e51b815260206004820152600f60248201527f4e506173733a544f4f5f4c4152474500000000000000000000000000000000006044820152606401610ab6565b61ffff7f00000000000000000000000000000000000000000000000000000000000000001615801561199f57507f00000000000000000000000000000000000000000000000000000000000022b88161199260085490565b61199c9190614762565b11155b806119e55750600b5461ffff7f00000000000000000000000000000000000000000000000000000000000000008116916119e2918491600160a01b900416614762565b11155b611a315760405162461bcd60e51b815260206004820152601c60248201527f4e506173733a4d41585f414c4c4f434154494f4e5f52454143484544000000006044820152606401610ab6565b611a5b817f00000000000000000000000000000000000000000000000000354a6ba7a1800061478e565b3414611a9f5760405162461bcd60e51b81526020600482015260136024820152724e506173733a494e56414c49445f505249434560681b6044820152606401610ab6565b60005b81811015611bc957337f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b0316636352211e868685818110611aec57611aec6148e1565b905060200201356040518263ffffffff1660e01b8152600401611b1191815260200190565b60206040518083038186803b158015611b2957600080fd5b505afa158015611b3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b619190613faf565b6001600160a01b031614611bb75760405162461bcd60e51b815260206004820152601360248201527f4e506173733a494e56414c49445f4f574e4552000000000000000000000000006044820152606401610ab6565b80611bc181614870565b915050611aa2565b5061ffff7f00000000000000000000000000000000000000000000000000000000000000001615611c2e5780600b60148282829054906101000a900461ffff16611c139190614745565b92506101000a81548161ffff021916908361ffff1602179055505b60005b81811015611cca57611c5b33858584818110611c4f57611c4f6148e1565b90506020020135612e02565b7f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe33858584818110611c8f57611c8f6148e1565b604080516001600160a01b0390951685526020918202939093013590840152500160405180910390a180611cc281614870565b915050611c31565b50506001600a555050565b6000611ce060085490565b8210611d545760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610ab6565b60088281548110611d6757611d676148e1565b90600052602060002001549050919050565b600b546001600160a01b03163314611dd35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b600b8054911515600160b01b027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000818152600260205260408120546001600160a01b0316806109a95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610ab6565b60606000611eaa610fd6610fd18561328f565b600d8054919250600091611ebe908461488b565b81548110611ece57611ece6148e1565b906000526020600020018054611ee390614813565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0f90614813565b8015611f5c5780601f10611f3157610100808354040283529160200191611f5c565b820191906000526020600020905b815481529060010190602001808311611f3f57829003601f168201915b50505050509050611fc0611fb77f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031663667386f7876040518263ffffffff1660e01b8152600401610f8191815260200190565b610fdf86612e8e565b600e8054919350600091611fd4908561488b565b81548110611fe457611fe46148e1565b906000526020600020018054611ff990614813565b80601f016020809104026020016040519081016040528092919081815260200182805461202590614813565b80156120725780601f1061204757610100808354040283529160200191612072565b820191906000526020600020905b81548152906001019060200180831161205557829003601f168201915b5050505050905061209561208586612e8e565b604051602001610ff091906142cb565b600f80549194506000916120a9908661488b565b815481106120b9576120b96148e1565b9060005260206000200180546120ce90614813565b80601f01602080910402602001604051908101604052809291908181526020018280546120fa90614813565b80156121475780601f1061211c57610100808354040283529160200191612147565b820191906000526020600020905b81548152906001019060200180831161212a57829003601f168201915b50505050509050828282604051602001612163939291906143d6565b604051602081830303815290604052945050505050919050565b60006001600160a01b0382166121fb5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610ab6565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146122715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b61227b60006137b3565b565b606060006122d5610fd67f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031663fa7f71b1866040518263ffffffff1660e01b8152600401610f8191815260200190565b60108054919250906122e7908361488b565b815481106122f7576122f76148e1565b90600052602060002001805461230c90614813565b80601f016020809104026020016040519081016040528092919081815260200182805461233890614813565b80156123855780601f1061235a57610100808354040283529160200191612385565b820191906000526020600020905b81548152906001019060200180831161236857829003601f168201915b5050505050915050919050565b6000806123e361ffff7f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000022b86147d0565b600b5490915060009061ffff600160a01b9091041661240160085490565b61240b91906147d0565b905061241781836147d0565b9250505090565b600b546001600160a01b031633146124785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b600b546040516001600160a01b03909116904780156108fc02916000818181858888f1935050505015801561158a573d6000803e3d6000fd5b60008061250261ffff7f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000022b86147d0565b9050612510816122b8614762565b91505090565b6060600180546109be90614813565b6002600a5414156125785760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ab6565b6002600a55600b54600160b01b900460ff166125d65760405162461bcd60e51b815260206004820152601d60248201527f4e506173733a5055424c49435f53414c455f49535f4e4f545f4f50454e0000006044820152606401610ab6565b60006125e0612392565b1161262d5760405162461bcd60e51b815260206004820152601c60248201527f4e506173733a4d41585f414c4c4f434154494f4e5f52454143484544000000006044820152606401610ab6565b60008111801561263f57506122b88111155b61268b5760405162461bcd60e51b815260206004820152601060248201527f4e506173733a494e56414c49445f4944000000000000000000000000000000006044820152606401610ab6565b7f000000000000000000000000000000000000000000000000006a94d74f4300003414610dc85760405162461bcd60e51b81526020600482015260136024820152724e506173733a494e56414c49445f505249434560681b6044820152606401610ab6565b6001600160a01b0382163314156127495760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ab6565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6127bf3383612fdd565b6128315760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610ab6565b61283d84848484613805565b50505050565b600b5460009061287e90600160a01b900461ffff167f00000000000000000000000000000000000000000000000000000000000000006147ad565b61ffff16905090565b606060006128df610fd67f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b0316638c921d06866040518263ffffffff1660e01b8152600401610f8191815260200190565b60118054919250906122e7908361488b565b60606128fb613f55565b6040518061016001604052806101268152602001614a046101269139815261292283611e97565b8160016020020181905250604051806060016040528060288152602001614b9360289139604082015261295483612d5c565b6060808301919091526040805191820190526028808252614939602083013960808201526129818361227d565b60a0820152604080516060810190915260288082526149b3602083013960c08201526129ac8361158d565b60e0820152604080516060810190915260298082526149db60208301396101008201526129d883610f29565b6101208201526040805160608101909152602980825261498a6020830139610140820152612a0583612bab565b61016082015260408051606081019091526029808252614b2a6020830139610180820152612a3283612887565b6101a08201526040805160608101909152602980825261496160208301396101c0820152612a5f8361171f565b6101e0820152604080518082018252600d81527f3c2f746578743e3c2f7376673e00000000000000000000000000000000000000602080830191909152610200840191909152825181840151838501516060860151608087015160a088015160c089015160e08a01516101008b0151995160009a612adf9a909101614316565b60408051808303601f19018152908290526101208401516101408501516101608601516101808701516101a08801516101c08901516101e08a01516102008b0151979950612b32988a9890602001614316565b60405160208183030381529060405290506000612b7f612b5186612e8e565b612b5a84613883565b604051602001612b6b9291906144c1565b604051602081830303815290604052613883565b905080604051602001612b92919061447c565b60408051601f1981840301815291905295945050505050565b60606000612c03610fd67f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b03166342d9d876866040518263ffffffff1660e01b8152600401610f8191815260200190565b90506000612c1260328361488b565b612c1d906033614762565b9050605e811115612c6457505060408051808201909152601a81527f41696d2041636375726163793a20536861727073686f6f746572000000000000602082015292915050565b612c6d81612e8e565b60405160200161165f91906146b1565b600b546001600160a01b03163314612cd75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ab6565b6001600160a01b038116612d535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ab6565b61158a816137b3565b600c80546040516322a8007f60e21b81526004810184905260609291907f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031690638aa001fc90602401611771565b60006001600160e01b031982166380ac58cd60e01b1480612de357506001600160e01b03198216635b5e139f60e01b145b806109a957506301ffc9a760e01b6001600160e01b03198316146109a9565b612e1c8282604051806020016040528060008152506139e9565b5050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612e5582611e0c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b606081612eb25750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612edc5780612ec681614870565b9150612ed59050600a8361477a565b9150612eb6565b60008167ffffffffffffffff811115612ef757612ef76148f7565b6040519080825280601f01601f191660200182016040528015612f21576020820181803683370190505b5090505b8415612fa457612f366001836147d0565b9150612f43600a8661488b565b612f4e906030614762565b60f81b818381518110612f6357612f636148e1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612f9d600a8661477a565b9450612f25565b949350505050565b600081604051602001612fbf91906142cb565b60408051601f19818403018152919052805160209091012092915050565b6000818152600260205260408120546001600160a01b03166130565760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610ab6565b600061306183611e0c565b9050806001600160a01b0316846001600160a01b0316148061309c5750836001600160a01b031661309184610a41565b6001600160a01b0316145b80612fa457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16612fa4565b826001600160a01b03166130e382611e0c565b6001600160a01b03161461315f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610ab6565b6001600160a01b0382166131c15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ab6565b6131cc838383613a67565b6131d7600082612e20565b6001600160a01b03831660009081526003602052604081208054600192906132009084906147d0565b90915550506001600160a01b038216600090815260036020526040812080546001929061322e908490614762565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040516322a8007f60e21b81526004810182905260009081906001600160a01b037f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d61690638aa001fc9060240160206040518083038186803b1580156132f457600080fd5b505afa158015613308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061332c919061426a565b60405163667386f760e01b8152600481018590527f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b03169063667386f79060240160206040518083038186803b15801561338c57600080fd5b505afa1580156133a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133c4919061426a565b6133ce9190614762565b60405163fa7f71b160e01b8152600481018590529091507f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b03169063fa7f71b19060240160206040518083038186803b15801561343157600080fd5b505afa158015613445573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613469919061426a565b6134739082614762565b604051634f614dc160e11b8152600481018590529091507f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031690639ec29b829060240160206040518083038186803b1580156134d657600080fd5b505afa1580156134ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061350e919061426a565b6135189082614762565b60405163059281d360e11b8152600481018590529091507f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031690630b2503a69060240160206040518083038186803b15801561357b57600080fd5b505afa15801561358f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b3919061426a565b6135bd9082614762565b60405163216cec3b60e11b8152600481018590529091507f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b0316906342d9d8769060240160206040518083038186803b15801561362057600080fd5b505afa158015613634573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613658919061426a565b6136629082614762565b6040516346490e8360e11b8152600481018590529091507f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031690638c921d069060240160206040518083038186803b1580156136c557600080fd5b505afa1580156136d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136fd919061426a565b6137079082614762565b604051639347e43f60e01b8152600481018590529091507f00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d66001600160a01b031690639347e43f9060240160206040518083038186803b15801561376a57600080fd5b505afa15801561377e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137a2919061426a565b6137ac9082614762565b9392505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6138108484846130d0565b61381c84848484613b1f565b61283d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ab6565b8051606090806138a3575050604080516020810190915260008152919050565b600060036138b2836002614762565b6138bc919061477a565b6138c790600461478e565b905060006138d6826020614762565b67ffffffffffffffff8111156138ee576138ee6148f7565b6040519080825280601f01601f191660200182016040528015613918576020820181803683370190505b5090506000604051806060016040528060408152602001614b53604091399050600181016020830160005b868110156139a4576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101613943565b5060038606600181146139be57600281146139cf576139db565b613d3d60f01b6001198301526139db565b603d60f81b6000198301525b505050918152949350505050565b6139f38383613c77565b613a006000848484613b1f565b610f245760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ab6565b6001600160a01b038316613ac257613abd81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613ae5565b816001600160a01b0316836001600160a01b031614613ae557613ae58382613dc5565b6001600160a01b038216613afc57610f2481613e62565b826001600160a01b0316826001600160a01b031614610f2457610f248282613f11565b60006001600160a01b0384163b15613c6c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613b639033908990889088906004016146f6565b602060405180830381600087803b158015613b7d57600080fd5b505af1925050508015613bad575060408051601f3d908101601f19168201909252613baa91810190614234565b60015b613c52573d808015613bdb576040519150601f19603f3d011682016040523d82523d6000602084013e613be0565b606091505b508051613c4a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610ab6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612fa4565b506001949350505050565b6001600160a01b038216613ccd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ab6565b6000818152600260205260409020546001600160a01b031615613d325760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ab6565b613d3e60008383613a67565b6001600160a01b0382166000908152600360205260408120805460019290613d67908490614762565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001613dd28461217d565b613ddc91906147d0565b600083815260076020526040902054909150808214613e2f576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613e74906001906147d0565b60008381526009602052604081205460088054939450909284908110613e9c57613e9c6148e1565b906000526020600020015490508060088381548110613ebd57613ebd6148e1565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613ef557613ef56148cb565b6001900381819060005260206000200160009055905550505050565b6000613f1c8361217d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6040518061022001604052806011905b6060815260200190600190039081613f655790505090565b80358015158114613f8d57600080fd5b919050565b600060208284031215613fa457600080fd5b81356137ac8161490d565b600060208284031215613fc157600080fd5b81516137ac8161490d565b60008060408385031215613fdf57600080fd5b8235613fea8161490d565b91506020830135613ffa8161490d565b809150509250929050565b60008060006060848603121561401a57600080fd5b83356140258161490d565b925060208401356140358161490d565b929592945050506040919091013590565b6000806000806080858703121561405c57600080fd5b84356140678161490d565b935060208501356140778161490d565b925060408501359150606085013567ffffffffffffffff8082111561409b57600080fd5b818701915087601f8301126140af57600080fd5b8135818111156140c1576140c16148f7565b604051601f8201601f19908116603f011681019083821181831017156140e9576140e96148f7565b816040528281528a602084870101111561410257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561413957600080fd5b82356141448161490d565b915061415260208401613f7d565b90509250929050565b6000806040838503121561416e57600080fd5b82356141798161490d565b946020939093013593505050565b6000806020838503121561419a57600080fd5b823567ffffffffffffffff808211156141b257600080fd5b818501915085601f8301126141c657600080fd5b8135818111156141d557600080fd5b8660208260051b85010111156141ea57600080fd5b60209290920196919550909350505050565b60006020828403121561420e57600080fd5b6137ac82613f7d565b60006020828403121561422957600080fd5b81356137ac81614922565b60006020828403121561424657600080fd5b81516137ac81614922565b60006020828403121561426357600080fd5b5035919050565b60006020828403121561427c57600080fd5b5051919050565b6000815180845261429b8160208601602086016147e7565b601f01601f19169290920160200192915050565b600081516142c18185602086016147e7565b9290920192915050565b600082516142dd8184602087016147e7565b9190910192915050565b600083516142f98184602088016147e7565b83519083019061430d8183602088016147e7565b01949350505050565b60008a51614328818460208f016147e7565b8a5161433a8183860160208f016147e7565b8a51918401019061434f818360208e016147e7565b8951910190614362818360208d016147e7565b88516143748183850160208d016147e7565b885192909101019061438a818360208b016147e7565b865161439c8183850160208b016147e7565b86519290910101906143b28183602089016147e7565b84516143c481838501602089016147e7565b9101019b9a5050505050505050505050565b600084516143e88184602089016147e7565b61101160f11b90830190815284516144078160028401602089016147e7565b61011160f51b60029290910191820152835161442a8160048401602088016147e7565b0160040195945050505050565b7f4d656e74616c20466f727469747564653a20000000000000000000000000000081526000825161446f8160128501602087016147e7565b9190910160120192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516144b481601d8501602087016147e7565b91909101601d0192915050565b7f7b226e616d65223a2022446972747920427573696e65737320436861726163748152636572202360e01b6020820152600083516145068160248501602088016147e7565b7f222c20226465736372697074696f6e223a202257656c636f6d6520746f2044696024918401918201527f72747920427573696e6573732c2061207669727475616c20776f726c64206f6660448201527f206372696d652e205468657265206973206f6e6c79206f6e652063686f69636560648201527f2e204765742072696368206f722064696520747279696e672e2053746172742060848201527f612067616e672c206571756970207468656d207769746820776561706f6e732c60a48201527f207075726368617365206c616e642c206372656174652070726f66697461626c60c48201527f6520627573696e65737365732c20636c65616e20796f7572206d6f6e65792c2060e48201527f616e64207269736520746f2074686520746f70206f662074686520666f6f64206101048201527f636861696e2e222c2022696d616765223a2022646174613a696d6167652f73766101248201527f672b786d6c3b6261736536342c000000000000000000000000000000000000006101448201526146a861469a6101518301866142af565b61227d60f01b815260020190565b95945050505050565b7f41696d2041636375726163793a200000000000000000000000000000000000008152600082516146e981600e8501602087016147e7565b91909101600e0192915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526147286080830184614283565b9695505050505050565b6020815260006137ac6020830184614283565b600061ffff80831681851680830382111561430d5761430d61489f565b600082198211156147755761477561489f565b500190565b600082614789576147896148b5565b500490565b60008160001904831182151516156147a8576147a861489f565b500290565b600061ffff838116908316818110156147c8576147c861489f565b039392505050565b6000828210156147e2576147e261489f565b500390565b60005b838110156148025781810151838201526020016147ea565b8381111561283d5750506000910152565b600181811c9082168061482757607f821691505b6020821081141561484857634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156148665761486661489f565b6001019392505050565b60006000198214156148845761488461489f565b5060010190565b60008261489a5761489a6148b5565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461158a57600080fd5b6001600160e01b03198116811461158a57600080fdfe3c2f746578743e3c7465787420783d2231302220793d2236302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223136302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223132302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d2238302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223130302220636c6173733d2262617365223e3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d202e6e616d65207b746578742d6465636f726174696f6e3a20756e6465726c696e653b7d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365206e616d65223e3c2f746578743e3c7465787420783d2231302220793d223134302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173733d2262617365223ea164736f6c6343000806000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d6
-----Decoded View---------------
Arg [0] : _nContractAddress (address): 0x05a46f1E545526FB803FF974C790aCeA34D1f2D6
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000005a46f1e545526fb803ff974c790acea34d1f2d6
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.