Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- KavalandCitizens
- Optimization enabled
- true
- Compiler version
- v0.8.18+commit.87f61d96
- Optimization runs
- 2
- EVM Version
- default
- Verified at
- 2023-06-22T20:31:37.941023Z
Contract source code
// SPDX-License-Identifier: MIT // KAVARIANS pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); function decimals() external view returns (uint8); function mint(address to, uint256 amount) external; } /** * @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); } /** * @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; } /** * @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); } } /* * @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; } } /** * @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); } } /** * @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; } } /** * @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); } /** * @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); } /** * @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); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private 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); } } } } /** * @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; } } /** * @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(to).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 {} } /** * @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); } /** * @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(); } } interface IKavalandCitizenURI { function tokenURI(uint256 tokenId) external view returns (string memory); } interface ICitizenship { function getLocIndex(uint256 tokenId) external view returns (uint256[2] memory); } contract KavalandCitizens is ERC721Enumerable, ReentrancyGuard, Ownable { error NotTheOwner(); string public TITLE = "Kavarian"; IKavalandCitizenURI uri = IKavalandCitizenURI(0x35acb1Ba8D22f6D9af6527c3792445C734C42ee7); function changeURIaddress(address newURIaddress) public onlyOwner { uri = IKavalandCitizenURI(newURIaddress); } ICitizenship ship = ICitizenship(0x9FE39C5837943987c290CA28F19130E44450FA38); function changeShipAddress(address newShipAddress) public onlyOwner { ship = ICitizenship(newShipAddress); } //tracks the nextTokenId for minting uint256 public nextTokenId = 0; address public land_token = 0x84dB7C9398716E9132601df75B4685e02C869Efb; function changeLandToken(address newLandToken) public onlyOwner { land_token = newLandToken; } // the tax manager address address payable public taxManager = payable(0x0d64E4dC1283d3A4A5F7aF3f9D58128f6dFC0D6A); function changeTaxManager(address payable newTaxManager) public onlyOwner { taxManager = newTaxManager; } // the dev address address payable public devAddy = payable(0x8DE3c3891268502F77DB7E876d727257DEc0F852); function changeDevAddy(address payable newDevAddy) public onlyOwner { devAddy = newDevAddy; } // the dev tax in basis points ( default: 5% = 500 ) // >> the tax charged on the Stablecoin fee and sent to the dev uint256 public devCostTaxBasisPoints = 500; function changeDevTax(uint256 newTax) public onlyOwner { devCostTaxBasisPoints = newTax; } error DidNotSendKAVAToTaxManager(); error DidNotSendKAVAToDev(); function disperse() public payable { // send FTM fee to the Tax Manager uint256 devTax = msg.value * devCostTaxBasisPoints / 10000; (bool sentManager, ) = taxManager.call{value: msg.value - devTax}(""); if (!sentManager) revert DidNotSendKAVAToTaxManager(); // send FTM fee to your boy Maxus (bool sentDev, ) = devAddy.call{value: devTax}(""); if (!sentDev) revert DidNotSendKAVAToDev(); } // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // pseudo-randmoness --------------------------------------------------------- function _kek(string memory input) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))); } function _kekStrength(string memory input) internal pure returns (uint256) { return _kek(input) % 100001; } function _quantizedKek(string memory input) internal pure returns (uint256) { uint256 k = _kekStrength(input); if (k < 65001) { return 0; } else if (k > 65000 && k < 80001) { return 1; } else if (k > 80000 && k < 90001) { return 2; } else if (k > 90000 && k < 95001) { return 3; } else if (k > 95000 && k < 98001) { return 4; } else if (k > 98000 && k < 100000) { return 5; } else { return 6; } } function _propGenerator(uint256 tokenId, string memory property) internal pure returns (uint256) { return _quantizedKek(string(abi.encodePacked(toString(tokenId),"Kavarian", property))); } function _statGenerator(uint256 tokenId, string memory property) internal pure returns (uint256) { return _kekStrength(string(abi.encodePacked(toString(tokenId),"Kavarian", property))); } // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // dynamic titles --------------------------------------------------------- string[5] public titles = [ "Duke", "Earl", "Baron", "Land Owner", "Commoner" ]; uint256[5] public titleBreakpoints = [ 1000e18, 100e18, 10e18, 1e18, 0 ]; function _getLandOwnership(uint256 tokenId) internal view returns (uint256) { return IERC20(land_token).balanceOf(ownerOf(tokenId)); } function _getTitle(uint256 tokenId) internal view returns (string memory) { uint256 land = _getLandOwnership(tokenId); if (land > titleBreakpoints[0]) { return titles[0]; } else if (land > titleBreakpoints[1]) { return titles[1]; } else if (land > titleBreakpoints[2]) { return titles[2]; } else if (land > titleBreakpoints[3]) { return titles[3]; } else { return titles[4]; } } function getTitle(uint256 tokenId) public view returns (string memory) { return _getTitle(tokenId); } // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // properties and dynamic stats ---------------------------------------------- string[3] public properties = [ "Attractiveness", // determines if the child bearer will accept advances "Fertility", // determines how many children they can bear "Intelligence" // determines how much UBI they earn ]; function getPropetyList() external view returns (string[3] memory) { return properties; } string[6] public stats = [ "Strength", "Speed", "Stamina", "Dexterity", "Wisdom", "Charisma" ]; string[7] public attractiveness = [ "Mediocre", "Attractive", "Kinda Pretty", "Pretty", "Very Pretty", "Beautiful", "Drop Dead Gorgeous" ]; string[7] public fertility = [ "Infertile", "1 child", "2 children", "3 children", "4 children", "5 children", "42 children" ]; string[7] public intelligence = [ "Average", // 65% "Above Average", // 15% "Smart", // 10% "Very Smart", // 5% "Brilliant",// 3% "Genius", // 2% "Supergenius" // 1 in 100,000 ]; function _getProperties(uint256 tokenId) internal view returns (uint256[3] memory) { uint256[3] memory props; props[0] = _propGenerator(tokenId, properties[0]); props[1] = _propGenerator(tokenId, properties[1]); props[2] = _propGenerator(tokenId, properties[2]); return props; } function getProperties(uint256 tokenId) public view returns (uint256[3] memory) { return _getProperties(tokenId); } function _getStats(uint256 tokenId) internal view returns (uint256[6] memory) { uint256[6] memory statvals; statvals[0] = _statGenerator(tokenId, stats[0]); statvals[1] = _statGenerator(tokenId, stats[1]); statvals[2] = _statGenerator(tokenId, stats[2]); statvals[3] = _statGenerator(tokenId, stats[3]); statvals[4] = _statGenerator(tokenId, stats[4]); statvals[5] = _statGenerator(tokenId, stats[5]); return statvals; } function getStats(uint256 tokenId) external view returns (uint256[6] memory) { return _getStats(tokenId); } function _getNamedProperties(uint256 tokenId) internal view returns (string[3] memory) { string[3] memory props; uint256[3] memory p = _getProperties(tokenId); props[0] = attractiveness[p[0]]; props[1] = fertility[p[1]]; props[2] = intelligence[p[2]]; return props; } function getNamedProperties(uint256 tokenId) external view returns (string[3] memory) { return _getNamedProperties(tokenId); } mapping (uint256 => uint256[6]) public statIncreaseById; function _getAdjustedStats (uint256 tokenId) internal view returns (uint256[6] memory) { uint256[6] memory adjstats; adjstats[0] = _getStats(tokenId)[0] + statIncreaseById[tokenId][0]; adjstats[1] = _getStats(tokenId)[1] + statIncreaseById[tokenId][1]; adjstats[2] = _getStats(tokenId)[2] + statIncreaseById[tokenId][2]; adjstats[3] = _getStats(tokenId)[3] + statIncreaseById[tokenId][3]; adjstats[4] = _getStats(tokenId)[4] + statIncreaseById[tokenId][4]; adjstats[5] = _getStats(tokenId)[5] + statIncreaseById[tokenId][5]; return adjstats; } function getAdjustedStats (uint256 tokenId) public view returns (uint256[6] memory) { return _getAdjustedStats(tokenId); } // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // Naming -------------------------------------------------------------------- mapping (uint256 => string) public nameById; mapping (uint256 => uint256) public nameChangeCountById; function _getName (uint256 tokenId) internal view returns (string memory) { return nameById[tokenId]; } function getName (uint256 tokenId) public view returns (string memory) { return _getName(tokenId); } function _getNameChangeCount (uint256 tokenId) internal view returns (uint256) { return nameChangeCountById[tokenId]; } function getNameChangeCount (uint256 tokenId) public view returns (uint256) { return _getNameChangeCount(tokenId); } function _getNameChangeCost (uint256 tokenId) internal view returns (uint256) { return _getNameChangeCount(tokenId) * 10 ** _getNameChangeCount(tokenId) * 10 ** 18; } function getNameChangeCost (uint256 tokenId) public view returns (uint256) { return _getNameChangeCost(tokenId); } error IncorrectValue(); function setName (uint256 tokenId, string memory name) public payable returns (string memory) { if (ownerOf(tokenId) != msg.sender) revert NotTheOwner(); if (msg.value != _getNameChangeCost(tokenId)) revert IncorrectValue(); disperse(); nameById[tokenId] = name; return name; } // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // dynamic stats ------------------------------------------------------------- mapping (uint256 => uint256[6]) public statIncreaseTimesById; function _getStatIncreaseTime(uint256 tokenId, uint256 statId) internal view returns (uint256) { return statIncreaseTimesById[tokenId][statId]; } error NotCitizen(); error StatIsMaxed(); error StatTrainedRecently(); function statActivity_increaseStrength (uint256 tokenId) public { if (ownerOf(tokenId) != msg.sender) revert NotTheOwner(); if (ship.getLocIndex(tokenId)[0] != 1 || ship.getLocIndex(tokenId)[1] != 0) revert NotCitizen(); if (_getAdjustedStats(tokenId)[0] + 1 > 100000) revert StatIsMaxed(); if (_getStatIncreaseTime(tokenId, 0) + 20 >= block.timestamp) revert StatTrainedRecently(); statIncreaseById[tokenId][0] = statIncreaseById[tokenId][0] + 1; statIncreaseTimesById[tokenId][0] = block.timestamp; } function statActivity_increaseSpeed (uint256 tokenId) public { if (ownerOf(tokenId) != msg.sender) revert NotTheOwner(); if (ship.getLocIndex(tokenId)[0] != 1 || ship.getLocIndex(tokenId)[1] != 0) revert NotCitizen(); if (_getAdjustedStats(tokenId)[1] + 1 > 100000) revert StatIsMaxed(); if (_getStatIncreaseTime(tokenId, 1) + 20 >= block.timestamp) revert StatTrainedRecently(); statIncreaseById[tokenId][1] = statIncreaseById[tokenId][1] + 1; statIncreaseTimesById[tokenId][1] = block.timestamp; } function statActivity_increaseStamina(uint256 tokenId) public { if (ownerOf(tokenId) != msg.sender) revert NotTheOwner(); if (ship.getLocIndex(tokenId)[0] != 1 || ship.getLocIndex(tokenId)[1] != 0) revert NotCitizen(); if (_getAdjustedStats(tokenId)[2] + 1 > 100000) revert StatIsMaxed(); if (_getStatIncreaseTime(tokenId, 2) + 20 >= block.timestamp) revert StatTrainedRecently(); statIncreaseById[tokenId][2] = statIncreaseById[tokenId][2] + 1; statIncreaseTimesById[tokenId][2] = block.timestamp; } function statActivity_increaseDexterity (uint256 tokenId) public { if (ownerOf(tokenId) != msg.sender) revert NotTheOwner(); if (ship.getLocIndex(tokenId)[0] != 2 || ship.getLocIndex(tokenId)[1] != 0) revert NotCitizen(); if (_getAdjustedStats(tokenId)[3] + 1 > 100000) revert StatIsMaxed(); if (_getStatIncreaseTime(tokenId, 3) + 1 days >= block.timestamp) revert StatTrainedRecently(); statIncreaseById[tokenId][3] = statIncreaseById[tokenId][3] + 1; statIncreaseTimesById[tokenId][3] = block.timestamp; } function statActivity_increaseWisdom (uint256 tokenId) public { if (ownerOf(tokenId) != msg.sender) revert NotTheOwner(); if (ship.getLocIndex(tokenId)[0] != 1 || ship.getLocIndex(tokenId)[1] != 1) revert NotCitizen(); if (_getAdjustedStats(tokenId)[4] + 1 > 100000) revert StatIsMaxed(); if (_getStatIncreaseTime(tokenId, 4) + 1 days >= block.timestamp) revert StatTrainedRecently(); statIncreaseById[tokenId][4] = statIncreaseById[tokenId][4] + 1; statIncreaseTimesById[tokenId][4] = block.timestamp; } function statActivity_increaseCharisma (uint256 tokenId) public { if (ownerOf(tokenId) != msg.sender) revert NotTheOwner(); if (ship.getLocIndex(tokenId)[0] != 3 || ship.getLocIndex(tokenId)[1] != 0) revert NotCitizen(); if (_getAdjustedStats(tokenId)[5] + 1 > 100000) revert StatIsMaxed(); if (_getStatIncreaseTime(tokenId, 5) + 1 days >= block.timestamp) revert StatTrainedRecently(); statIncreaseById[tokenId][5] = statIncreaseById[tokenId][5] + 1; statIncreaseTimesById[tokenId][5] = block.timestamp; } // get the tokenURI function tokenURI(uint256 tokenId) override public view returns (string memory) { return uri.tokenURI(tokenId); } // --------------------------------------------------------------------------- // --------------------------------------------------------------------------- // minting ------------------------------------------------------------------- function mint() public payable nonReentrant { if (nextTokenId > 20000) revert IncorrectValue(); if (msg.value < 10 ether) revert IncorrectValue(); uint256 tokenId = nextTokenId; disperse(); _safeMint(_msgSender(), tokenId); nextTokenId++; } function mintCheap() public payable nonReentrant { if (nextTokenId > 8000) revert IncorrectValue(); if (msg.value < 1 ether) revert IncorrectValue(); uint256 tokenId = nextTokenId; disperse(); _safeMint(_msgSender(), tokenId); nextTokenId++; } function mintCheaper() public payable nonReentrant { if (nextTokenId > 1000) revert IncorrectValue(); if (msg.value < 0.1 ether) revert IncorrectValue(); uint256 tokenId = nextTokenId; disperse(); _safeMint(_msgSender(), tokenId); nextTokenId++; } function mintFree() public payable nonReentrant { if (nextTokenId > 100) revert IncorrectValue(); uint256 tokenId = nextTokenId; _safeMint(_msgSender(), tokenId); nextTokenId++; } 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); } constructor() ERC721(TITLE, "kFOLK") Ownable() { } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"DidNotSendKAVAToDev","inputs":[]},{"type":"error","name":"DidNotSendKAVAToTaxManager","inputs":[]},{"type":"error","name":"IncorrectValue","inputs":[]},{"type":"error","name":"NotCitizen","inputs":[]},{"type":"error","name":"NotTheOwner","inputs":[]},{"type":"error","name":"StatIsMaxed","inputs":[]},{"type":"error","name":"StatTrainedRecently","inputs":[]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"approved","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"TITLE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"attractiveness","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeDevAddy","inputs":[{"type":"address","name":"newDevAddy","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeDevTax","inputs":[{"type":"uint256","name":"newTax","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeLandToken","inputs":[{"type":"address","name":"newLandToken","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeShipAddress","inputs":[{"type":"address","name":"newShipAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeTaxManager","inputs":[{"type":"address","name":"newTaxManager","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeURIaddress","inputs":[{"type":"address","name":"newURIaddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"devAddy","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"devCostTaxBasisPoints","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"disperse","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"fertility","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[6]","name":"","internalType":"uint256[6]"}],"name":"getAdjustedStats","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getName","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNameChangeCost","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNameChangeCount","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string[3]","name":"","internalType":"string[3]"}],"name":"getNamedProperties","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[3]","name":"","internalType":"uint256[3]"}],"name":"getProperties","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string[3]","name":"","internalType":"string[3]"}],"name":"getPropetyList","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[6]","name":"","internalType":"uint256[6]"}],"name":"getStats","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getTitle","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"intelligence","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"land_token","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mint","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mintCheap","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mintCheaper","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mintFree","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"nameById","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nameChangeCountById","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nextTokenId","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"properties","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"setName","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"name","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"statActivity_increaseCharisma","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"statActivity_increaseDexterity","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"statActivity_increaseSpeed","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"statActivity_increaseStamina","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"statActivity_increaseStrength","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"statActivity_increaseWisdom","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"statIncreaseById","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"statIncreaseTimesById","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"stats","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"taxManager","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"titleBreakpoints","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"titles","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenByIndex","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenOfOwnerByIndex","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
Contract Creation Code
0x60c0604052600860809081526725b0bb30b934b0b760c11b60a052600c9062000029908262000a52565b50600d80546001600160a01b03199081167335acb1ba8d22f6d9af6527c3792445c734c42ee717909155600e80548216739fe39c5837943987c290ca28f19130e44450fa381790556000600f556010805482167384db7c9398716e9132601df75b4685e02c869efb179055601180548216730d64e4dc1283d3a4a5f7af3f9d58128f6dfc0d6a17905560128054909116738de3c3891268502f77db7e876d727257dec0f8521790556101f46013556040805160e081018252600460a082018181526344756b6560e01b60c08401528252825180840184529081526311585c9b60e21b60208281019190915280830191909152825180840184526005808252642130b937b760d91b828401528385019190915283518085018552600a8152692630b7321027bbb732b960b11b8184015260608401528351808501909452600884526721b7b6b6b7b732b960c11b918401919091526080820192909252620001939160149190620007df565b506040805160a081018252683635c9adc5dea00000815268056bc75e2d631000006020820152678ac7230489e8000091810191909152670de0b6b3a7640000606082015260006080820152620001ee9060199060056200082f565b5060405180606001604052806040518060400160405280600e81526020016d417474726163746976656e65737360901b81525081526020016040518060400160405280600981526020016846657274696c69747960b81b81525081526020016040518060400160405280600c81526020016b496e74656c6c6967656e636560a01b815250815250601e9060036200028792919062000879565b506040805161010081018252600860c08201818152670a6e8e4cadccee8d60c31b60e0840152825282518084018452600581526414dc19595960da1b602082810191909152808401919091528351808501855260078152665374616d696e6160c81b818301528385015283518085018552600981526844657874657269747960b81b81830152606084015283518085018552600680825265576973646f6d60d01b8284015260808501919091528451808601909552918452674368617269736d6160c01b9084015260a0820192909252620003669160219190620008b7565b506040805161012081018252600860e08201908152674d6564696f63726560c01b610100830152815281518083018352600a8152694174747261637469766560b01b6020828101919091528083019190915282518084018452600c81526b4b696e64612050726574747960a01b818301528284015282518084018452600681526550726574747960d01b81830152606083015282518084018452600b81526a566572792050726574747960a81b8183015260808301528251808401845260098152681099585d5d1a599d5b60ba1b8183015260a08301528251808401909352601283527144726f70204465616420476f7267656f757360701b9083015260c08101919091526200047b906027906007620008f5565b506040805161012081018252600960e0820190815268496e66657274696c6560b81b6101008301528152815180830183526007808252660c4818da1a5b1960ca1b6020838101919091528084019290925283518085018552600a80825269191031b434b6323932b760b11b82850152848601919091528451808601865281815269199031b434b6323932b760b11b81850152606085015284518086018652818152691a1031b434b6323932b760b11b81850152608085015284518086018652908152691a9031b434b6323932b760b11b8184015260a08401528351808501909452600b84526a1a191031b434b6323932b760a91b9184019190915260c08201929092526200058d91602e9190620008f5565b506040805161012081018252600760e08201818152664176657261676560c81b610100840152825282518084018452600d81526c41626f7665204176657261676560981b6020828101919091528084019190915283518085018552600581526414db585c9d60da1b818301528385015283518085018552600a81526915995c9e4814db585c9d60b21b818301526060840152835180850185526009815268109c9a5b1b1a585b9d60ba1b81830152608084015283518085018552600681526547656e69757360d01b8183015260a08401528351808501909452600b84526a537570657267656e69757360a81b9084015260c0820192909252620006949160359190620008f5565b50348015620006a257600080fd5b50600c8054620006b290620009c3565b80601f0160208091040260200160405190810160405280929190818152602001828054620006e090620009c3565b8015620007315780601f10620007055761010080835404028352916020019162000731565b820191906000526020600020905b8154815290600101906020018083116200071357829003601f168201915b5050505050604051806040016040528060058152602001646b464f4c4b60d81b815250816000908162000765919062000a52565b50600162000774828262000a52565b50506001600a555062000787336200078d565b62000b1e565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82600581019282156200081d579160200282015b828111156200081d57825182906200080c908262000a52565b5091602001919060010190620007f3565b506200082b92915062000933565b5090565b82600581019282156200086b579160200282015b828111156200086b57825182906001600160481b031690559160200191906001019062000843565b506200082b92915062000954565b82600381019282156200081d579160200282015b828111156200081d5782518290620008a6908262000a52565b50916020019190600101906200088d565b82600681019282156200081d579160200282015b828111156200081d5782518290620008e4908262000a52565b5091602001919060010190620008cb565b82600781019282156200081d579160200282015b828111156200081d578251829062000922908262000a52565b509160200191906001019062000909565b808211156200082b5760006200094a82826200096b565b5060010162000933565b5b808211156200082b576000815560010162000955565b5080546200097990620009c3565b6000825580601f106200098a575050565b601f016020900490600052602060002090810190620009aa919062000954565b50565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620009d857607f821691505b602082108103620009f957634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000a4d57600081815260208120601f850160051c8101602086101562000a285750805b601f850160051c820191505b8181101562000a495782815560010162000a34565b5050505b505050565b81516001600160401b0381111562000a6e5762000a6e620009ad565b62000a868162000a7f8454620009c3565b84620009ff565b602080601f83116001811462000abe576000841562000aa55750858301515b600019600386901b1c1916600185901b17855562000a49565b600085815260208120601f198616915b8281101562000aef5788860151825594840194600190910190840162000ace565b508582101562000b0e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6142b08062000b2e6000396000f3fe6080604052600436106102c85760003560e01c806301ffc9a7146102cd5780630465382a1461030257806306fdde03146103265780630711856214610348578063076bba3f14610368578063081812fc1461038a578063095ea7b3146103b75780631249c58b146103d757806318160ddd146103df5780631ab97c63146103f45780631b8ca217146104145780631d72b9781461044157806323b872dd14610461578063248498311461048157806329570778146104a15780632bac45bb146104c15780632cda1bf7146104c95780632f745c59146104e95780633fc2156c14610509578063404f75601461052b57806342842e0e146105335780634d237730146105535780634f6ccce7146105735780635449d2c11461059357806361cc891f146105b35780636352211e146105d3578063641871f2146105f357806365e1c38914610620578063660a170914610640578063697509d9146106605780636b8ff5741461068057806370a08231146106a0578063715018a6146106c057806375794a3c146106d55780637b303965146106eb5780637daf33541461070b5780637ef838041461072b57806380e76bfd1461074057806388b6ff9c146107605780638ab53447146107685780638da5cb5b14610770578063929a79b11461078557806394ec074a146107a557806395d89b41146107c557806398d8bc4b146107da5780639d66d032146107fa578063a22cb4651461081a578063a37d29921461083a578063a48d94ec14610867578063ad217ae514610887578063b4afd4b5146108a7578063b88d4fde146108c7578063b8f742c4146108e7578063c87b56dd14610907578063cd0d51f814610927578063cd2dcc2e14610947578063d8ea0bf014610967578063defc211514610987578063e7b40881146109a7578063e985e9c5146109c7578063f2fde38b146109e7578063f7b1080814610a07578063fe55932a14610a27575b600080fd5b3480156102d957600080fd5b506102ed6102e8366004613879565b610a3a565b60405190151581526020015b60405180910390f35b34801561030e57600080fd5b5061031860135481565b6040519081526020016102f9565b34801561033257600080fd5b5061033b610a65565b6040516102f991906138e6565b34801561035457600080fd5b5061033b6103633660046138f9565b610af7565b34801561037457600080fd5b506103886103833660046138f9565b610b97565b005b34801561039657600080fd5b506103aa6103a53660046138f9565b610d88565b6040516102f99190613912565b3480156103c357600080fd5b506103886103d236600461393b565b610e15565b610388610f25565b3480156103eb57600080fd5b50600854610318565b34801561040057600080fd5b5061033b61040f3660046138f9565b610fcd565b34801561042057600080fd5b5061043461042f3660046138f9565b610fe6565b6040516102f99190613967565b34801561044d57600080fd5b5061031861045c3660046138f9565b610ff7565b34801561046d57600080fd5b5061038861047c366004613998565b611002565b34801561048d57600080fd5b5061038861049c3660046138f9565b611033565b3480156104ad57600080fd5b506012546103aa906001600160a01b031681565b610388611226565b3480156104d557600080fd5b5061033b6104e43660046138f9565b61129b565b3480156104f557600080fd5b5061031861050436600461393b565b6112ab565b34801561051557600080fd5b5061051e611341565b6040516102f991906139d9565b610388611408565b34801561053f57600080fd5b5061038861054e366004613998565b61147d565b34801561055f57600080fd5b506011546103aa906001600160a01b031681565b34801561057f57600080fd5b5061031861058e3660046138f9565b611498565b34801561059f57600080fd5b506010546103aa906001600160a01b031681565b3480156105bf57600080fd5b506103886105ce3660046138f9565b61152b565b3480156105df57600080fd5b506103aa6105ee3660046138f9565b61170b565b3480156105ff57600080fd5b5061061361060e3660046138f9565b611782565b6040516102f99190613a26565b34801561062c57600080fd5b5061031861063b366004613a4e565b611793565b34801561064c57600080fd5b5061031861065b366004613a4e565b6117b8565b34801561066c57600080fd5b5061038861067b366004613a70565b6117d4565b34801561068c57600080fd5b5061033b61069b3660046138f9565b611825565b3480156106ac57600080fd5b506103186106bb366004613a70565b611830565b3480156106cc57600080fd5b506103886118b7565b3480156106e157600080fd5b50610318600f5481565b3480156106f757600080fd5b506106136107063660046138f9565b6118f2565b34801561071757600080fd5b5061051e6107263660046138f9565b611903565b34801561073757600080fd5b5061033b611914565b34801561074c57600080fd5b5061038861075b3660046138f9565b611921565b610388611b12565b610388611c22565b34801561077c57600080fd5b506103aa611c79565b34801561079157600080fd5b5061033b6107a03660046138f9565b611c88565b3480156107b157600080fd5b506103886107c0366004613a70565b611c93565b3480156107d157600080fd5b5061033b611ce4565b3480156107e657600080fd5b506103886107f53660046138f9565b611cf3565b34801561080657600080fd5b506103186108153660046138f9565b611ee2565b34801561082657600080fd5b50610388610835366004613a8d565b611ef9565b34801561084657600080fd5b506103186108553660046138f9565b603e6020526000908152604090205481565b34801561087357600080fd5b506103886108823660046138f9565b611fb9565b34801561089357600080fd5b5061033b6108a23660046138f9565b611fed565b3480156108b357600080fd5b5061033b6108c23660046138f9565b611ffd565b3480156108d357600080fd5b506103886108e2366004613b76565b61200d565b3480156108f357600080fd5b50610388610902366004613a70565b612045565b34801561091357600080fd5b5061033b6109223660046138f9565b612096565b34801561093357600080fd5b5061033b6109423660046138f9565b612108565b34801561095357600080fd5b506103886109623660046138f9565b612118565b34801561097357600080fd5b50610388610982366004613a70565b612307565b34801561099357600080fd5b506103886109a2366004613a70565b612358565b3480156109b357600080fd5b506103186109c23660046138f9565b6123a9565b3480156109d357600080fd5b506102ed6109e2366004613bf5565b6123b4565b3480156109f357600080fd5b50610388610a02366004613a70565b6123e2565b348015610a1357600080fd5b5061033b610a223660046138f9565b612482565b61033b610a35366004613c23565b612492565b60006001600160e01b0319821663780e9d6360e01b1480610a5f5750610a5f82612515565b92915050565b606060008054610a7490613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa090613c7d565b8015610aed5780601f10610ac257610100808354040283529160200191610aed565b820191906000526020600020905b815481529060010190602001808311610ad057829003601f168201915b5050505050905090565b602e8160078110610b0757600080fd5b018054909150610b1690613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4290613c7d565b8015610b8f5780601f10610b6457610100808354040283529160200191610b8f565b820191906000526020600020905b815481529060010190602001808311610b7257829003601f168201915b505050505081565b33610ba18261170b565b6001600160a01b031614610bc8576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015610c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c349190613cb1565b516002141580610cb25750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015610c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cab9190613cb1565b6020015115155b15610cd0576040516331683e1d60e11b815260040160405180910390fd5b620186a0610cdd82612565565b60600151610cec906001613d5c565b1115610d0b5760405163d89cc92560e01b815260040160405180910390fd5b42610d1782600361268f565b610d249062015180613d5c565b10610d425760405163e36222f360e01b815260040160405180910390fd5b6000818152603c6020526040902060030154610d5f906001613d5c565b6000828152603c60205260409020600301556000818152603f6020526040902042906003015550565b6000610d93826126b7565b610df95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610e208261170b565b9050806001600160a01b0316836001600160a01b031603610e8d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610df0565b336001600160a01b0382161480610ea95750610ea981336123b4565b610f165760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610df0565b610f2083836126d4565b505050565b6002600a5403610f475760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f54614e201015610f7157604051636956f2ab60e11b815260040160405180910390fd5b678ac7230489e80000341015610f9a57604051636956f2ab60e11b815260040160405180910390fd5b600f54610fa5611b12565b610fb0335b82612742565b600f8054906000610fc083613da6565b90915550506001600a5550565b603d6020526000908152604090208054610b1690613c7d565b610fee613800565b610a5f82612760565b6000610a5f82612831565b61100c3382612843565b6110285760405162461bcd60e51b8152600401610df090613dbf565b610f2083838361290d565b3361103d8261170b565b6001600160a01b031614611064576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa1580156110ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d09190613cb1565b5160011415806111505750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111479190613cb1565b60200151600114155b1561116e576040516331683e1d60e11b815260040160405180910390fd5b620186a061117b82612565565b6080015161118a906001613d5c565b11156111a95760405163d89cc92560e01b815260040160405180910390fd5b426111b582600461268f565b6111c29062015180613d5c565b106111e05760405163e36222f360e01b815260040160405180910390fd5b6000818152603c60205260409020600401546111fd906001613d5c565b6000828152603c60205260409020600401556000818152603f6020526040902042906004015550565b6002600a54036112485760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f546103e8101561127257604051636956f2ab60e11b815260040160405180910390fd5b67016345785d8a0000341015610f9a57604051636956f2ab60e11b815260040160405180910390fd5b60148160058110610b0757600080fd5b60006112b683611830565b82106113185760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610df0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61134961381e565b6040805160608101909152601e60036000835b828210156113ff57838201805461137290613c7d565b80601f016020809104026020016040519081016040528092919081815260200182805461139e90613c7d565b80156113eb5780601f106113c0576101008083540402835291602001916113eb565b820191906000526020600020905b8154815290600101906020018083116113ce57829003601f168201915b50505050508152602001906001019061135c565b50505050905090565b6002600a540361142a5760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f54611f40101561145457604051636956f2ab60e11b815260040160405180910390fd5b670de0b6b3a7640000341015610f9a57604051636956f2ab60e11b815260040160405180910390fd5b610f208383836040518060200160405280600081525061200d565b60006114a360085490565b82106115065760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610df0565b6008828154811061151957611519613d30565b90600052602060002001549050919050565b336115358261170b565b6001600160a01b03161461155c576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa1580156115a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c89190613cb1565b5160011415806116465750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa15801561161b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163f9190613cb1565b6020015115155b15611664576040516331683e1d60e11b815260040160405180910390fd5b620186a061167182612565565b5161167d906001613d5c565b111561169c5760405163d89cc92560e01b815260040160405180910390fd5b426116a882600061268f565b6116b3906014613d5c565b106116d15760405163e36222f360e01b815260040160405180910390fd5b6000818152603c60205260409020546116eb906001613d5c565b6000918252603c6020908152604080842092909255603f90529020429055565b6000818152600260205260408120546001600160a01b031680610a5f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610df0565b61178a613845565b610a5f82612565565b603c60205281600052604060002081600681106117af57600080fd5b01549150829050565b603f60205281600052604060002081600681106117af57600080fd5b336117dd611c79565b6001600160a01b0316146118035760405162461bcd60e51b8152600401610df090613e10565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6060610a5f82612aa6565b60006001600160a01b03821661189b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610df0565b506001600160a01b031660009081526003602052604090205490565b336118c0611c79565b6001600160a01b0316146118e65760405162461bcd60e51b8152600401610df090613e10565b6118f06000612b48565b565b6118fa613845565b610a5f82612b9a565b61190b61381e565b610a5f82612c99565b600c8054610b1690613c7d565b3361192b8261170b565b6001600160a01b031614611952576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa15801561199a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119be9190613cb1565b516003141580611a3c5750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a359190613cb1565b6020015115155b15611a5a576040516331683e1d60e11b815260040160405180910390fd5b620186a0611a6782612565565b60a00151611a76906001613d5c565b1115611a955760405163d89cc92560e01b815260040160405180910390fd5b42611aa182600561268f565b611aae9062015180613d5c565b10611acc5760405163e36222f360e01b815260040160405180910390fd5b6000818152603c6020526040902060050154611ae9906001613d5c565b6000828152603c60205260409020600501556000818152603f6020526040902042906005015550565b600061271060135434611b259190613e45565b611b2f9190613e72565b6011549091506000906001600160a01b0316611b4b8334613e86565b604051600081818185875af1925050503d8060008114611b87576040519150601f19603f3d011682016040523d82523d6000602084013e611b8c565b606091505b5050905080611bae57604051630ce03cf760e21b815260040160405180910390fd5b6012546040516000916001600160a01b03169084908381818185875af1925050503d8060008114611bfb576040519150601f19603f3d011682016040523d82523d6000602084013e611c00565b606091505b5050905080610f205760405163b0cefee760e01b815260040160405180910390fd5b6002600a5403611c445760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f5460641015611c6d57604051636956f2ab60e11b815260040160405180910390fd5b600f54610fb033610faa565b600b546001600160a01b031690565b6060610a5f82612eeb565b33611c9c611c79565b6001600160a01b031614611cc25760405162461bcd60e51b8152600401610df090613e10565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b606060018054610a7490613c7d565b33611cfd8261170b565b6001600160a01b031614611d24576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d909190613cb1565b516001141580611e0e5750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611de3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e079190613cb1565b6020015115155b15611e2c576040516331683e1d60e11b815260040160405180910390fd5b620186a0611e3982612565565b60200151611e48906001613d5c565b1115611e675760405163d89cc92560e01b815260040160405180910390fd5b42611e7382600161268f565b611e7e906014613d5c565b10611e9c5760405163e36222f360e01b815260040160405180910390fd5b6000818152603c6020526040902060010154611eb9906001613d5c565b6000828152603c60205260409020600101556000818152603f6020526040902042906001015550565b60198160058110611ef257600080fd5b0154905081565b336001600160a01b03831603611f4d5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610df0565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b33611fc2611c79565b6001600160a01b031614611fe85760405162461bcd60e51b8152600401610df090613e10565b601355565b60218160068110610b0757600080fd5b60278160078110610b0757600080fd5b6120173383612843565b6120335760405162461bcd60e51b8152600401610df090613dbf565b61203f84848484612fe4565b50505050565b3361204e611c79565b6001600160a01b0316146120745760405162461bcd60e51b8152600401610df090613e10565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600d5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd90602401600060405180830381865afa1580156120e0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a5f9190810190613e99565b60358160078110610b0757600080fd5b336121228261170b565b6001600160a01b031614612149576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015612191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b59190613cb1565b5160011415806122335750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015612208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222c9190613cb1565b6020015115155b15612251576040516331683e1d60e11b815260040160405180910390fd5b620186a061225e82612565565b6040015161226d906001613d5c565b111561228c5760405163d89cc92560e01b815260040160405180910390fd5b4261229882600261268f565b6122a3906014613d5c565b106122c15760405163e36222f360e01b815260040160405180910390fd5b6000818152603c60205260409020600201546122de906001613d5c565b6000828152603c60205260409020600201556000818152603f6020526040902042906002015550565b33612310611c79565b6001600160a01b0316146123365760405162461bcd60e51b8152600401610df090613e10565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b33612361611c79565b6001600160a01b0316146123875760405162461bcd60e51b8152600401610df090613e10565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a5f82613017565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336123eb611c79565b6001600160a01b0316146124115760405162461bcd60e51b8152600401610df090613e10565b6001600160a01b0381166124765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610df0565b61247f81612b48565b50565b601e8160038110610b0757600080fd5b60603361249e8461170b565b6001600160a01b0316146124c5576040516336b6b89560e01b815260040160405180910390fd5b6124ce83613017565b34146124ed57604051636956f2ab60e11b815260040160405180910390fd5b6124f5611b12565b6000838152603d6020526040902061250d8382613f5d565b509092915050565b60006001600160e01b031982166380ac58cd60e01b148061254657506001600160e01b03198216635b5e139f60e01b145b80610a5f57506301ffc9a760e01b6001600160e01b0319831614610a5f565b61256d613845565b612575613845565b6000838152603c602052604090205461258d84612b9a565b516125989190613d5c565b81526000838152603c60205260409020600101546125b584612b9a565b602001516125c39190613d5c565b6020808301919091526000848152603c90915260409020600201546125e784612b9a565b604001516125f59190613d5c565b6040808301919091526000848152603c602052206003015461261684612b9a565b606001516126249190613d5c565b60608201526000838152603c602052604090206004015461264484612b9a565b608001516126529190613d5c565b60808201526000838152603c602052604090206005015461267284612b9a565b60a001516126809190613d5c565b8160055b602002015292915050565b6000828152603f6020526040812082600681106126ae576126ae613d30565b01549392505050565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906127098261170b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61275c828260405180602001604052806000815250613052565b5050565b612768613800565b612770613800565b61280883601e60005b01805461278590613c7d565b80601f01602080910402602001604051908101604052809291908181526020018280546127b190613c7d565b80156127fe5780601f106127d3576101008083540402835291602001916127fe565b820191906000526020600020905b8154815290600101906020018083116127e157829003601f168201915b5050505050613085565b815261281783601e6001612779565b602082015261282983601e6002612779565b816002612684565b6000908152603e602052604090205490565b600061284e826126b7565b6128af5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610df0565b60006128ba8361170b565b9050806001600160a01b0316846001600160a01b031614806128f55750836001600160a01b03166128ea84610d88565b6001600160a01b0316145b80612905575061290581856123b4565b949350505050565b826001600160a01b03166129208261170b565b6001600160a01b0316146129885760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610df0565b6001600160a01b0382166129ea5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610df0565b6129f58383836130c0565b612a006000826126d4565b6001600160a01b0383166000908152600360205260408120805460019290612a29908490613e86565b90915550506001600160a01b0382166000908152600360205260408120805460019290612a57908490613d5c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061425b83398151915291a4505050565b6000818152603d60205260409020805460609190612ac390613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612aef90613c7d565b8015612b3c5780601f10612b1157610100808354040283529160200191612b3c565b820191906000526020600020905b815481529060010190602001808311612b1f57829003601f168201915b50505050509050919050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612ba2613845565b612baa613845565b612c4283602160005b018054612bbf90613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612beb90613c7d565b8015612c385780601f10612c0d57610100808354040283529160200191612c38565b820191906000526020600020905b815481529060010190602001808311612c1b57829003601f168201915b5050505050613178565b8152612c518360216001612bb3565b6020820152612c638360216002612bb3565b6040820152612c758360216003612bb3565b6060820152612c878360216004612bb3565b60808201526126808360216005612bb3565b612ca161381e565b612ca961381e565b6000612cb484612760565b805190915060279060078110612ccc57612ccc613d30565b018054612cd890613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612d0490613c7d565b8015612d515780601f10612d2657610100808354040283529160200191612d51565b820191906000526020600020905b815481529060010190602001808311612d3457829003601f168201915b505050505082600060038110612d6957612d69613d30565b6020020152602e816001602002015160078110612d8857612d88613d30565b018054612d9490613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612dc090613c7d565b8015612e0d5780601f10612de257610100808354040283529160200191612e0d565b820191906000526020600020905b815481529060010190602001808311612df057829003601f168201915b505050505082600160038110612e2557612e25613d30565b6020020152604081015160359060078110612e4257612e42613d30565b018054612e4e90613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612e7a90613c7d565b8015612ec75780601f10612e9c57610100808354040283529160200191612ec7565b820191906000526020600020905b815481529060010190602001808311612eaa57829003601f168201915b505050505082600260038110612edf57612edf613d30565b60200201525092915050565b60606000612ef8836131ac565b601954909150811115612f9c57601460005b018054612f1690613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612f4290613c7d565b8015612f8f5780601f10612f6457610100808354040283529160200191612f8f565b820191906000526020600020905b815481529060010190602001808311612f7257829003601f168201915b5050505050915050919050565b601a54811115612faf5760146001612f0a565b601b54811115612fc25760146002612f0a565b601c54811115612fd55760146003612f0a565b60146004612f0a565b50919050565b612fef84848461290d565b612ffb84848484613226565b61203f5760405162461bcd60e51b8152600401610df09061401c565b600061302282612831565b61302d90600a614152565b61303683612831565b6130409190613e45565b610a5f90670de0b6b3a7640000613e45565b61305c8383613327565b6130696000848484613226565b610f205760405162461bcd60e51b8152600401610df09061401c565b60006130b961309384613453565b836040516020016130a592919061415e565b604051602081830303815290604052613553565b9392505050565b6001600160a01b03831661311b5761311681600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61313e565b816001600160a01b0316836001600160a01b03161461313e5761313e8382613626565b6001600160a01b03821661315557610f20816136c3565b826001600160a01b0316826001600160a01b031614610f2057610f208282613772565b60006130b961318684613453565b8360405160200161319892919061415e565b6040516020818303038152906040526137b6565b6010546000906001600160a01b03166370a082316131c98461170b565b6040518263ffffffff1660e01b81526004016131e59190613912565b602060405180830381865afa158015613202573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5f91906141a1565b60006001600160a01b0384163b1561331c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061326a9033908990889088906004016141ba565b6020604051808303816000875af19250505080156132a5575060408051601f3d908101601f191682019092526132a2918101906141f7565b60015b613302573d8080156132d3576040519150601f19603f3d011682016040523d82523d6000602084013e6132d8565b606091505b5080516000036132fa5760405162461bcd60e51b8152600401610df09061401c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612905565b506001949350505050565b6001600160a01b03821661337d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610df0565b613386816126b7565b156133d25760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610df0565b6133de600083836130c0565b6001600160a01b0382166000908152600360205260408120805460019290613407908490613d5c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038616908117909155905183929060008051602061425b833981519152908290a45050565b60608160000361347a5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156134a4578061348e81613da6565b915061349d9050600a83613e72565b915061347e565b6000816001600160401b038111156134be576134be613acb565b6040519080825280601f01601f1916602001820160405280156134e8576020820181803683370190505b5090505b8415612905576134fd600183613e86565b915061350a600a86614214565b613515906030613d5c565b60f81b81838151811061352a5761352a613d30565b60200101906001600160f81b031916908160001a90535061354c600a86613e72565b94506134ec565b60008061355f836137b6565b905061fde98110156135745750600092915050565b61fde88111801561358757506201388181105b156135955750600192915050565b62013880811180156135a9575062015f9181105b156135b75750600292915050565b62015f90811180156135cb57506201731981105b156135d95750600392915050565b62017318811180156135ed575062017ed181105b156135fb5750600492915050565b62017ed08111801561360f5750620186a081105b1561361d5750600592915050565b50600692915050565b6000600161363384611830565b61363d9190613e86565b600083815260076020526040902054909150808214613690576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906136d590600190613e86565b600083815260096020526040812054600880549394509092849081106136fd576136fd613d30565b90600052602060002001549050806008838154811061371e5761371e613d30565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061375657613756614228565b6001900381819060005260206000200160009055905550505050565b600061377d83611830565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000620186a16137c5836137cf565b610a5f9190614214565b6000816040516020016137e2919061423e565b60408051601f19818403018152919052805160209091012092915050565b60405180606001604052806003906020820280368337509192915050565b60405180606001604052806003905b606081526020019060019003908161382d5790505090565b6040518060c001604052806006906020820280368337509192915050565b6001600160e01b03198116811461247f57600080fd5b60006020828403121561388b57600080fd5b81356130b981613863565b60005b838110156138b1578181015183820152602001613899565b50506000910152565b600081518084526138d2816020860160208601613896565b601f01601f19169290920160200192915050565b6020815260006130b960208301846138ba565b60006020828403121561390b57600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461247f57600080fd5b6000806040838503121561394e57600080fd5b823561395981613926565b946020939093013593505050565b60608101818360005b600381101561398f578151835260209283019290910190600101613970565b50505092915050565b6000806000606084860312156139ad57600080fd5b83356139b881613926565b925060208401356139c881613926565b929592945050506040919091013590565b60208082526000906080830183820185845b6003811015613a1a57601f19878503018352613a088483516138ba565b935091840191908401906001016139eb565b50919695505050505050565b60c08101818360005b600681101561398f578151835260209283019290910190600101613a2f565b60008060408385031215613a6157600080fd5b50508035926020909101359150565b600060208284031215613a8257600080fd5b81356130b981613926565b60008060408385031215613aa057600080fd5b8235613aab81613926565b915060208301358015158114613ac057600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613b0957613b09613acb565b604052919050565b60006001600160401b03821115613b2a57613b2a613acb565b50601f01601f191660200190565b6000613b4b613b4684613b11565b613ae1565b9050828152838383011115613b5f57600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215613b8c57600080fd5b8435613b9781613926565b93506020850135613ba781613926565b92506040850135915060608501356001600160401b03811115613bc957600080fd5b8501601f81018713613bda57600080fd5b613be987823560208401613b38565b91505092959194509250565b60008060408385031215613c0857600080fd5b8235613c1381613926565b91506020830135613ac081613926565b60008060408385031215613c3657600080fd5b8235915060208301356001600160401b03811115613c5357600080fd5b8301601f81018513613c6457600080fd5b613c7385823560208401613b38565b9150509250929050565b600181811c90821680613c9157607f821691505b602082108103612fde57634e487b7160e01b600052602260045260246000fd5b600060408284031215613cc357600080fd5b82601f830112613cd257600080fd5b604080519081016001600160401b0381118282101715613cf457613cf4613acb565b8060405250806040840185811115613d0b57600080fd5b845b81811015613d25578051835260209283019201613d0d565b509195945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610a5f57610a5f613d46565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060018201613db857613db8613d46565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b8082028115828204841417610a5f57610a5f613d46565b634e487b7160e01b600052601260045260246000fd5b600082613e8157613e81613e5c565b500490565b81810381811115610a5f57610a5f613d46565b600060208284031215613eab57600080fd5b81516001600160401b03811115613ec157600080fd5b8201601f81018413613ed257600080fd5b8051613ee0613b4682613b11565b818152856020838501011115613ef557600080fd5b613f06826020830160208601613896565b95945050505050565b601f821115610f2057600081815260208120601f850160051c81016020861015613f365750805b601f850160051c820191505b81811015613f5557828155600101613f42565b505050505050565b81516001600160401b03811115613f7657613f76613acb565b613f8a81613f848454613c7d565b84613f0f565b602080601f831160018114613fbf5760008415613fa75750858301515b600019600386901b1c1916600185901b178555613f55565b600085815260208120601f198616915b82811015613fee57888601518255948401946001909101908401613fcf565b508582101561400c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600181815b808511156140a957816000190482111561408f5761408f613d46565b8085161561409c57918102915b93841c9390800290614073565b509250929050565b6000826140c057506001610a5f565b816140cd57506000610a5f565b81600181146140e357600281146140ed57614109565b6001915050610a5f565b60ff8411156140fe576140fe613d46565b50506001821b610a5f565b5060208310610133831016604e8410600b841016171561412c575081810a610a5f565b614136838361406e565b806000190482111561414a5761414a613d46565b029392505050565b60006130b983836140b1565b60008351614170818460208801613896565b6725b0bb30b934b0b760c11b9083019081528351614195816008840160208801613896565b01600801949350505050565b6000602082840312156141b357600080fd5b5051919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906141ed908301846138ba565b9695505050505050565b60006020828403121561420957600080fd5b81516130b981613863565b60008261422357614223613e5c565b500690565b634e487b7160e01b600052603160045260246000fd5b60008251614250818460208701613896565b919091019291505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122003b1897bdb0cb5f9843eb7abc2c6a94c88c8c5a93ce7fea5dcb8e38fc1099b7f64736f6c63430008120033
Deployed ByteCode
0x6080604052600436106102c85760003560e01c806301ffc9a7146102cd5780630465382a1461030257806306fdde03146103265780630711856214610348578063076bba3f14610368578063081812fc1461038a578063095ea7b3146103b75780631249c58b146103d757806318160ddd146103df5780631ab97c63146103f45780631b8ca217146104145780631d72b9781461044157806323b872dd14610461578063248498311461048157806329570778146104a15780632bac45bb146104c15780632cda1bf7146104c95780632f745c59146104e95780633fc2156c14610509578063404f75601461052b57806342842e0e146105335780634d237730146105535780634f6ccce7146105735780635449d2c11461059357806361cc891f146105b35780636352211e146105d3578063641871f2146105f357806365e1c38914610620578063660a170914610640578063697509d9146106605780636b8ff5741461068057806370a08231146106a0578063715018a6146106c057806375794a3c146106d55780637b303965146106eb5780637daf33541461070b5780637ef838041461072b57806380e76bfd1461074057806388b6ff9c146107605780638ab53447146107685780638da5cb5b14610770578063929a79b11461078557806394ec074a146107a557806395d89b41146107c557806398d8bc4b146107da5780639d66d032146107fa578063a22cb4651461081a578063a37d29921461083a578063a48d94ec14610867578063ad217ae514610887578063b4afd4b5146108a7578063b88d4fde146108c7578063b8f742c4146108e7578063c87b56dd14610907578063cd0d51f814610927578063cd2dcc2e14610947578063d8ea0bf014610967578063defc211514610987578063e7b40881146109a7578063e985e9c5146109c7578063f2fde38b146109e7578063f7b1080814610a07578063fe55932a14610a27575b600080fd5b3480156102d957600080fd5b506102ed6102e8366004613879565b610a3a565b60405190151581526020015b60405180910390f35b34801561030e57600080fd5b5061031860135481565b6040519081526020016102f9565b34801561033257600080fd5b5061033b610a65565b6040516102f991906138e6565b34801561035457600080fd5b5061033b6103633660046138f9565b610af7565b34801561037457600080fd5b506103886103833660046138f9565b610b97565b005b34801561039657600080fd5b506103aa6103a53660046138f9565b610d88565b6040516102f99190613912565b3480156103c357600080fd5b506103886103d236600461393b565b610e15565b610388610f25565b3480156103eb57600080fd5b50600854610318565b34801561040057600080fd5b5061033b61040f3660046138f9565b610fcd565b34801561042057600080fd5b5061043461042f3660046138f9565b610fe6565b6040516102f99190613967565b34801561044d57600080fd5b5061031861045c3660046138f9565b610ff7565b34801561046d57600080fd5b5061038861047c366004613998565b611002565b34801561048d57600080fd5b5061038861049c3660046138f9565b611033565b3480156104ad57600080fd5b506012546103aa906001600160a01b031681565b610388611226565b3480156104d557600080fd5b5061033b6104e43660046138f9565b61129b565b3480156104f557600080fd5b5061031861050436600461393b565b6112ab565b34801561051557600080fd5b5061051e611341565b6040516102f991906139d9565b610388611408565b34801561053f57600080fd5b5061038861054e366004613998565b61147d565b34801561055f57600080fd5b506011546103aa906001600160a01b031681565b34801561057f57600080fd5b5061031861058e3660046138f9565b611498565b34801561059f57600080fd5b506010546103aa906001600160a01b031681565b3480156105bf57600080fd5b506103886105ce3660046138f9565b61152b565b3480156105df57600080fd5b506103aa6105ee3660046138f9565b61170b565b3480156105ff57600080fd5b5061061361060e3660046138f9565b611782565b6040516102f99190613a26565b34801561062c57600080fd5b5061031861063b366004613a4e565b611793565b34801561064c57600080fd5b5061031861065b366004613a4e565b6117b8565b34801561066c57600080fd5b5061038861067b366004613a70565b6117d4565b34801561068c57600080fd5b5061033b61069b3660046138f9565b611825565b3480156106ac57600080fd5b506103186106bb366004613a70565b611830565b3480156106cc57600080fd5b506103886118b7565b3480156106e157600080fd5b50610318600f5481565b3480156106f757600080fd5b506106136107063660046138f9565b6118f2565b34801561071757600080fd5b5061051e6107263660046138f9565b611903565b34801561073757600080fd5b5061033b611914565b34801561074c57600080fd5b5061038861075b3660046138f9565b611921565b610388611b12565b610388611c22565b34801561077c57600080fd5b506103aa611c79565b34801561079157600080fd5b5061033b6107a03660046138f9565b611c88565b3480156107b157600080fd5b506103886107c0366004613a70565b611c93565b3480156107d157600080fd5b5061033b611ce4565b3480156107e657600080fd5b506103886107f53660046138f9565b611cf3565b34801561080657600080fd5b506103186108153660046138f9565b611ee2565b34801561082657600080fd5b50610388610835366004613a8d565b611ef9565b34801561084657600080fd5b506103186108553660046138f9565b603e6020526000908152604090205481565b34801561087357600080fd5b506103886108823660046138f9565b611fb9565b34801561089357600080fd5b5061033b6108a23660046138f9565b611fed565b3480156108b357600080fd5b5061033b6108c23660046138f9565b611ffd565b3480156108d357600080fd5b506103886108e2366004613b76565b61200d565b3480156108f357600080fd5b50610388610902366004613a70565b612045565b34801561091357600080fd5b5061033b6109223660046138f9565b612096565b34801561093357600080fd5b5061033b6109423660046138f9565b612108565b34801561095357600080fd5b506103886109623660046138f9565b612118565b34801561097357600080fd5b50610388610982366004613a70565b612307565b34801561099357600080fd5b506103886109a2366004613a70565b612358565b3480156109b357600080fd5b506103186109c23660046138f9565b6123a9565b3480156109d357600080fd5b506102ed6109e2366004613bf5565b6123b4565b3480156109f357600080fd5b50610388610a02366004613a70565b6123e2565b348015610a1357600080fd5b5061033b610a223660046138f9565b612482565b61033b610a35366004613c23565b612492565b60006001600160e01b0319821663780e9d6360e01b1480610a5f5750610a5f82612515565b92915050565b606060008054610a7490613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa090613c7d565b8015610aed5780601f10610ac257610100808354040283529160200191610aed565b820191906000526020600020905b815481529060010190602001808311610ad057829003601f168201915b5050505050905090565b602e8160078110610b0757600080fd5b018054909150610b1690613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4290613c7d565b8015610b8f5780601f10610b6457610100808354040283529160200191610b8f565b820191906000526020600020905b815481529060010190602001808311610b7257829003601f168201915b505050505081565b33610ba18261170b565b6001600160a01b031614610bc8576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015610c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c349190613cb1565b516002141580610cb25750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015610c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cab9190613cb1565b6020015115155b15610cd0576040516331683e1d60e11b815260040160405180910390fd5b620186a0610cdd82612565565b60600151610cec906001613d5c565b1115610d0b5760405163d89cc92560e01b815260040160405180910390fd5b42610d1782600361268f565b610d249062015180613d5c565b10610d425760405163e36222f360e01b815260040160405180910390fd5b6000818152603c6020526040902060030154610d5f906001613d5c565b6000828152603c60205260409020600301556000818152603f6020526040902042906003015550565b6000610d93826126b7565b610df95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610e208261170b565b9050806001600160a01b0316836001600160a01b031603610e8d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610df0565b336001600160a01b0382161480610ea95750610ea981336123b4565b610f165760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610df0565b610f2083836126d4565b505050565b6002600a5403610f475760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f54614e201015610f7157604051636956f2ab60e11b815260040160405180910390fd5b678ac7230489e80000341015610f9a57604051636956f2ab60e11b815260040160405180910390fd5b600f54610fa5611b12565b610fb0335b82612742565b600f8054906000610fc083613da6565b90915550506001600a5550565b603d6020526000908152604090208054610b1690613c7d565b610fee613800565b610a5f82612760565b6000610a5f82612831565b61100c3382612843565b6110285760405162461bcd60e51b8152600401610df090613dbf565b610f2083838361290d565b3361103d8261170b565b6001600160a01b031614611064576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa1580156110ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d09190613cb1565b5160011415806111505750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611123573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111479190613cb1565b60200151600114155b1561116e576040516331683e1d60e11b815260040160405180910390fd5b620186a061117b82612565565b6080015161118a906001613d5c565b11156111a95760405163d89cc92560e01b815260040160405180910390fd5b426111b582600461268f565b6111c29062015180613d5c565b106111e05760405163e36222f360e01b815260040160405180910390fd5b6000818152603c60205260409020600401546111fd906001613d5c565b6000828152603c60205260409020600401556000818152603f6020526040902042906004015550565b6002600a54036112485760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f546103e8101561127257604051636956f2ab60e11b815260040160405180910390fd5b67016345785d8a0000341015610f9a57604051636956f2ab60e11b815260040160405180910390fd5b60148160058110610b0757600080fd5b60006112b683611830565b82106113185760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610df0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61134961381e565b6040805160608101909152601e60036000835b828210156113ff57838201805461137290613c7d565b80601f016020809104026020016040519081016040528092919081815260200182805461139e90613c7d565b80156113eb5780601f106113c0576101008083540402835291602001916113eb565b820191906000526020600020905b8154815290600101906020018083116113ce57829003601f168201915b50505050508152602001906001019061135c565b50505050905090565b6002600a540361142a5760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f54611f40101561145457604051636956f2ab60e11b815260040160405180910390fd5b670de0b6b3a7640000341015610f9a57604051636956f2ab60e11b815260040160405180910390fd5b610f208383836040518060200160405280600081525061200d565b60006114a360085490565b82106115065760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610df0565b6008828154811061151957611519613d30565b90600052602060002001549050919050565b336115358261170b565b6001600160a01b03161461155c576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa1580156115a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115c89190613cb1565b5160011415806116465750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa15801561161b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163f9190613cb1565b6020015115155b15611664576040516331683e1d60e11b815260040160405180910390fd5b620186a061167182612565565b5161167d906001613d5c565b111561169c5760405163d89cc92560e01b815260040160405180910390fd5b426116a882600061268f565b6116b3906014613d5c565b106116d15760405163e36222f360e01b815260040160405180910390fd5b6000818152603c60205260409020546116eb906001613d5c565b6000918252603c6020908152604080842092909255603f90529020429055565b6000818152600260205260408120546001600160a01b031680610a5f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610df0565b61178a613845565b610a5f82612565565b603c60205281600052604060002081600681106117af57600080fd5b01549150829050565b603f60205281600052604060002081600681106117af57600080fd5b336117dd611c79565b6001600160a01b0316146118035760405162461bcd60e51b8152600401610df090613e10565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6060610a5f82612aa6565b60006001600160a01b03821661189b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610df0565b506001600160a01b031660009081526003602052604090205490565b336118c0611c79565b6001600160a01b0316146118e65760405162461bcd60e51b8152600401610df090613e10565b6118f06000612b48565b565b6118fa613845565b610a5f82612b9a565b61190b61381e565b610a5f82612c99565b600c8054610b1690613c7d565b3361192b8261170b565b6001600160a01b031614611952576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa15801561199a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119be9190613cb1565b516003141580611a3c5750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611a11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a359190613cb1565b6020015115155b15611a5a576040516331683e1d60e11b815260040160405180910390fd5b620186a0611a6782612565565b60a00151611a76906001613d5c565b1115611a955760405163d89cc92560e01b815260040160405180910390fd5b42611aa182600561268f565b611aae9062015180613d5c565b10611acc5760405163e36222f360e01b815260040160405180910390fd5b6000818152603c6020526040902060050154611ae9906001613d5c565b6000828152603c60205260409020600501556000818152603f6020526040902042906005015550565b600061271060135434611b259190613e45565b611b2f9190613e72565b6011549091506000906001600160a01b0316611b4b8334613e86565b604051600081818185875af1925050503d8060008114611b87576040519150601f19603f3d011682016040523d82523d6000602084013e611b8c565b606091505b5050905080611bae57604051630ce03cf760e21b815260040160405180910390fd5b6012546040516000916001600160a01b03169084908381818185875af1925050503d8060008114611bfb576040519150601f19603f3d011682016040523d82523d6000602084013e611c00565b606091505b5050905080610f205760405163b0cefee760e01b815260040160405180910390fd5b6002600a5403611c445760405162461bcd60e51b8152600401610df090613d6f565b6002600a55600f5460641015611c6d57604051636956f2ab60e11b815260040160405180910390fd5b600f54610fb033610faa565b600b546001600160a01b031690565b6060610a5f82612eeb565b33611c9c611c79565b6001600160a01b031614611cc25760405162461bcd60e51b8152600401610df090613e10565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b606060018054610a7490613c7d565b33611cfd8261170b565b6001600160a01b031614611d24576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d909190613cb1565b516001141580611e0e5750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015611de3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e079190613cb1565b6020015115155b15611e2c576040516331683e1d60e11b815260040160405180910390fd5b620186a0611e3982612565565b60200151611e48906001613d5c565b1115611e675760405163d89cc92560e01b815260040160405180910390fd5b42611e7382600161268f565b611e7e906014613d5c565b10611e9c5760405163e36222f360e01b815260040160405180910390fd5b6000818152603c6020526040902060010154611eb9906001613d5c565b6000828152603c60205260409020600101556000818152603f6020526040902042906001015550565b60198160058110611ef257600080fd5b0154905081565b336001600160a01b03831603611f4d5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610df0565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b33611fc2611c79565b6001600160a01b031614611fe85760405162461bcd60e51b8152600401610df090613e10565b601355565b60218160068110610b0757600080fd5b60278160078110610b0757600080fd5b6120173383612843565b6120335760405162461bcd60e51b8152600401610df090613dbf565b61203f84848484612fe4565b50505050565b3361204e611c79565b6001600160a01b0316146120745760405162461bcd60e51b8152600401610df090613e10565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b600d5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd90602401600060405180830381865afa1580156120e0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a5f9190810190613e99565b60358160078110610b0757600080fd5b336121228261170b565b6001600160a01b031614612149576040516336b6b89560e01b815260040160405180910390fd5b600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015612191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b59190613cb1565b5160011415806122335750600e5460405163b0c5416560e01b8152600481018390526001600160a01b039091169063b0c54165906024016040805180830381865afa158015612208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222c9190613cb1565b6020015115155b15612251576040516331683e1d60e11b815260040160405180910390fd5b620186a061225e82612565565b6040015161226d906001613d5c565b111561228c5760405163d89cc92560e01b815260040160405180910390fd5b4261229882600261268f565b6122a3906014613d5c565b106122c15760405163e36222f360e01b815260040160405180910390fd5b6000818152603c60205260409020600201546122de906001613d5c565b6000828152603c60205260409020600201556000818152603f6020526040902042906002015550565b33612310611c79565b6001600160a01b0316146123365760405162461bcd60e51b8152600401610df090613e10565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b33612361611c79565b6001600160a01b0316146123875760405162461bcd60e51b8152600401610df090613e10565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a5f82613017565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336123eb611c79565b6001600160a01b0316146124115760405162461bcd60e51b8152600401610df090613e10565b6001600160a01b0381166124765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610df0565b61247f81612b48565b50565b601e8160038110610b0757600080fd5b60603361249e8461170b565b6001600160a01b0316146124c5576040516336b6b89560e01b815260040160405180910390fd5b6124ce83613017565b34146124ed57604051636956f2ab60e11b815260040160405180910390fd5b6124f5611b12565b6000838152603d6020526040902061250d8382613f5d565b509092915050565b60006001600160e01b031982166380ac58cd60e01b148061254657506001600160e01b03198216635b5e139f60e01b145b80610a5f57506301ffc9a760e01b6001600160e01b0319831614610a5f565b61256d613845565b612575613845565b6000838152603c602052604090205461258d84612b9a565b516125989190613d5c565b81526000838152603c60205260409020600101546125b584612b9a565b602001516125c39190613d5c565b6020808301919091526000848152603c90915260409020600201546125e784612b9a565b604001516125f59190613d5c565b6040808301919091526000848152603c602052206003015461261684612b9a565b606001516126249190613d5c565b60608201526000838152603c602052604090206004015461264484612b9a565b608001516126529190613d5c565b60808201526000838152603c602052604090206005015461267284612b9a565b60a001516126809190613d5c565b8160055b602002015292915050565b6000828152603f6020526040812082600681106126ae576126ae613d30565b01549392505050565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906127098261170b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61275c828260405180602001604052806000815250613052565b5050565b612768613800565b612770613800565b61280883601e60005b01805461278590613c7d565b80601f01602080910402602001604051908101604052809291908181526020018280546127b190613c7d565b80156127fe5780601f106127d3576101008083540402835291602001916127fe565b820191906000526020600020905b8154815290600101906020018083116127e157829003601f168201915b5050505050613085565b815261281783601e6001612779565b602082015261282983601e6002612779565b816002612684565b6000908152603e602052604090205490565b600061284e826126b7565b6128af5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610df0565b60006128ba8361170b565b9050806001600160a01b0316846001600160a01b031614806128f55750836001600160a01b03166128ea84610d88565b6001600160a01b0316145b80612905575061290581856123b4565b949350505050565b826001600160a01b03166129208261170b565b6001600160a01b0316146129885760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610df0565b6001600160a01b0382166129ea5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610df0565b6129f58383836130c0565b612a006000826126d4565b6001600160a01b0383166000908152600360205260408120805460019290612a29908490613e86565b90915550506001600160a01b0382166000908152600360205260408120805460019290612a57908490613d5c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116918217909255915184939187169160008051602061425b83398151915291a4505050565b6000818152603d60205260409020805460609190612ac390613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612aef90613c7d565b8015612b3c5780601f10612b1157610100808354040283529160200191612b3c565b820191906000526020600020905b815481529060010190602001808311612b1f57829003601f168201915b50505050509050919050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612ba2613845565b612baa613845565b612c4283602160005b018054612bbf90613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612beb90613c7d565b8015612c385780601f10612c0d57610100808354040283529160200191612c38565b820191906000526020600020905b815481529060010190602001808311612c1b57829003601f168201915b5050505050613178565b8152612c518360216001612bb3565b6020820152612c638360216002612bb3565b6040820152612c758360216003612bb3565b6060820152612c878360216004612bb3565b60808201526126808360216005612bb3565b612ca161381e565b612ca961381e565b6000612cb484612760565b805190915060279060078110612ccc57612ccc613d30565b018054612cd890613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612d0490613c7d565b8015612d515780601f10612d2657610100808354040283529160200191612d51565b820191906000526020600020905b815481529060010190602001808311612d3457829003601f168201915b505050505082600060038110612d6957612d69613d30565b6020020152602e816001602002015160078110612d8857612d88613d30565b018054612d9490613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612dc090613c7d565b8015612e0d5780601f10612de257610100808354040283529160200191612e0d565b820191906000526020600020905b815481529060010190602001808311612df057829003601f168201915b505050505082600160038110612e2557612e25613d30565b6020020152604081015160359060078110612e4257612e42613d30565b018054612e4e90613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612e7a90613c7d565b8015612ec75780601f10612e9c57610100808354040283529160200191612ec7565b820191906000526020600020905b815481529060010190602001808311612eaa57829003601f168201915b505050505082600260038110612edf57612edf613d30565b60200201525092915050565b60606000612ef8836131ac565b601954909150811115612f9c57601460005b018054612f1690613c7d565b80601f0160208091040260200160405190810160405280929190818152602001828054612f4290613c7d565b8015612f8f5780601f10612f6457610100808354040283529160200191612f8f565b820191906000526020600020905b815481529060010190602001808311612f7257829003601f168201915b5050505050915050919050565b601a54811115612faf5760146001612f0a565b601b54811115612fc25760146002612f0a565b601c54811115612fd55760146003612f0a565b60146004612f0a565b50919050565b612fef84848461290d565b612ffb84848484613226565b61203f5760405162461bcd60e51b8152600401610df09061401c565b600061302282612831565b61302d90600a614152565b61303683612831565b6130409190613e45565b610a5f90670de0b6b3a7640000613e45565b61305c8383613327565b6130696000848484613226565b610f205760405162461bcd60e51b8152600401610df09061401c565b60006130b961309384613453565b836040516020016130a592919061415e565b604051602081830303815290604052613553565b9392505050565b6001600160a01b03831661311b5761311681600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61313e565b816001600160a01b0316836001600160a01b03161461313e5761313e8382613626565b6001600160a01b03821661315557610f20816136c3565b826001600160a01b0316826001600160a01b031614610f2057610f208282613772565b60006130b961318684613453565b8360405160200161319892919061415e565b6040516020818303038152906040526137b6565b6010546000906001600160a01b03166370a082316131c98461170b565b6040518263ffffffff1660e01b81526004016131e59190613912565b602060405180830381865afa158015613202573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5f91906141a1565b60006001600160a01b0384163b1561331c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061326a9033908990889088906004016141ba565b6020604051808303816000875af19250505080156132a5575060408051601f3d908101601f191682019092526132a2918101906141f7565b60015b613302573d8080156132d3576040519150601f19603f3d011682016040523d82523d6000602084013e6132d8565b606091505b5080516000036132fa5760405162461bcd60e51b8152600401610df09061401c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612905565b506001949350505050565b6001600160a01b03821661337d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610df0565b613386816126b7565b156133d25760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610df0565b6133de600083836130c0565b6001600160a01b0382166000908152600360205260408120805460019290613407908490613d5c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b038616908117909155905183929060008051602061425b833981519152908290a45050565b60608160000361347a5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156134a4578061348e81613da6565b915061349d9050600a83613e72565b915061347e565b6000816001600160401b038111156134be576134be613acb565b6040519080825280601f01601f1916602001820160405280156134e8576020820181803683370190505b5090505b8415612905576134fd600183613e86565b915061350a600a86614214565b613515906030613d5c565b60f81b81838151811061352a5761352a613d30565b60200101906001600160f81b031916908160001a90535061354c600a86613e72565b94506134ec565b60008061355f836137b6565b905061fde98110156135745750600092915050565b61fde88111801561358757506201388181105b156135955750600192915050565b62013880811180156135a9575062015f9181105b156135b75750600292915050565b62015f90811180156135cb57506201731981105b156135d95750600392915050565b62017318811180156135ed575062017ed181105b156135fb5750600492915050565b62017ed08111801561360f5750620186a081105b1561361d5750600592915050565b50600692915050565b6000600161363384611830565b61363d9190613e86565b600083815260076020526040902054909150808214613690576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906136d590600190613e86565b600083815260096020526040812054600880549394509092849081106136fd576136fd613d30565b90600052602060002001549050806008838154811061371e5761371e613d30565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061375657613756614228565b6001900381819060005260206000200160009055905550505050565b600061377d83611830565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000620186a16137c5836137cf565b610a5f9190614214565b6000816040516020016137e2919061423e565b60408051601f19818403018152919052805160209091012092915050565b60405180606001604052806003906020820280368337509192915050565b60405180606001604052806003905b606081526020019060019003908161382d5790505090565b6040518060c001604052806006906020820280368337509192915050565b6001600160e01b03198116811461247f57600080fd5b60006020828403121561388b57600080fd5b81356130b981613863565b60005b838110156138b1578181015183820152602001613899565b50506000910152565b600081518084526138d2816020860160208601613896565b601f01601f19169290920160200192915050565b6020815260006130b960208301846138ba565b60006020828403121561390b57600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461247f57600080fd5b6000806040838503121561394e57600080fd5b823561395981613926565b946020939093013593505050565b60608101818360005b600381101561398f578151835260209283019290910190600101613970565b50505092915050565b6000806000606084860312156139ad57600080fd5b83356139b881613926565b925060208401356139c881613926565b929592945050506040919091013590565b60208082526000906080830183820185845b6003811015613a1a57601f19878503018352613a088483516138ba565b935091840191908401906001016139eb565b50919695505050505050565b60c08101818360005b600681101561398f578151835260209283019290910190600101613a2f565b60008060408385031215613a6157600080fd5b50508035926020909101359150565b600060208284031215613a8257600080fd5b81356130b981613926565b60008060408385031215613aa057600080fd5b8235613aab81613926565b915060208301358015158114613ac057600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613b0957613b09613acb565b604052919050565b60006001600160401b03821115613b2a57613b2a613acb565b50601f01601f191660200190565b6000613b4b613b4684613b11565b613ae1565b9050828152838383011115613b5f57600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215613b8c57600080fd5b8435613b9781613926565b93506020850135613ba781613926565b92506040850135915060608501356001600160401b03811115613bc957600080fd5b8501601f81018713613bda57600080fd5b613be987823560208401613b38565b91505092959194509250565b60008060408385031215613c0857600080fd5b8235613c1381613926565b91506020830135613ac081613926565b60008060408385031215613c3657600080fd5b8235915060208301356001600160401b03811115613c5357600080fd5b8301601f81018513613c6457600080fd5b613c7385823560208401613b38565b9150509250929050565b600181811c90821680613c9157607f821691505b602082108103612fde57634e487b7160e01b600052602260045260246000fd5b600060408284031215613cc357600080fd5b82601f830112613cd257600080fd5b604080519081016001600160401b0381118282101715613cf457613cf4613acb565b8060405250806040840185811115613d0b57600080fd5b845b81811015613d25578051835260209283019201613d0d565b509195945050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610a5f57610a5f613d46565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060018201613db857613db8613d46565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b8082028115828204841417610a5f57610a5f613d46565b634e487b7160e01b600052601260045260246000fd5b600082613e8157613e81613e5c565b500490565b81810381811115610a5f57610a5f613d46565b600060208284031215613eab57600080fd5b81516001600160401b03811115613ec157600080fd5b8201601f81018413613ed257600080fd5b8051613ee0613b4682613b11565b818152856020838501011115613ef557600080fd5b613f06826020830160208601613896565b95945050505050565b601f821115610f2057600081815260208120601f850160051c81016020861015613f365750805b601f850160051c820191505b81811015613f5557828155600101613f42565b505050505050565b81516001600160401b03811115613f7657613f76613acb565b613f8a81613f848454613c7d565b84613f0f565b602080601f831160018114613fbf5760008415613fa75750858301515b600019600386901b1c1916600185901b178555613f55565b600085815260208120601f198616915b82811015613fee57888601518255948401946001909101908401613fcf565b508582101561400c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600181815b808511156140a957816000190482111561408f5761408f613d46565b8085161561409c57918102915b93841c9390800290614073565b509250929050565b6000826140c057506001610a5f565b816140cd57506000610a5f565b81600181146140e357600281146140ed57614109565b6001915050610a5f565b60ff8411156140fe576140fe613d46565b50506001821b610a5f565b5060208310610133831016604e8410600b841016171561412c575081810a610a5f565b614136838361406e565b806000190482111561414a5761414a613d46565b029392505050565b60006130b983836140b1565b60008351614170818460208801613896565b6725b0bb30b934b0b760c11b9083019081528351614195816008840160208801613896565b01600801949350505050565b6000602082840312156141b357600080fd5b5051919050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906141ed908301846138ba565b9695505050505050565b60006020828403121561420957600080fd5b81516130b981613863565b60008261422357614223613e5c565b500690565b634e487b7160e01b600052603160045260246000fd5b60008251614250818460208701613896565b919091019291505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122003b1897bdb0cb5f9843eb7abc2c6a94c88c8c5a93ce7fea5dcb8e38fc1099b7f64736f6c63430008120033