ERC-721
Overview
Max Total Supply
3,000 CBH
Holders
514
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 CBHLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Creature
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Tradable.sol"; /** * @title Creature * Creature - a contract for my non-fungible creatures. */ contract Creature is ERC721Tradable { string public baseURI = "https://api.cyber-hunter.com/token/"; constructor(address _proxyRegistryAddress) ERC721Tradable("CyberHunter", "CBH",6666, _proxyRegistryAddress) {} function baseTokenURI() override public view returns (string memory) { return baseURI; } function setBaseTokenURI(string memory _baseURI) public onlyOwner { baseURI = _baseURI; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/utils/Strings.sol"; import "./IFactoryERC721.sol"; import "./Creature.sol"; contract CreatureFactory is FactoryERC721, Ownable { using Strings for string; address public proxyRegistryAddress; address public nftAddress; string public baseURI = "https://api.cyber-hunter.com/factory/"; // temporary control creature sale round uint256 public creatureOpened = 6666; /* * Set the corresponding option (x1,x3,x6...) */ uint256[] OPTIONS=[1,1,3,3,6,6,9,9,18,18,27,27]; constructor(address _proxyRegistryAddress, address _nftAddress) { proxyRegistryAddress = _proxyRegistryAddress; nftAddress = _nftAddress; fireTransferEvents(address(0), owner()); } function name() override external pure returns (string memory) { return "CyberHunter Box"; } function symbol() override external pure returns (string memory) { return "CBHB"; } function supportsFactoryInterface() override public pure returns (bool) { return true; } function numOptions() override public view returns (uint256) { return OPTIONS.length; } function setOptions(uint256 id, uint256 option) public onlyOwner { require(id == OPTIONS.length, "Id must be consecutive"); require(option < 100, "Option must lt 100"); OPTIONS[id]=option; emit Transfer(address(0), owner(), id); } function transferOwnership(address newOwner) override public onlyOwner { address _prevOwner = owner(); super.transferOwnership(newOwner); fireTransferEvents(_prevOwner, newOwner); } function setCreatureOpened(uint256 openNum) public onlyOwner { creatureOpened = openNum; } function fireTransferEvents(address _from, address _to) private { for (uint256 i = 0; i < OPTIONS.length; i++) { emit Transfer(_from, _to, i); } } function batchMint(uint256 _mintNum, address _toAddress) private returns (uint256){ Creature elementCreature = Creature(nftAddress); uint256 tokenIdStart = elementCreature.totalSupply() + 1; for (uint256 i = 0; i < _mintNum; i++) { elementCreature.mintTo(_toAddress); } return tokenIdStart; } function mint(uint256 _optionId, address _toAddress) override public { // Must be sent from the owner proxy or owner. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); require(address(proxyRegistry.proxies(owner())) == _msgSender() || owner() == _msgSender(), "not owner or proxy"); require(canMint(_optionId), "sale end or stop"); uint256 mintNum = OPTIONS[_optionId]; if (mintNum > 0) { uint256 tokenIdStart = batchMint(mintNum,_toAddress); emit FactoryMint(tx.origin, _toAddress, _optionId, tokenIdStart, mintNum); } } function canMint(uint256 _optionId) override public view returns (bool) { if (_optionId >= OPTIONS.length) { return false; } Creature elementCreature = Creature(nftAddress); uint256 creatureSupply = elementCreature.totalSupply(); uint256 numItemsAllocated = OPTIONS[_optionId]; // open creature check if (creatureSupply > (creatureOpened - numItemsAllocated)) { return false; } return creatureSupply <= creatureOpened; } function setBaseURI(string memory _baseURI) public onlyOwner { baseURI = _baseURI; } function tokenURI(uint256 _optionId) override external view returns (string memory) { return string(abi.encodePacked(baseURI, Strings.toString(_optionId))); } /** * Get things work automatically on Element. * It's a hack, Use transferFrom so the frontend doesn't have to worry about different method names. */ function transferFrom( address _from, address _to, uint256 _tokenId ) public { mint(_tokenId, _to); } /** * Get things work automatically on Element. * It's a hack, Use isApprovedForAll so the frontend doesn't have to worry about different method names. */ function isApprovedForAll(address _owner, address _operator) public view returns (bool) { if (owner() == _owner && _owner == _operator) { return true; } ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if ( owner() == _owner && address(proxyRegistry.proxies(_owner)) == _operator ) { return true; } return false; } /** * Get things to work automatically on Element. */ function ownerOf(uint256 _tokenId) public view returns (address _owner) { return owner(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * This is a generic factory contract that can be used to mint tokens. The configuration * for minting is specified by an _optionId, which can be used to delineate various * ways of minting. */ interface FactoryERC721 { // factory option token transfer, must emit before sale start, usually emit in constructor event Transfer(address indexed from,address indexed to,uint256 indexed tokenId); // emit on any ERC721 NFT minted event FactoryMint(address indexed origin,address indexed to,uint256 indexed optionId,uint256 tokenIdStart,uint256 tokenNum); /** * Returns the name of this factory. */ function name() external view returns (string memory); /** * Returns the symbol for this factory. */ function symbol() external view returns (string memory); /** * Number of options the factory supports. */ function numOptions() external view returns (uint256); /** * @dev Returns whether the option ID can be minted. Can return false if the developer wishes to * restrict a total supply per option ID (or overall). */ function canMint(uint256 _optionId) external view returns (bool); /** * @dev Returns a URL specifying some metadata about the option. This metadata can be of the * same structure as the ERC721 metadata. */ function tokenURI(uint256 _optionId) external view returns (string memory); /** * Indicates that this is a factory contract. Ideally would use EIP 165 supportsInterface() */ function supportsFactoryInterface() external view returns (bool); /** * @dev Mints asset(s) in accordance to a specific address with a particular "option". This should be * callable only by the contract owner or the owner's Element Proxy (later universal login will solve this). * Options should also be delineated 0 - (numOptions() - 1) for convenient indexing. * @param _optionId the option id * @param _toAddress address of the future owner of the asset(s) */ function mint(uint256 _optionId, address _toAddress) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "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] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol"; import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/utils/Strings.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */ abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, Ownable { using SafeMath for uint256; address proxyRegistryAddress; mapping(address => bool) public factoryAddresss; uint256 private _currentTokenId = 0; uint256 public MAX_TOTAL = 0; constructor( string memory _name, string memory _symbol, uint256 _maxTotal, address _proxyRegistryAddress ) ERC721(_name, _symbol) { MAX_TOTAL = _maxTotal; proxyRegistryAddress = _proxyRegistryAddress; _initializeEIP712(_name); } /** * @dev Mints a token to an address with a tokenURI. * @param _to address of the future owner of the token */ function mintTo(address _to) public { require(_msgSender() == owner() || factoryAddresss[_msgSender()], "not owner or factory"); uint256 newTokenId = _getNextTokenId(); require(newTokenId<=MAX_TOTAL, "over maximum number"); _mint(_to, newTokenId); _incrementTokenId(); } /** * @dev calculates the next token ID based on value of _currentTokenId * @return uint256 for the next token ID */ function _getNextTokenId() private view returns (uint256) { return _currentTokenId.add(1); } /** * @dev increments the value of _currentTokenId */ function _incrementTokenId() private { _currentTokenId++; } function baseTokenURI() virtual public view returns (string memory); function tokenURI(uint256 _tokenId) override public view returns (string memory) { return string(abi.encodePacked(baseTokenURI(), Strings.toString(_tokenId))); } /** * Override isApprovedForAll to whitelist user's Element proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public view returns (bool) { // Whitelist Element proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by Element. */ function _msgSender() internal override view returns (address sender) { return ContextMixin.msgSender(); } /** * add factory addrss */ function addFactoryAddress(address factoryAddr) public onlyOwner { factoryAddresss[factoryAddr] = true; } /** * remove factory addrss */ function removeFactoryAddress(address factoryAddr) public onlyOwner { delete factoryAddresss[factoryAddr]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {SafeMath} from "openzeppelin-solidity/contracts/utils/math/SafeMath.sol"; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _owners; // Mapping owner address to token count mapping (address => uint256) private _balances; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. 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 { // solhint-disable-next-line no-inline-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` 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 { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev 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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string constant public ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712( string memory name ) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_proxyRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOTAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"factoryAddr","type":"address"}],"name":"addFactoryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"factoryAddresss","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"factoryAddr","type":"address"}],"name":"removeFactoryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600a60006101000a81548160ff021916908315150217905550600060105560006011556040518060600160405280602381526020016200508660239139601290805190602001906200005a92919062000456565b503480156200006857600080fd5b50604051620050f8380380620050f883398181016040528101906200008e91906200051d565b6040518060400160405280600b81526020017f437962657248756e7465720000000000000000000000000000000000000000008152506040518060400160405280600381526020017f4342480000000000000000000000000000000000000000000000000000000000815250611a0a83838381600090805190602001906200011892919062000456565b5080600190805190602001906200013192919062000456565b5050506000620001466200024960201b60201c565b905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3508160118190555080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200023e846200026560201b60201c565b505050505062000713565b600062000260620002e760201b62001c1d1760201c565b905090565b600a60009054906101000a900460ff1615620002b8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002af90620005f5565b60405180910390fd5b620002c9816200039a60201b60201c565b6001600a60006101000a81548160ff02191690831515021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156200039357600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050600080369050905073ffffffffffffffffffffffffffffffffffffffff81830151169250505062000397565b3390505b90565b6040518060800160405280604f8152602001620050a9604f91398051906020012081805190602001206040518060400160405280600181526020017f31000000000000000000000000000000000000000000000000000000000000008152508051906020012030620004116200044960201b60201c565b60001b6040516020016200042a95949392919062000598565b60405160208183030381529060405280519060200120600b8190555050565b6000804690508091505090565b828054620004649062000666565b90600052602060002090601f016020900481019282620004885760008555620004d4565b82601f10620004a357805160ff1916838001178555620004d4565b82800160010185558215620004d4579182015b82811115620004d3578251825591602001919060010190620004b6565b5b509050620004e39190620004e7565b5090565b5b8082111562000502576000816000905550600101620004e8565b5090565b6000815190506200051781620006f9565b92915050565b600060208284031215620005365762000535620006cb565b5b6000620005468482850162000506565b91505092915050565b6200055a8162000628565b82525050565b6200056b816200063c565b82525050565b600062000580600e8362000617565b91506200058d82620006d0565b602082019050919050565b600060a082019050620005af600083018862000560565b620005be602083018762000560565b620005cd604083018662000560565b620005dc60608301856200054f565b620005eb608083018462000560565b9695505050505050565b60006020820190508181036000830152620006108162000571565b9050919050565b600082825260208201905092915050565b6000620006358262000646565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600060028204905060018216806200067f57607f821691505b602082108114156200069657620006956200069c565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b7f616c726561647920696e69746564000000000000000000000000000000000000600082015250565b620007048162000628565b81146200071057600080fd5b50565b61496380620007236000396000f3fe6080604052600436106101e35760003560e01c80636352211e11610102578063a22cb46511610095578063d547cfb711610064578063d547cfb71461070b578063e0ef577f14610736578063e985e9c514610773578063f2fde38b146107b0576101e3565b8063a22cb46514610651578063b88d4fde1461067a578063c87b56dd146106a3578063cd60fe35146106e0576101e3565b8063755edd17116100d1578063755edd17146105a95780638da5cb5b146105d257806395d89b41146105fd578063a051d9c314610628576101e3565b80636352211e146104ed5780636c0360eb1461052a57806370a0823114610555578063715018a614610592576101e3565b806320379ee51161017a57806330176e131161014957806330176e13146104335780633408e4701461045c57806342842e0e146104875780634f6ccce7146104b0576101e3565b806320379ee51461036557806323b872dd146103905780632d0335ab146103b95780632f745c59146103f6576101e3565b80630c53c51c116101b65780630c53c51c146102b65780630f7e5970146102e657806318160ddd1461031157806318c0c6951461033c576101e3565b806301ffc9a7146101e857806306fdde0314610225578063081812fc14610250578063095ea7b31461028d575b600080fd5b3480156101f457600080fd5b5061020f600480360381019061020a91906132ec565b6107d9565b60405161021c91906139a9565b60405180910390f35b34801561023157600080fd5b5061023a610853565b6040516102479190613a8b565b60405180910390f35b34801561025c57600080fd5b50610277600480360381019061027291906133bc565b6108e5565b6040516102849190613904565b60405180910390f35b34801561029957600080fd5b506102b460048036038101906102af91906132ac565b61096a565b005b6102d060048036038101906102cb9190613215565b610a82565b6040516102dd9190613a69565b60405180910390f35b3480156102f257600080fd5b506102fb610cf4565b6040516103089190613a8b565b60405180910390f35b34801561031d57600080fd5b50610326610d2d565b6040516103339190613d6d565b60405180910390f35b34801561034857600080fd5b50610363600480360381019061035e9190613092565b610d3a565b005b34801561037157600080fd5b5061037a610e11565b60405161038791906139c4565b60405180910390f35b34801561039c57600080fd5b506103b760048036038101906103b291906130ff565b610e1b565b005b3480156103c557600080fd5b506103e060048036038101906103db9190613092565b610e7b565b6040516103ed9190613d6d565b60405180910390f35b34801561040257600080fd5b5061041d600480360381019061041891906132ac565b610ec4565b60405161042a9190613d6d565b60405180910390f35b34801561043f57600080fd5b5061045a60048036038101906104559190613373565b610f69565b005b34801561046857600080fd5b50610471610fff565b60405161047e9190613d6d565b60405180910390f35b34801561049357600080fd5b506104ae60048036038101906104a991906130ff565b61100c565b005b3480156104bc57600080fd5b506104d760048036038101906104d291906133bc565b61102c565b6040516104e49190613d6d565b60405180910390f35b3480156104f957600080fd5b50610514600480360381019061050f91906133bc565b61109d565b6040516105219190613904565b60405180910390f35b34801561053657600080fd5b5061053f61114f565b60405161054c9190613a8b565b60405180910390f35b34801561056157600080fd5b5061057c60048036038101906105779190613092565b6111dd565b6040516105899190613d6d565b60405180910390f35b34801561059e57600080fd5b506105a7611295565b005b3480156105b557600080fd5b506105d060048036038101906105cb9190613092565b6113d2565b005b3480156105de57600080fd5b506105e7611510565b6040516105f49190613904565b60405180910390f35b34801561060957600080fd5b5061061261153a565b60405161061f9190613a8b565b60405180910390f35b34801561063457600080fd5b5061064f600480360381019061064a9190613092565b6115cc565b005b34801561065d57600080fd5b50610678600480360381019061067391906131d5565b61169a565b005b34801561068657600080fd5b506106a1600480360381019061069c9190613152565b61181b565b005b3480156106af57600080fd5b506106ca60048036038101906106c591906133bc565b61187d565b6040516106d79190613a8b565b60405180910390f35b3480156106ec57600080fd5b506106f56118b7565b6040516107029190613d6d565b60405180910390f35b34801561071757600080fd5b506107206118bd565b60405161072d9190613a8b565b60405180910390f35b34801561074257600080fd5b5061075d60048036038101906107589190613092565b61194f565b60405161076a91906139a9565b60405180910390f35b34801561077f57600080fd5b5061079a600480360381019061079591906130bf565b61196f565b6040516107a791906139a9565b60405180910390f35b3480156107bc57600080fd5b506107d760048036038101906107d29190613092565b611a71565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061084c575061084b82611cce565b5b9050919050565b60606000805461086290614009565b80601f016020809104026020016040519081016040528092919081815260200182805461088e90614009565b80156108db5780601f106108b0576101008083540402835291602001916108db565b820191906000526020600020905b8154815290600101906020018083116108be57829003601f168201915b5050505050905090565b60006108f082611db0565b61092f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092690613c6d565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109758261109d565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dd90613ced565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a05611e1c565b73ffffffffffffffffffffffffffffffffffffffff161480610a345750610a3381610a2e611e1c565b61196f565b5b610a73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6a90613bed565b60405180910390fd5b610a7d8383611e2b565b505050565b606060006040518060600160405280600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481526020018873ffffffffffffffffffffffffffffffffffffffff168152602001878152509050610b058782878787611ee4565b610b44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3b90613ccd565b60405180910390fd5b610b976001600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fed90919063ffffffff16565b600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b873388604051610c0d9392919061391f565b60405180910390a16000803073ffffffffffffffffffffffffffffffffffffffff16888a604051602001610c42929190613881565b604051602081830303815290604052604051610c5e919061386a565b6000604051808303816000865af19150503d8060008114610c9b576040519150601f19603f3d011682016040523d82523d6000602084013e610ca0565b606091505b509150915081610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdc90613b0d565b60405180910390fd5b80935050505095945050505050565b6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b6000600880549050905090565b610d42611e1c565b73ffffffffffffffffffffffffffffffffffffffff16610d60611510565b73ffffffffffffffffffffffffffffffffffffffff1614610db6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dad90613c8d565b60405180910390fd5b6001600f60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600b54905090565b610e2c610e26611e1c565b82612003565b610e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6290613d0d565b60405180910390fd5b610e768383836120e1565b505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000610ecf836111dd565b8210610f10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0790613aad565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610f71611e1c565b73ffffffffffffffffffffffffffffffffffffffff16610f8f611510565b73ffffffffffffffffffffffffffffffffffffffff1614610fe5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fdc90613c8d565b60405180910390fd5b8060129080519060200190610ffb929190612e67565b5050565b6000804690508091505090565b6110278383836040518060200160405280600081525061181b565b505050565b6000611036610d2d565b8210611077576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106e90613d2d565b60405180910390fd5b6008828154811061108b5761108a6141d0565b5b90600052602060002001549050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611146576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113d90613c2d565b60405180910390fd5b80915050919050565b6012805461115c90614009565b80601f016020809104026020016040519081016040528092919081815260200182805461118890614009565b80156111d55780601f106111aa576101008083540402835291602001916111d5565b820191906000526020600020905b8154815290600101906020018083116111b857829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561124e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124590613c0d565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61129d611e1c565b73ffffffffffffffffffffffffffffffffffffffff166112bb611510565b73ffffffffffffffffffffffffffffffffffffffff1614611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130890613c8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6113da611510565b73ffffffffffffffffffffffffffffffffffffffff166113f8611e1c565b73ffffffffffffffffffffffffffffffffffffffff16148061146a5750600f6000611421611e1c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6114a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a090613d4d565b60405180910390fd5b60006114b361233d565b90506011548111156114fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f190613bad565b60405180910390fd5b611504828261235a565b61150c612528565b5050565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461154990614009565b80601f016020809104026020016040519081016040528092919081815260200182805461157590614009565b80156115c25780601f10611597576101008083540402835291602001916115c2565b820191906000526020600020905b8154815290600101906020018083116115a557829003601f168201915b5050505050905090565b6115d4611e1c565b73ffffffffffffffffffffffffffffffffffffffff166115f2611510565b73ffffffffffffffffffffffffffffffffffffffff1614611648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163f90613c8d565b60405180910390fd5b600f60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b6116a2611e1c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170790613b6d565b60405180910390fd5b806005600061171d611e1c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166117ca611e1c565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161180f91906139a9565b60405180910390a35050565b61182c611826611e1c565b83612003565b61186b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186290613d0d565b60405180910390fd5b61187784848484612542565b50505050565b60606118876118bd565b6118908361259e565b6040516020016118a19291906138a9565b6040516020818303038152906040529050919050565b60115481565b6060601280546118cc90614009565b80601f01602080910402602001604051908101604052809291908181526020018280546118f890614009565b80156119455780601f1061191a57610100808354040283529160200191611945565b820191906000526020600020905b81548152906001019060200180831161192857829003601f168201915b5050505050905090565b600f6020528060005260406000206000915054906101000a900460ff1681565b600080600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663c4552791866040518263ffffffff1660e01b81526004016119e79190613904565b60206040518083038186803b1580156119ff57600080fd5b505afa158015611a13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a379190613346565b73ffffffffffffffffffffffffffffffffffffffff161415611a5d576001915050611a6b565b611a6784846126ff565b9150505b92915050565b611a79611e1c565b73ffffffffffffffffffffffffffffffffffffffff16611a97611510565b73ffffffffffffffffffffffffffffffffffffffff1614611aed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ae490613c8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5490613aed565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611cc757600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050600080369050905073ffffffffffffffffffffffffffffffffffffffff818301511692505050611ccb565b3390505b90565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611d9957507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611da95750611da882612793565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6000611e26611c1d565b905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611e9e8361109d565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4c90613bcd565b60405180910390fd5b6001611f68611f63876127fd565b612865565b83868660405160008152602001604052604051611f889493929190613a24565b6020604051602081039080840390855afa158015611faa573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614905095945050505050565b60008183611ffb9190613e5d565b905092915050565b600061200e82611db0565b61204d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204490613b8d565b60405180910390fd5b60006120588361109d565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806120c757508373ffffffffffffffffffffffffffffffffffffffff166120af846108e5565b73ffffffffffffffffffffffffffffffffffffffff16145b806120d857506120d7818561196f565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166121018261109d565b73ffffffffffffffffffffffffffffffffffffffff1614612157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214e90613cad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156121c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121be90613b4d565b60405180910390fd5b6121d283838361289e565b6121dd600082611e2b565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461222d9190613ee4565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122849190613e5d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006123556001601054611fed90919063ffffffff16565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c190613c4d565b60405180910390fd5b6123d381611db0565b15612413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240a90613b2d565b60405180910390fd5b61241f6000838361289e565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461246f9190613e5d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6010600081548092919061253b9061406c565b9190505550565b61254d8484846120e1565b612559848484846129b2565b612598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258f90613acd565b60405180910390fd5b50505050565b606060008214156125e6576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506126fa565b600082905060005b600082146126185780806126019061406c565b915050600a826126119190613eb3565b91506125ee565b60008167ffffffffffffffff811115612634576126336141ff565b5b6040519080825280601f01601f1916602001820160405280156126665781602001600182028036833780820191505090505b5090505b600085146126f35760018261267f9190613ee4565b9150600a8561268e91906140e3565b603061269a9190613e5d565b60f81b8183815181106126b0576126af6141d0565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856126ec9190613eb3565b945061266a565b8093505050505b919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60006040518060800160405280604381526020016148eb60439139805190602001208260000151836020015184604001518051906020012060405160200161284894939291906139df565b604051602081830303815290604052805190602001209050919050565b600061286f610e11565b826040516020016128819291906138cd565b604051602081830303815290604052805190602001209050919050565b6128a9838383612b49565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128ec576128e781612b4e565b61292b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461292a576129298382612b97565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561296e5761296981612d04565b6129ad565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146129ac576129ab8282612dd5565b5b5b505050565b60006129d38473ffffffffffffffffffffffffffffffffffffffff16612e54565b15612b3c578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026129fc611e1c565b8786866040518563ffffffff1660e01b8152600401612a1e949392919061395d565b602060405180830381600087803b158015612a3857600080fd5b505af1925050508015612a6957506040513d601f19601f82011682018060405250810190612a669190613319565b60015b612aec573d8060008114612a99576040519150601f19603f3d011682016040523d82523d6000602084013e612a9e565b606091505b50600081511415612ae4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612adb90613acd565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612b41565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006001612ba4846111dd565b612bae9190613ee4565b9050600060076000848152602001908152602001600020549050818114612c93576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b60006001600880549050612d189190613ee4565b9050600060096000848152602001908152602001600020549050600060088381548110612d4857612d476141d0565b5b906000526020600020015490508060088381548110612d6a57612d696141d0565b5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480612db957612db86141a1565b5b6001900381819060005260206000200160009055905550505050565b6000612de0836111dd565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600080823b905060008111915050919050565b828054612e7390614009565b90600052602060002090601f016020900481019282612e955760008555612edc565b82601f10612eae57805160ff1916838001178555612edc565b82800160010185558215612edc579182015b82811115612edb578251825591602001919060010190612ec0565b5b509050612ee99190612eed565b5090565b5b80821115612f06576000816000905550600101612eee565b5090565b6000612f1d612f1884613dad565b613d88565b905082815260208101848484011115612f3957612f38614233565b5b612f44848285613fc7565b509392505050565b6000612f5f612f5a84613dde565b613d88565b905082815260208101848484011115612f7b57612f7a614233565b5b612f86848285613fc7565b509392505050565b600081359050612f9d81614849565b92915050565b600081359050612fb281614860565b92915050565b600081359050612fc781614877565b92915050565b600081359050612fdc8161488e565b92915050565b600081519050612ff18161488e565b92915050565b600082601f83011261300c5761300b61422e565b5b813561301c848260208601612f0a565b91505092915050565b600081519050613034816148a5565b92915050565b600082601f83011261304f5761304e61422e565b5b813561305f848260208601612f4c565b91505092915050565b600081359050613077816148bc565b92915050565b60008135905061308c816148d3565b92915050565b6000602082840312156130a8576130a761423d565b5b60006130b684828501612f8e565b91505092915050565b600080604083850312156130d6576130d561423d565b5b60006130e485828601612f8e565b92505060206130f585828601612f8e565b9150509250929050565b6000806000606084860312156131185761311761423d565b5b600061312686828701612f8e565b935050602061313786828701612f8e565b925050604061314886828701613068565b9150509250925092565b6000806000806080858703121561316c5761316b61423d565b5b600061317a87828801612f8e565b945050602061318b87828801612f8e565b935050604061319c87828801613068565b925050606085013567ffffffffffffffff8111156131bd576131bc614238565b5b6131c987828801612ff7565b91505092959194509250565b600080604083850312156131ec576131eb61423d565b5b60006131fa85828601612f8e565b925050602061320b85828601612fa3565b9150509250929050565b600080600080600060a086880312156132315761323061423d565b5b600061323f88828901612f8e565b955050602086013567ffffffffffffffff8111156132605761325f614238565b5b61326c88828901612ff7565b945050604061327d88828901612fb8565b935050606061328e88828901612fb8565b925050608061329f8882890161307d565b9150509295509295909350565b600080604083850312156132c3576132c261423d565b5b60006132d185828601612f8e565b92505060206132e285828601613068565b9150509250929050565b6000602082840312156133025761330161423d565b5b600061331084828501612fcd565b91505092915050565b60006020828403121561332f5761332e61423d565b5b600061333d84828501612fe2565b91505092915050565b60006020828403121561335c5761335b61423d565b5b600061336a84828501613025565b91505092915050565b6000602082840312156133895761338861423d565b5b600082013567ffffffffffffffff8111156133a7576133a6614238565b5b6133b38482850161303a565b91505092915050565b6000602082840312156133d2576133d161423d565b5b60006133e084828501613068565b91505092915050565b6133f281613f2a565b82525050565b61340181613f18565b82525050565b61341861341382613f18565b6140b5565b82525050565b61342781613f3c565b82525050565b61343681613f48565b82525050565b61344d61344882613f48565b6140c7565b82525050565b600061345e82613e0f565b6134688185613e25565b9350613478818560208601613fd6565b61348181614242565b840191505092915050565b600061349782613e0f565b6134a18185613e36565b93506134b1818560208601613fd6565b80840191505092915050565b60006134c882613e1a565b6134d28185613e41565b93506134e2818560208601613fd6565b6134eb81614242565b840191505092915050565b600061350182613e1a565b61350b8185613e52565b935061351b818560208601613fd6565b80840191505092915050565b6000613534602b83613e41565b915061353f82614260565b604082019050919050565b6000613557603283613e41565b9150613562826142af565b604082019050919050565b600061357a602683613e41565b9150613585826142fe565b604082019050919050565b600061359d601c83613e41565b91506135a88261434d565b602082019050919050565b60006135c0601c83613e41565b91506135cb82614376565b602082019050919050565b60006135e3600283613e52565b91506135ee8261439f565b600282019050919050565b6000613606602483613e41565b9150613611826143c8565b604082019050919050565b6000613629601983613e41565b915061363482614417565b602082019050919050565b600061364c602c83613e41565b915061365782614440565b604082019050919050565b600061366f601383613e41565b915061367a8261448f565b602082019050919050565b6000613692602583613e41565b915061369d826144b8565b604082019050919050565b60006136b5603883613e41565b91506136c082614507565b604082019050919050565b60006136d8602a83613e41565b91506136e382614556565b604082019050919050565b60006136fb602983613e41565b9150613706826145a5565b604082019050919050565b600061371e602083613e41565b9150613729826145f4565b602082019050919050565b6000613741602c83613e41565b915061374c8261461d565b604082019050919050565b6000613764602083613e41565b915061376f8261466c565b602082019050919050565b6000613787602983613e41565b915061379282614695565b604082019050919050565b60006137aa602183613e41565b91506137b5826146e4565b604082019050919050565b60006137cd602183613e41565b91506137d882614733565b604082019050919050565b60006137f0603183613e41565b91506137fb82614782565b604082019050919050565b6000613813602c83613e41565b915061381e826147d1565b604082019050919050565b6000613836601483613e41565b915061384182614820565b602082019050919050565b61385581613fb0565b82525050565b61386481613fba565b82525050565b6000613876828461348c565b915081905092915050565b600061388d828561348c565b91506138998284613407565b6014820191508190509392505050565b60006138b582856134f6565b91506138c182846134f6565b91508190509392505050565b60006138d8826135d6565b91506138e4828561343c565b6020820191506138f4828461343c565b6020820191508190509392505050565b600060208201905061391960008301846133f8565b92915050565b600060608201905061393460008301866133f8565b61394160208301856133e9565b81810360408301526139538184613453565b9050949350505050565b600060808201905061397260008301876133f8565b61397f60208301866133f8565b61398c604083018561384c565b818103606083015261399e8184613453565b905095945050505050565b60006020820190506139be600083018461341e565b92915050565b60006020820190506139d9600083018461342d565b92915050565b60006080820190506139f4600083018761342d565b613a01602083018661384c565b613a0e60408301856133f8565b613a1b606083018461342d565b95945050505050565b6000608082019050613a39600083018761342d565b613a46602083018661385b565b613a53604083018561342d565b613a60606083018461342d565b95945050505050565b60006020820190508181036000830152613a838184613453565b905092915050565b60006020820190508181036000830152613aa581846134bd565b905092915050565b60006020820190508181036000830152613ac681613527565b9050919050565b60006020820190508181036000830152613ae68161354a565b9050919050565b60006020820190508181036000830152613b068161356d565b9050919050565b60006020820190508181036000830152613b2681613590565b9050919050565b60006020820190508181036000830152613b46816135b3565b9050919050565b60006020820190508181036000830152613b66816135f9565b9050919050565b60006020820190508181036000830152613b868161361c565b9050919050565b60006020820190508181036000830152613ba68161363f565b9050919050565b60006020820190508181036000830152613bc681613662565b9050919050565b60006020820190508181036000830152613be681613685565b9050919050565b60006020820190508181036000830152613c06816136a8565b9050919050565b60006020820190508181036000830152613c26816136cb565b9050919050565b60006020820190508181036000830152613c46816136ee565b9050919050565b60006020820190508181036000830152613c6681613711565b9050919050565b60006020820190508181036000830152613c8681613734565b9050919050565b60006020820190508181036000830152613ca681613757565b9050919050565b60006020820190508181036000830152613cc68161377a565b9050919050565b60006020820190508181036000830152613ce68161379d565b9050919050565b60006020820190508181036000830152613d06816137c0565b9050919050565b60006020820190508181036000830152613d26816137e3565b9050919050565b60006020820190508181036000830152613d4681613806565b9050919050565b60006020820190508181036000830152613d6681613829565b9050919050565b6000602082019050613d82600083018461384c565b92915050565b6000613d92613da3565b9050613d9e828261403b565b919050565b6000604051905090565b600067ffffffffffffffff821115613dc857613dc76141ff565b5b613dd182614242565b9050602081019050919050565b600067ffffffffffffffff821115613df957613df86141ff565b5b613e0282614242565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000613e6882613fb0565b9150613e7383613fb0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613ea857613ea7614114565b5b828201905092915050565b6000613ebe82613fb0565b9150613ec983613fb0565b925082613ed957613ed8614143565b5b828204905092915050565b6000613eef82613fb0565b9150613efa83613fb0565b925082821015613f0d57613f0c614114565b5b828203905092915050565b6000613f2382613f90565b9050919050565b6000613f3582613f90565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000613f8982613f18565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015613ff4578082015181840152602081019050613fd9565b83811115614003576000848401525b50505050565b6000600282049050600182168061402157607f821691505b6020821081141561403557614034614172565b5b50919050565b61404482614242565b810181811067ffffffffffffffff82111715614063576140626141ff565b5b80604052505050565b600061407782613fb0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156140aa576140a9614114565b5b600182019050919050565b60006140c0826140d1565b9050919050565b6000819050919050565b60006140dc82614253565b9050919050565b60006140ee82613fb0565b91506140f983613fb0565b92508261410957614108614143565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000600082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f6f766572206d6178696d756d206e756d62657200000000000000000000000000600082015250565b7f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360008201527f49474e4552000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360008201527f6800000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f6e6f74206f776e6572206f7220666163746f7279000000000000000000000000600082015250565b61485281613f18565b811461485d57600080fd5b50565b61486981613f3c565b811461487457600080fd5b50565b61488081613f48565b811461488b57600080fd5b50565b61489781613f52565b81146148a257600080fd5b50565b6148ae81613f7e565b81146148b957600080fd5b50565b6148c581613fb0565b81146148d057600080fd5b50565b6148dc81613fba565b81146148e757600080fd5b5056fe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a2646970667358221220ac4d95fb5068511210a69471edb672f6c50a2202d2aa980a7e3db109440b60db64736f6c6343000807003368747470733a2f2f6170692e63796265722d68756e7465722e636f6d2f746f6b656e2f454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c742900000000000000000000000087f8388195728e9497aa11715a352472984607a2
Deployed Bytecode
0x6080604052600436106101e35760003560e01c80636352211e11610102578063a22cb46511610095578063d547cfb711610064578063d547cfb71461070b578063e0ef577f14610736578063e985e9c514610773578063f2fde38b146107b0576101e3565b8063a22cb46514610651578063b88d4fde1461067a578063c87b56dd146106a3578063cd60fe35146106e0576101e3565b8063755edd17116100d1578063755edd17146105a95780638da5cb5b146105d257806395d89b41146105fd578063a051d9c314610628576101e3565b80636352211e146104ed5780636c0360eb1461052a57806370a0823114610555578063715018a614610592576101e3565b806320379ee51161017a57806330176e131161014957806330176e13146104335780633408e4701461045c57806342842e0e146104875780634f6ccce7146104b0576101e3565b806320379ee51461036557806323b872dd146103905780632d0335ab146103b95780632f745c59146103f6576101e3565b80630c53c51c116101b65780630c53c51c146102b65780630f7e5970146102e657806318160ddd1461031157806318c0c6951461033c576101e3565b806301ffc9a7146101e857806306fdde0314610225578063081812fc14610250578063095ea7b31461028d575b600080fd5b3480156101f457600080fd5b5061020f600480360381019061020a91906132ec565b6107d9565b60405161021c91906139a9565b60405180910390f35b34801561023157600080fd5b5061023a610853565b6040516102479190613a8b565b60405180910390f35b34801561025c57600080fd5b50610277600480360381019061027291906133bc565b6108e5565b6040516102849190613904565b60405180910390f35b34801561029957600080fd5b506102b460048036038101906102af91906132ac565b61096a565b005b6102d060048036038101906102cb9190613215565b610a82565b6040516102dd9190613a69565b60405180910390f35b3480156102f257600080fd5b506102fb610cf4565b6040516103089190613a8b565b60405180910390f35b34801561031d57600080fd5b50610326610d2d565b6040516103339190613d6d565b60405180910390f35b34801561034857600080fd5b50610363600480360381019061035e9190613092565b610d3a565b005b34801561037157600080fd5b5061037a610e11565b60405161038791906139c4565b60405180910390f35b34801561039c57600080fd5b506103b760048036038101906103b291906130ff565b610e1b565b005b3480156103c557600080fd5b506103e060048036038101906103db9190613092565b610e7b565b6040516103ed9190613d6d565b60405180910390f35b34801561040257600080fd5b5061041d600480360381019061041891906132ac565b610ec4565b60405161042a9190613d6d565b60405180910390f35b34801561043f57600080fd5b5061045a60048036038101906104559190613373565b610f69565b005b34801561046857600080fd5b50610471610fff565b60405161047e9190613d6d565b60405180910390f35b34801561049357600080fd5b506104ae60048036038101906104a991906130ff565b61100c565b005b3480156104bc57600080fd5b506104d760048036038101906104d291906133bc565b61102c565b6040516104e49190613d6d565b60405180910390f35b3480156104f957600080fd5b50610514600480360381019061050f91906133bc565b61109d565b6040516105219190613904565b60405180910390f35b34801561053657600080fd5b5061053f61114f565b60405161054c9190613a8b565b60405180910390f35b34801561056157600080fd5b5061057c60048036038101906105779190613092565b6111dd565b6040516105899190613d6d565b60405180910390f35b34801561059e57600080fd5b506105a7611295565b005b3480156105b557600080fd5b506105d060048036038101906105cb9190613092565b6113d2565b005b3480156105de57600080fd5b506105e7611510565b6040516105f49190613904565b60405180910390f35b34801561060957600080fd5b5061061261153a565b60405161061f9190613a8b565b60405180910390f35b34801561063457600080fd5b5061064f600480360381019061064a9190613092565b6115cc565b005b34801561065d57600080fd5b50610678600480360381019061067391906131d5565b61169a565b005b34801561068657600080fd5b506106a1600480360381019061069c9190613152565b61181b565b005b3480156106af57600080fd5b506106ca60048036038101906106c591906133bc565b61187d565b6040516106d79190613a8b565b60405180910390f35b3480156106ec57600080fd5b506106f56118b7565b6040516107029190613d6d565b60405180910390f35b34801561071757600080fd5b506107206118bd565b60405161072d9190613a8b565b60405180910390f35b34801561074257600080fd5b5061075d60048036038101906107589190613092565b61194f565b60405161076a91906139a9565b60405180910390f35b34801561077f57600080fd5b5061079a600480360381019061079591906130bf565b61196f565b6040516107a791906139a9565b60405180910390f35b3480156107bc57600080fd5b506107d760048036038101906107d29190613092565b611a71565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061084c575061084b82611cce565b5b9050919050565b60606000805461086290614009565b80601f016020809104026020016040519081016040528092919081815260200182805461088e90614009565b80156108db5780601f106108b0576101008083540402835291602001916108db565b820191906000526020600020905b8154815290600101906020018083116108be57829003601f168201915b5050505050905090565b60006108f082611db0565b61092f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092690613c6d565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006109758261109d565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109dd90613ced565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610a05611e1c565b73ffffffffffffffffffffffffffffffffffffffff161480610a345750610a3381610a2e611e1c565b61196f565b5b610a73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6a90613bed565b60405180910390fd5b610a7d8383611e2b565b505050565b606060006040518060600160405280600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481526020018873ffffffffffffffffffffffffffffffffffffffff168152602001878152509050610b058782878787611ee4565b610b44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3b90613ccd565b60405180910390fd5b610b976001600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fed90919063ffffffff16565b600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b873388604051610c0d9392919061391f565b60405180910390a16000803073ffffffffffffffffffffffffffffffffffffffff16888a604051602001610c42929190613881565b604051602081830303815290604052604051610c5e919061386a565b6000604051808303816000865af19150503d8060008114610c9b576040519150601f19603f3d011682016040523d82523d6000602084013e610ca0565b606091505b509150915081610ce5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdc90613b0d565b60405180910390fd5b80935050505095945050505050565b6040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b6000600880549050905090565b610d42611e1c565b73ffffffffffffffffffffffffffffffffffffffff16610d60611510565b73ffffffffffffffffffffffffffffffffffffffff1614610db6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dad90613c8d565b60405180910390fd5b6001600f60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600b54905090565b610e2c610e26611e1c565b82612003565b610e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6290613d0d565b60405180910390fd5b610e768383836120e1565b505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000610ecf836111dd565b8210610f10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0790613aad565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610f71611e1c565b73ffffffffffffffffffffffffffffffffffffffff16610f8f611510565b73ffffffffffffffffffffffffffffffffffffffff1614610fe5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fdc90613c8d565b60405180910390fd5b8060129080519060200190610ffb929190612e67565b5050565b6000804690508091505090565b6110278383836040518060200160405280600081525061181b565b505050565b6000611036610d2d565b8210611077576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106e90613d2d565b60405180910390fd5b6008828154811061108b5761108a6141d0565b5b90600052602060002001549050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611146576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113d90613c2d565b60405180910390fd5b80915050919050565b6012805461115c90614009565b80601f016020809104026020016040519081016040528092919081815260200182805461118890614009565b80156111d55780601f106111aa576101008083540402835291602001916111d5565b820191906000526020600020905b8154815290600101906020018083116111b857829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561124e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124590613c0d565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61129d611e1c565b73ffffffffffffffffffffffffffffffffffffffff166112bb611510565b73ffffffffffffffffffffffffffffffffffffffff1614611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130890613c8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6113da611510565b73ffffffffffffffffffffffffffffffffffffffff166113f8611e1c565b73ffffffffffffffffffffffffffffffffffffffff16148061146a5750600f6000611421611e1c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6114a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a090613d4d565b60405180910390fd5b60006114b361233d565b90506011548111156114fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f190613bad565b60405180910390fd5b611504828261235a565b61150c612528565b5050565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461154990614009565b80601f016020809104026020016040519081016040528092919081815260200182805461157590614009565b80156115c25780601f10611597576101008083540402835291602001916115c2565b820191906000526020600020905b8154815290600101906020018083116115a557829003601f168201915b5050505050905090565b6115d4611e1c565b73ffffffffffffffffffffffffffffffffffffffff166115f2611510565b73ffffffffffffffffffffffffffffffffffffffff1614611648576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163f90613c8d565b60405180910390fd5b600f60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff021916905550565b6116a2611e1c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611710576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170790613b6d565b60405180910390fd5b806005600061171d611e1c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166117ca611e1c565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161180f91906139a9565b60405180910390a35050565b61182c611826611e1c565b83612003565b61186b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186290613d0d565b60405180910390fd5b61187784848484612542565b50505050565b60606118876118bd565b6118908361259e565b6040516020016118a19291906138a9565b6040516020818303038152906040529050919050565b60115481565b6060601280546118cc90614009565b80601f01602080910402602001604051908101604052809291908181526020018280546118f890614009565b80156119455780601f1061191a57610100808354040283529160200191611945565b820191906000526020600020905b81548152906001019060200180831161192857829003601f168201915b5050505050905090565b600f6020528060005260406000206000915054906101000a900460ff1681565b600080600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663c4552791866040518263ffffffff1660e01b81526004016119e79190613904565b60206040518083038186803b1580156119ff57600080fd5b505afa158015611a13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a379190613346565b73ffffffffffffffffffffffffffffffffffffffff161415611a5d576001915050611a6b565b611a6784846126ff565b9150505b92915050565b611a79611e1c565b73ffffffffffffffffffffffffffffffffffffffff16611a97611510565b73ffffffffffffffffffffffffffffffffffffffff1614611aed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ae490613c8d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5490613aed565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611cc757600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050600080369050905073ffffffffffffffffffffffffffffffffffffffff818301511692505050611ccb565b3390505b90565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611d9957507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611da95750611da882612793565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6000611e26611c1d565b905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611e9e8361109d565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4c90613bcd565b60405180910390fd5b6001611f68611f63876127fd565b612865565b83868660405160008152602001604052604051611f889493929190613a24565b6020604051602081039080840390855afa158015611faa573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614905095945050505050565b60008183611ffb9190613e5d565b905092915050565b600061200e82611db0565b61204d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204490613b8d565b60405180910390fd5b60006120588361109d565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806120c757508373ffffffffffffffffffffffffffffffffffffffff166120af846108e5565b73ffffffffffffffffffffffffffffffffffffffff16145b806120d857506120d7818561196f565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166121018261109d565b73ffffffffffffffffffffffffffffffffffffffff1614612157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214e90613cad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156121c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121be90613b4d565b60405180910390fd5b6121d283838361289e565b6121dd600082611e2b565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461222d9190613ee4565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546122849190613e5d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006123556001601054611fed90919063ffffffff16565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156123ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c190613c4d565b60405180910390fd5b6123d381611db0565b15612413576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240a90613b2d565b60405180910390fd5b61241f6000838361289e565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461246f9190613e5d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6010600081548092919061253b9061406c565b9190505550565b61254d8484846120e1565b612559848484846129b2565b612598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258f90613acd565b60405180910390fd5b50505050565b606060008214156125e6576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506126fa565b600082905060005b600082146126185780806126019061406c565b915050600a826126119190613eb3565b91506125ee565b60008167ffffffffffffffff811115612634576126336141ff565b5b6040519080825280601f01601f1916602001820160405280156126665781602001600182028036833780820191505090505b5090505b600085146126f35760018261267f9190613ee4565b9150600a8561268e91906140e3565b603061269a9190613e5d565b60f81b8183815181106126b0576126af6141d0565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856126ec9190613eb3565b945061266a565b8093505050505b919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60006040518060800160405280604381526020016148eb60439139805190602001208260000151836020015184604001518051906020012060405160200161284894939291906139df565b604051602081830303815290604052805190602001209050919050565b600061286f610e11565b826040516020016128819291906138cd565b604051602081830303815290604052805190602001209050919050565b6128a9838383612b49565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128ec576128e781612b4e565b61292b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461292a576129298382612b97565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561296e5761296981612d04565b6129ad565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146129ac576129ab8282612dd5565b5b5b505050565b60006129d38473ffffffffffffffffffffffffffffffffffffffff16612e54565b15612b3c578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026129fc611e1c565b8786866040518563ffffffff1660e01b8152600401612a1e949392919061395d565b602060405180830381600087803b158015612a3857600080fd5b505af1925050508015612a6957506040513d601f19601f82011682018060405250810190612a669190613319565b60015b612aec573d8060008114612a99576040519150601f19603f3d011682016040523d82523d6000602084013e612a9e565b606091505b50600081511415612ae4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612adb90613acd565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612b41565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006001612ba4846111dd565b612bae9190613ee4565b9050600060076000848152602001908152602001600020549050818114612c93576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b60006001600880549050612d189190613ee4565b9050600060096000848152602001908152602001600020549050600060088381548110612d4857612d476141d0565b5b906000526020600020015490508060088381548110612d6a57612d696141d0565b5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480612db957612db86141a1565b5b6001900381819060005260206000200160009055905550505050565b6000612de0836111dd565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600080823b905060008111915050919050565b828054612e7390614009565b90600052602060002090601f016020900481019282612e955760008555612edc565b82601f10612eae57805160ff1916838001178555612edc565b82800160010185558215612edc579182015b82811115612edb578251825591602001919060010190612ec0565b5b509050612ee99190612eed565b5090565b5b80821115612f06576000816000905550600101612eee565b5090565b6000612f1d612f1884613dad565b613d88565b905082815260208101848484011115612f3957612f38614233565b5b612f44848285613fc7565b509392505050565b6000612f5f612f5a84613dde565b613d88565b905082815260208101848484011115612f7b57612f7a614233565b5b612f86848285613fc7565b509392505050565b600081359050612f9d81614849565b92915050565b600081359050612fb281614860565b92915050565b600081359050612fc781614877565b92915050565b600081359050612fdc8161488e565b92915050565b600081519050612ff18161488e565b92915050565b600082601f83011261300c5761300b61422e565b5b813561301c848260208601612f0a565b91505092915050565b600081519050613034816148a5565b92915050565b600082601f83011261304f5761304e61422e565b5b813561305f848260208601612f4c565b91505092915050565b600081359050613077816148bc565b92915050565b60008135905061308c816148d3565b92915050565b6000602082840312156130a8576130a761423d565b5b60006130b684828501612f8e565b91505092915050565b600080604083850312156130d6576130d561423d565b5b60006130e485828601612f8e565b92505060206130f585828601612f8e565b9150509250929050565b6000806000606084860312156131185761311761423d565b5b600061312686828701612f8e565b935050602061313786828701612f8e565b925050604061314886828701613068565b9150509250925092565b6000806000806080858703121561316c5761316b61423d565b5b600061317a87828801612f8e565b945050602061318b87828801612f8e565b935050604061319c87828801613068565b925050606085013567ffffffffffffffff8111156131bd576131bc614238565b5b6131c987828801612ff7565b91505092959194509250565b600080604083850312156131ec576131eb61423d565b5b60006131fa85828601612f8e565b925050602061320b85828601612fa3565b9150509250929050565b600080600080600060a086880312156132315761323061423d565b5b600061323f88828901612f8e565b955050602086013567ffffffffffffffff8111156132605761325f614238565b5b61326c88828901612ff7565b945050604061327d88828901612fb8565b935050606061328e88828901612fb8565b925050608061329f8882890161307d565b9150509295509295909350565b600080604083850312156132c3576132c261423d565b5b60006132d185828601612f8e565b92505060206132e285828601613068565b9150509250929050565b6000602082840312156133025761330161423d565b5b600061331084828501612fcd565b91505092915050565b60006020828403121561332f5761332e61423d565b5b600061333d84828501612fe2565b91505092915050565b60006020828403121561335c5761335b61423d565b5b600061336a84828501613025565b91505092915050565b6000602082840312156133895761338861423d565b5b600082013567ffffffffffffffff8111156133a7576133a6614238565b5b6133b38482850161303a565b91505092915050565b6000602082840312156133d2576133d161423d565b5b60006133e084828501613068565b91505092915050565b6133f281613f2a565b82525050565b61340181613f18565b82525050565b61341861341382613f18565b6140b5565b82525050565b61342781613f3c565b82525050565b61343681613f48565b82525050565b61344d61344882613f48565b6140c7565b82525050565b600061345e82613e0f565b6134688185613e25565b9350613478818560208601613fd6565b61348181614242565b840191505092915050565b600061349782613e0f565b6134a18185613e36565b93506134b1818560208601613fd6565b80840191505092915050565b60006134c882613e1a565b6134d28185613e41565b93506134e2818560208601613fd6565b6134eb81614242565b840191505092915050565b600061350182613e1a565b61350b8185613e52565b935061351b818560208601613fd6565b80840191505092915050565b6000613534602b83613e41565b915061353f82614260565b604082019050919050565b6000613557603283613e41565b9150613562826142af565b604082019050919050565b600061357a602683613e41565b9150613585826142fe565b604082019050919050565b600061359d601c83613e41565b91506135a88261434d565b602082019050919050565b60006135c0601c83613e41565b91506135cb82614376565b602082019050919050565b60006135e3600283613e52565b91506135ee8261439f565b600282019050919050565b6000613606602483613e41565b9150613611826143c8565b604082019050919050565b6000613629601983613e41565b915061363482614417565b602082019050919050565b600061364c602c83613e41565b915061365782614440565b604082019050919050565b600061366f601383613e41565b915061367a8261448f565b602082019050919050565b6000613692602583613e41565b915061369d826144b8565b604082019050919050565b60006136b5603883613e41565b91506136c082614507565b604082019050919050565b60006136d8602a83613e41565b91506136e382614556565b604082019050919050565b60006136fb602983613e41565b9150613706826145a5565b604082019050919050565b600061371e602083613e41565b9150613729826145f4565b602082019050919050565b6000613741602c83613e41565b915061374c8261461d565b604082019050919050565b6000613764602083613e41565b915061376f8261466c565b602082019050919050565b6000613787602983613e41565b915061379282614695565b604082019050919050565b60006137aa602183613e41565b91506137b5826146e4565b604082019050919050565b60006137cd602183613e41565b91506137d882614733565b604082019050919050565b60006137f0603183613e41565b91506137fb82614782565b604082019050919050565b6000613813602c83613e41565b915061381e826147d1565b604082019050919050565b6000613836601483613e41565b915061384182614820565b602082019050919050565b61385581613fb0565b82525050565b61386481613fba565b82525050565b6000613876828461348c565b915081905092915050565b600061388d828561348c565b91506138998284613407565b6014820191508190509392505050565b60006138b582856134f6565b91506138c182846134f6565b91508190509392505050565b60006138d8826135d6565b91506138e4828561343c565b6020820191506138f4828461343c565b6020820191508190509392505050565b600060208201905061391960008301846133f8565b92915050565b600060608201905061393460008301866133f8565b61394160208301856133e9565b81810360408301526139538184613453565b9050949350505050565b600060808201905061397260008301876133f8565b61397f60208301866133f8565b61398c604083018561384c565b818103606083015261399e8184613453565b905095945050505050565b60006020820190506139be600083018461341e565b92915050565b60006020820190506139d9600083018461342d565b92915050565b60006080820190506139f4600083018761342d565b613a01602083018661384c565b613a0e60408301856133f8565b613a1b606083018461342d565b95945050505050565b6000608082019050613a39600083018761342d565b613a46602083018661385b565b613a53604083018561342d565b613a60606083018461342d565b95945050505050565b60006020820190508181036000830152613a838184613453565b905092915050565b60006020820190508181036000830152613aa581846134bd565b905092915050565b60006020820190508181036000830152613ac681613527565b9050919050565b60006020820190508181036000830152613ae68161354a565b9050919050565b60006020820190508181036000830152613b068161356d565b9050919050565b60006020820190508181036000830152613b2681613590565b9050919050565b60006020820190508181036000830152613b46816135b3565b9050919050565b60006020820190508181036000830152613b66816135f9565b9050919050565b60006020820190508181036000830152613b868161361c565b9050919050565b60006020820190508181036000830152613ba68161363f565b9050919050565b60006020820190508181036000830152613bc681613662565b9050919050565b60006020820190508181036000830152613be681613685565b9050919050565b60006020820190508181036000830152613c06816136a8565b9050919050565b60006020820190508181036000830152613c26816136cb565b9050919050565b60006020820190508181036000830152613c46816136ee565b9050919050565b60006020820190508181036000830152613c6681613711565b9050919050565b60006020820190508181036000830152613c8681613734565b9050919050565b60006020820190508181036000830152613ca681613757565b9050919050565b60006020820190508181036000830152613cc68161377a565b9050919050565b60006020820190508181036000830152613ce68161379d565b9050919050565b60006020820190508181036000830152613d06816137c0565b9050919050565b60006020820190508181036000830152613d26816137e3565b9050919050565b60006020820190508181036000830152613d4681613806565b9050919050565b60006020820190508181036000830152613d6681613829565b9050919050565b6000602082019050613d82600083018461384c565b92915050565b6000613d92613da3565b9050613d9e828261403b565b919050565b6000604051905090565b600067ffffffffffffffff821115613dc857613dc76141ff565b5b613dd182614242565b9050602081019050919050565b600067ffffffffffffffff821115613df957613df86141ff565b5b613e0282614242565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000613e6882613fb0565b9150613e7383613fb0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613ea857613ea7614114565b5b828201905092915050565b6000613ebe82613fb0565b9150613ec983613fb0565b925082613ed957613ed8614143565b5b828204905092915050565b6000613eef82613fb0565b9150613efa83613fb0565b925082821015613f0d57613f0c614114565b5b828203905092915050565b6000613f2382613f90565b9050919050565b6000613f3582613f90565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000613f8982613f18565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015613ff4578082015181840152602081019050613fd9565b83811115614003576000848401525b50505050565b6000600282049050600182168061402157607f821691505b6020821081141561403557614034614172565b5b50919050565b61404482614242565b810181811067ffffffffffffffff82111715614063576140626141ff565b5b80604052505050565b600061407782613fb0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156140aa576140a9614114565b5b600182019050919050565b60006140c0826140d1565b9050919050565b6000819050919050565b60006140dc82614253565b9050919050565b60006140ee82613fb0565b91506140f983613fb0565b92508261410957614108614143565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000600082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f6f766572206d6178696d756d206e756d62657200000000000000000000000000600082015250565b7f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360008201527f49474e4552000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360008201527f6800000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f6e6f74206f776e6572206f7220666163746f7279000000000000000000000000600082015250565b61485281613f18565b811461485d57600080fd5b50565b61486981613f3c565b811461487457600080fd5b50565b61488081613f48565b811461488b57600080fd5b50565b61489781613f52565b81146148a257600080fd5b50565b6148ae81613f7e565b81146148b957600080fd5b50565b6148c581613fb0565b81146148d057600080fd5b50565b6148dc81613fba565b81146148e757600080fd5b5056fe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a2646970667358221220ac4d95fb5068511210a69471edb672f6c50a2202d2aa980a7e3db109440b60db64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000087f8388195728e9497aa11715a352472984607a2
-----Decoded View---------------
Arg [0] : _proxyRegistryAddress (address): 0x87f8388195728e9497aA11715A352472984607a2
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000087f8388195728e9497aa11715a352472984607a2
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.