ERC-721
Overview
Max Total Supply
150 ASS8U
Holders
38
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 ASS8ULoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
NFTSales
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./ERC721Min.sol"; contract OwnableDelegateProxy {} contract OpenSeaProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract NFTSales is Ownable, ERC721Min, ReentrancyGuard { using Strings for uint256; using SafeERC20 for IERC20; address public immutable proxyRegistryAddress; // opensea proxy mapping(address => bool) proxyToApproved; // proxy allowance for interaction with future contract string private _contractURI; string private _tokenBaseURI = ""; // SET TO THE METADATA URI address private treasuryAddress = 0x5aD1Cdf35d8c2486787ba121f133FE4C776a0BFB; bool useBaseUriOnly = true; mapping(uint256 => string) public TokenURIMap; // allows for assigning individual/unique metada per token struct NftType { uint16 purchaseCount; uint16 maxPerAddress; uint16 maxPerMint; uint16 maxPerAddressForThree; uint16 maxMint; uint16 maxMintForOne; uint16 maxMintForThree; bool saleActive; uint256 price; uint256 priceForThree; mapping(address => uint256) PurchasesByAddress; string uri; } struct FeeRecipient { address recipient; uint256 basisPoints; } mapping(uint256 => FeeRecipient) public FeeRecipients; uint256 feeRecipientCount; uint256 totalFeeBasisPoints; mapping(uint256 => NftType) public NftTypes; uint256 public nftTypeCount; bool public transferEnabled; mapping(uint256 => uint256) public NftIdToNftType; constructor() ERC721Min("ASSASSIN-8 UTILITY NFT", "ASS8U") { proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; } function totalSupply() external view returns(uint256) { return _owners.length; } // ** - CORE - ** // function buyOne(uint256 nftTypeId) external payable { require(NftTypes[nftTypeId].saleActive, "SALE_CLOSED"); require(NftTypes[nftTypeId].price == msg.value, "INCORRECT_ETH"); require(NftTypes[nftTypeId].maxMintForOne > NftTypes[nftTypeId].purchaseCount, "EXCEED_MAX_SALE_SUPPLY"); require(NftTypes[nftTypeId].maxPerAddress == 0 || NftTypes[nftTypeId].PurchasesByAddress[_msgSender()] < NftTypes[nftTypeId].maxPerAddress, "EXCEED_MAX_PER_USER"); NftIdToNftType[_owners.length] = nftTypeId; _mintMin(); if (NftTypes[nftTypeId].maxPerAddress > 0) NftTypes[nftTypeId].PurchasesByAddress[_msgSender()]++; NftTypes[nftTypeId].purchaseCount++; } function buyThree(uint256 nftTypeId) external payable { require(NftTypes[nftTypeId].saleActive, "SALE_CLOSED"); require(NftTypes[nftTypeId].priceForThree == msg.value, "INCORRECT_ETH"); require(NftTypes[nftTypeId].maxMintForThree > NftTypes[nftTypeId].purchaseCount, "EXCEED_MAX_SALE_SUPPLY"); require(NftTypes[nftTypeId].maxPerAddress == 0 || NftTypes[nftTypeId].PurchasesByAddress[_msgSender()] < NftTypes[nftTypeId].maxPerAddressForThree, "EXCEED_MAX_PER_USER"); NftIdToNftType[_owners.length] = nftTypeId; _mintMin(); NftIdToNftType[_owners.length] = nftTypeId; _mintMin(); NftIdToNftType[_owners.length] = nftTypeId; _mintMin(); if (NftTypes[nftTypeId].maxPerAddress > 0) { NftTypes[nftTypeId].PurchasesByAddress[_msgSender()] += 3; } NftTypes[nftTypeId].purchaseCount += 3; } function buy(uint256 nftTypeId, uint16 amount) external payable { require(NftTypes[nftTypeId].saleActive, "SALE_CLOSED"); require(NftTypes[nftTypeId].price * amount == msg.value, "INCORRECT_ETH"); require(NftTypes[nftTypeId].maxMint > NftTypes[nftTypeId].purchaseCount + amount, "EXCEED_MAX_SALE_SUPPLY"); require(amount < NftTypes[nftTypeId].maxPerMint, "EXCEED_MAX_PER_MINT"); require(NftTypes[nftTypeId].maxPerAddress > 0 || NftTypes[nftTypeId].PurchasesByAddress[_msgSender()] + amount - 1 < NftTypes[nftTypeId].maxPerAddress, "EXCEED_MAX_PER_USER"); for (uint256 i = 0; i < amount; i++) { NftIdToNftType[_owners.length] = nftTypeId; _mintMin(); } NftTypes[nftTypeId].purchaseCount += amount; } // ** - PROXY - ** // function mintOne(address receiver, uint256 nftTypeId) external onlyProxy { NftIdToNftType[_owners.length] = nftTypeId; _mintMin2(receiver); } function mintThree(address receiver, uint256 nftTypeId) external onlyProxy { NftIdToNftType[_owners.length] = nftTypeId; _mintMin2(receiver); NftIdToNftType[_owners.length] = nftTypeId; _mintMin2(receiver); NftIdToNftType[_owners.length] = nftTypeId; _mintMin2(receiver); } function mint(address receiver, uint256 nftTypeId, uint256 tokenQuantity) external onlyProxy { for (uint256 i = 0; i < tokenQuantity; i++) { NftIdToNftType[_owners.length] = nftTypeId; _mintMin2(receiver); } } function getNftTokenIdForUserForNftType(address user, uint nftType) external view returns(uint) { uint result; uint bal = balanceOf(user); for (uint x = 0; x < bal; x++) { uint id = tokenOfOwnerByIndex(user, x); if (NftIdToNftType[id] == nftType) { return id; } } return result; } function userHasNftType(address user, uint nftType) external view returns(bool) { uint bal = balanceOf(user); for (uint x = 0; x < bal; x++) { uint id = tokenOfOwnerByIndex(user, x); if (NftIdToNftType[id] == nftType) return true; } return false; } // ** - ADMIN - ** // function addFeeRecipient(address recipient, uint256 basisPoints) external onlyOwner { feeRecipientCount++; FeeRecipients[feeRecipientCount].recipient = recipient; FeeRecipients[feeRecipientCount].basisPoints = basisPoints; totalFeeBasisPoints += basisPoints; } function editFeeRecipient(uint256 id, address recipient, uint256 basisPoints) external onlyOwner { require(id <= feeRecipientCount, "INVALID_ID"); totalFeeBasisPoints = totalFeeBasisPoints - FeeRecipients[feeRecipientCount].basisPoints + basisPoints; FeeRecipients[feeRecipientCount].recipient = recipient; FeeRecipients[feeRecipientCount].basisPoints = basisPoints; } function distributeETH() public { require(treasuryAddress != address(0), "TREASURY_NOT_SET"); uint256 bal = address(this).balance; for(uint256 x = 1; x <= feeRecipientCount; x++) { uint256 amount = bal * FeeRecipients[x].basisPoints / totalFeeBasisPoints; amount = amount > address(this).balance ? address(this).balance : amount; (bool sent, ) = FeeRecipients[x].recipient.call{value: amount}(""); require(sent, "FAILED_SENDING_FUNDS"); } emit DistributeETH(_msgSender(), bal); } function withdrawETH() public { require(treasuryAddress != address(0), "TREASURY_NOT_SET"); uint256 bal = address(this).balance; (bool sent, ) = treasuryAddress.call{value: bal}(""); require(sent, "FAILED_SENDING_FUNDS"); emit WithdrawETH(_msgSender(), bal); } function withdraw(address _token) external nonReentrant { require(_msgSender() == owner() || _msgSender() == treasuryAddress, "NOT_ALLOWED"); require(treasuryAddress != address(0), "TREASURY_NOT_SET"); IERC20(_token).safeTransfer( treasuryAddress, IERC20(_token).balanceOf(address(this)) ); } function gift(uint256 nftTypeId, address[] calldata receivers, uint256[] memory amounts) external onlyOwner { for (uint256 x = 0; x < receivers.length; x++) { for (uint256 i = 0; i < amounts[x]; i++) { NftIdToNftType[_owners.length] = nftTypeId; _mintMin2(receivers[x]); } } } // ** - NFT Types - ** // function addNftType(uint16 _maxMint, uint16 _maxPerMint, uint256 _price, uint16 _maxPerAddress, bool _saleActive, string calldata _uri) external onlyOwner { nftTypeCount++; NftTypes[nftTypeCount].maxMint = _maxMint+1; NftTypes[nftTypeCount].maxMintForOne = _maxMint; NftTypes[nftTypeCount].maxMintForThree = _maxMint-2; NftTypes[nftTypeCount].maxPerMint = _maxPerMint; NftTypes[nftTypeCount].price = _price; NftTypes[nftTypeCount].priceForThree = _price * 3; NftTypes[nftTypeCount].maxPerAddress = _maxPerAddress > 0 ? _maxPerAddress : NftTypes[nftTypeCount].maxPerAddress; NftTypes[nftTypeCount].maxPerAddressForThree = _maxPerAddress > 1 ? _maxPerAddress - 2 : NftTypes[nftTypeCount].maxPerAddress; NftTypes[nftTypeCount].saleActive = _saleActive; NftTypes[nftTypeCount].uri = _uri; } function toggleSaleActive(uint256 nftTypeId) external onlyOwner { NftTypes[nftTypeId].saleActive = !NftTypes[nftTypeId].saleActive; } function setMaxPerMint(uint256 nftTypeId, uint16 maxPerMint) external onlyOwner { NftTypes[nftTypeId].maxPerMint = maxPerMint; } function setMaxMint(uint256 nftTypeId, uint16 maxMint_) external onlyOwner { NftTypes[nftTypeId].maxMint = maxMint_ + 1; NftTypes[nftTypeId].maxMintForOne = maxMint_; NftTypes[nftTypeId].maxMintForThree = maxMint_ - 2; } function setMaxPerAddress(uint256 nftTypeId, uint16 _maxPerAddress) external onlyOwner { NftTypes[nftTypeId].maxPerAddress = _maxPerAddress > 0 ? _maxPerAddress : 0; NftTypes[nftTypeId].maxPerAddressForThree = _maxPerAddress > 1 ? _maxPerAddress - 2 : NftTypes[nftTypeCount].maxPerAddress; } function setPrice(uint256 nftTypeId, uint256 _price) external onlyOwner { NftTypes[nftTypeId].price = _price; NftTypes[nftTypeId].priceForThree = _price * 3; } function setNftTypeUri(uint256 nftTypeId, string calldata uri) external onlyOwner { NftTypes[nftTypeId].uri = uri; } // to avoid opensea listing costs function isApprovedForAll(address _owner, address operator) public view override returns (bool) { OpenSeaProxyRegistry proxyRegistry = OpenSeaProxyRegistry(proxyRegistryAddress); if ( address(proxyRegistry.proxies(_owner)) == operator || proxyToApproved[operator] ) return true; return super.isApprovedForAll(_owner, operator); } function flipProxyState(address proxyAddress) public onlyOwner { proxyToApproved[proxyAddress] = !proxyToApproved[proxyAddress]; } // ** - SETTERS - ** // function setVaultAddress(address addr) external onlyOwner { treasuryAddress = addr; } function setContractURI(string calldata URI) external onlyOwner { _contractURI = URI; } function setBaseURI(string calldata URI) external onlyOwner { _tokenBaseURI = URI; } // ** - MISC - ** // function contractURI() public view returns (string memory) { return _contractURI; } function toggleUseBaseUri() external onlyOwner { useBaseUriOnly = !useBaseUriOnly; } function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); if (bytes(TokenURIMap[tokenId]).length > 0) return TokenURIMap[tokenId]; if (bytes(NftTypes[NftIdToNftType[tokenId]].uri).length > 0) return NftTypes[NftIdToNftType[tokenId]].uri; if (useBaseUriOnly) return _tokenBaseURI; return bytes(_tokenBaseURI).length > 0 ? string(abi.encodePacked(_tokenBaseURI, tokenId.toString())) : ""; } function setTokenUri(uint256 tokenId, string calldata uri) external onlyOwner { TokenURIMap[tokenId] = uri; } function isOwnerOf(address account, uint256[] calldata _tokenIds) external view returns (bool) { for (uint256 i; i < _tokenIds.length; ++i) { if (_owners[_tokenIds[i]] != account) return false; } return true; } function setTransferEnabled(bool enabled) external onlyOwner { transferEnabled = enabled; } function setStakingContract(address stakingContract) external onlyOwner { _setStakingContract(stakingContract); } function unStake(uint256 tokenId) external onlyOwner { _unstake(tokenId); } function batchSafeTransferFrom(address _from, address _to, uint256[] memory _tokenIds, bytes memory data_) public override { require(transferEnabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED"); super.batchSafeTransferFrom(_from, _to, _tokenIds, data_); } function batchTransferFrom(address _from, address _to, uint256[] memory _tokenIds) public override { require(transferEnabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED"); super.batchTransferFrom(_from, _to, _tokenIds); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public override { require(transferEnabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED"); super.safeTransferFrom(from, to, tokenId, _data); } function transferFrom(address from, address to, uint256 tokenId) public override { require(transferEnabled || _msgSender() == owner() || proxyToApproved[_msgSender()], "TRANSFER_DISABLED"); super.transferFrom(from, to, tokenId); } modifier onlyProxy() { require(proxyToApproved[_msgSender()] == true, "onlyProxy"); _; } event DistributeETH(address indexed sender, uint256 indexed balance); event WithdrawETH(address indexed sender, uint256 indexed balance); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; abstract contract ERC721Min is Context, ERC165, IERC721, IERC721Metadata { using Address for address; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address address[] internal _owners; // 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" ); uint256 count = 0; uint256 length = _owners.length; for (uint256 i = 0; i < length; ++i) { if (owner == _owners[i]) { ++count; } } delete length; return count; } function getOwnerCount() external view returns(uint256) { return _owners.length; } /** * @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 {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Min.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); } function batchTransferFrom( address _from, address _to, uint256[] memory _tokenIds ) public virtual { for (uint256 i = 0; i < _tokenIds.length; i++) { transferFrom(_from, _to, _tokenIds[i]); } } function batchSafeTransferFrom( address _from, address _to, uint256[] memory _tokenIds, bytes memory data_ ) public virtual { for (uint256 i = 0; i < _tokenIds.length; i++) { safeTransferFrom(_from, _to, _tokenIds[i], 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 tokenId < _owners.length && _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 = ERC721Min.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), "MINT_TO_ZERO"); require(!_exists(tokenId), "TOKEN_MINTED"); _owners.push(to); emit Transfer(address(0), to, tokenId); } function _mintMin() internal virtual { _owners.push(_msgSender()); emit Transfer(address(0), _msgSender(), _owners.length - 1); } // check to != address(0) in calling function function _mintMin2(address to) internal virtual { _owners.push(to); emit Transfer(address(0), to, _owners.length - 1); } /** * @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 = ERC721Min.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _owners[tokenId] = address(0); 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( ERC721Min.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); _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(ERC721Min.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert( "ERC721: transfer to non ERC721Receiver implementer" ); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} mapping(uint256 => bool) _isStaked; address internal stakingContract; function _setStakingContract(address _stakingContract) internal virtual { stakingContract = _stakingContract; } modifier onlyStakingContract() { require( _msgSender() == stakingContract, "ONLY_STAKING_CONTRACT" ); _; } function isStaked(uint256 tokenId) external view returns(bool) { return _isStaked[tokenId]; } function stake(address user, uint256 tokenId) external onlyStakingContract { require(ownerOf(tokenId) == user, "NOT_OWNER"); require(!_isStaked[tokenId], "ALREADY_STAKED"); _isStaked[tokenId] = !_isStaked[tokenId]; } /* should only be called by contract owner */ function _unstake(uint256 tokenId) internal virtual { _isStaked[tokenId] = false; } function unstake(address user, uint256 tokenId) external onlyStakingContract { require(ownerOf(tokenId) == user, "NOT_OWNER"); _isStaked[tokenId] = false; } function tokenOfOwnerByIndex(address account, uint256 index) public view returns (uint256) { uint256 foundCount; for (uint256 i; i < _owners.length; ++i) { if (_owners[i] == account) { if (foundCount == index) return i; foundCount++; } } require(foundCount > 0, "NONE_FOUND"); revert("OUT_OF_INDEX"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"DistributeETH","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"WithdrawETH","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"FeeRecipients","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"NftIdToNftType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"NftTypes","outputs":[{"internalType":"uint16","name":"purchaseCount","type":"uint16"},{"internalType":"uint16","name":"maxPerAddress","type":"uint16"},{"internalType":"uint16","name":"maxPerMint","type":"uint16"},{"internalType":"uint16","name":"maxPerAddressForThree","type":"uint16"},{"internalType":"uint16","name":"maxMint","type":"uint16"},{"internalType":"uint16","name":"maxMintForOne","type":"uint16"},{"internalType":"uint16","name":"maxMintForThree","type":"uint16"},{"internalType":"bool","name":"saleActive","type":"bool"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceForThree","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TokenURIMap","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"name":"addFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxMint","type":"uint16"},{"internalType":"uint16","name":"_maxPerMint","type":"uint16"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint16","name":"_maxPerAddress","type":"uint16"},{"internalType":"bool","name":"_saleActive","type":"bool"},{"internalType":"string","name":"_uri","type":"string"}],"name":"addNftType","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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"batchSafeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"batchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"}],"name":"buyOne","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"}],"name":"buyThree","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"name":"editFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"flipProxyState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"nftType","type":"uint256"}],"name":"getNftTokenIdForUserForNftType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwnerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"address[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","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":"account","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"uint256","name":"tokenQuantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"nftTypeId","type":"uint256"}],"name":"mintOne","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"nftTypeId","type":"uint256"}],"name":"mintThree","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftTypeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"uint16","name":"maxMint_","type":"uint16"}],"name":"setMaxMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"uint16","name":"_maxPerAddress","type":"uint16"}],"name":"setMaxPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"uint16","name":"maxPerMint","type":"uint16"}],"name":"setMaxPerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setNftTypeUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftTypeId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakingContract","type":"address"}],"name":"setStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setTransferEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stake","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":"nftTypeId","type":"uint256"}],"name":"toggleSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleUseBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","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":[],"name":"transferEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"nftType","type":"uint256"}],"name":"userHasNftType","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040819052600060a08190526200001b91600b9162000164565b50600c80546001600160a81b03191674015ad1cdf35d8c2486787ba121f133fe4c776a0bfb1790553480156200005057600080fd5b506040518060400160405280601681526020017f415353415353494e2d38205554494c495459204e46540000000000000000000081525060405180604001604052806005815260200164415353385560d81b815250620000bf620000b96200011060201b60201c565b62000114565b8151620000d490600190602085019062000164565b508051620000ea90600290602084019062000164565b505060016008555073a5409ec958c83c3f309868babaca7c86dcb077c160805262000247565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000172906200020a565b90600052602060002090601f016020900481019282620001965760008555620001e1565b82601f10620001b157805160ff1916838001178555620001e1565b82800160010185558215620001e1579182015b82811115620001e1578251825591602001919060010190620001c4565b50620001ef929150620001f3565b5090565b5b80821115620001ef5760008155600101620001f4565b600181811c908216806200021f57607f821691505b602082108114156200024157634e487b7160e01b600052602260045260246000fd5b50919050565b6080516147b76200026a60003960008181610a030152612ba101526147b76000f3fe6080604052600436106103b85760003560e01c8063913d9e1b116101f2578063c87b56dd1161010d578063e8a3d485116100a0578063f2fde38b1161006f578063f2fde38b14610b39578063f3993d1114610b59578063f73c814b14610b79578063f7d9757714610b9957600080fd5b8063e8a3d48514610af1578063e985e9c514610b06578063ea162e1b14610b26578063ef18374a1461054057600080fd5b8063e086e5ec116100dc578063e086e5ec14610a65578063e35805b314610a7a578063e39f433614610a9a578063e5c6f57714610aba57600080fd5b8063c87b56dd146109d1578063cd7c0326146109f1578063cdead76b14610a25578063d48e13c314610a4557600080fd5b8063b88d4fde11610185578063bccb3bb611610154578063bccb3bb614610944578063bf60dc2114610964578063c204135214610984578063c2a672e0146109b157600080fd5b8063b88d4fde146108bf578063b8b9b549146108df578063baa51f86146108f4578063bb8b4d531461092457600080fd5b80639dd373b9116101c15780639dd373b91461083f5780639fe9f6231461085f578063a22cb4651461087f578063adc9772e1461089f57600080fd5b8063913d9e1b146107d457806392721d43146107ea578063938e3d7b1461080a57806395d89b411461082a57600080fd5b80634939cc2f116102e25780635d3eea9111610275578063715018a611610244578063715018a61461076157806380c7712c1461077657806385535cc5146107965780638da5cb5b146107b657600080fd5b80635d3eea91146106e15780636352211e146107015780636909dc121461072157806370a082311461074157600080fd5b80635268bb02116102b15780635268bb021461066157806355f804b31461068157806357f7789e146106a15780635a4fee30146106c157600080fd5b80634939cc2f146105e75780634cd412d5146106075780634d44660c1461062157806351cff8d91461064157600080fd5b8063156e29f61161035a578063292beb5411610329578063292beb541461057f5780632f745c5914610594578063310bddff146105b457806342842e0e146105c757600080fd5b8063156e29f61461050d578063177cd6401461052d57806318160ddd1461054057806323b872dd1461055f57600080fd5b806306fdde031161039657806306fdde03146104345780630753657614610456578063081812fc146104b5578063095ea7b3146104ed57600080fd5b806301ffc9a7146103bd5780630229f77f146103f257806305dfd2c014610414575b600080fd5b3480156103c957600080fd5b506103dd6103d8366004613ab0565b610bb9565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b5061041261040d366004613b3a565b610c0b565b005b34801561042057600080fd5b5061041261042f366004613be0565b610e33565b34801561044057600080fd5b50610449610f0d565b6040516103e99190613c70565b34801561046257600080fd5b50610496610471366004613c83565b600e60205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b0390931683526020830191909152016103e9565b3480156104c157600080fd5b506104d56104d0366004613c83565b610f9f565b6040516001600160a01b0390911681526020016103e9565b3480156104f957600080fd5b50610412610508366004613c9c565b611027565b34801561051957600080fd5b50610412610528366004613cc8565b61113d565b61041261053b366004613c83565b6111b1565b34801561054c57600080fd5b506003545b6040519081526020016103e9565b34801561056b57600080fd5b5061041261057a366004613cfd565b611360565b34801561058b57600080fd5b506104126113bc565b3480156105a057600080fd5b506105516105af366004613c9c565b611407565b6104126105c2366004613d2d565b6114f3565b3480156105d357600080fd5b506104126105e2366004613cfd565b61172b565b3480156105f357600080fd5b50610412610602366004613d2d565b611746565b34801561061357600080fd5b506013546103dd9060ff1681565b34801561062d57600080fd5b506103dd61063c366004613d9d565b611815565b34801561064d57600080fd5b5061041261065c366004613df1565b611897565b34801561066d57600080fd5b506103dd61067c366004613c9c565b611a0a565b34801561068d57600080fd5b5061041261069c366004613e0e565b611a72565b3480156106ad57600080fd5b506104126106bc366004613e4f565b611aa8565b3480156106cd57600080fd5b506104126106dc366004613fb6565b611aeb565b3480156106ed57600080fd5b506104126106fc366004613c83565b611b48565b34801561070d57600080fd5b506104d561071c366004613c83565b611b8d565b34801561072d57600080fd5b5061044961073c366004613c83565b611c19565b34801561074d57600080fd5b5061055161075c366004613df1565b611cb3565b34801561076d57600080fd5b50610412611d85565b34801561078257600080fd5b50610412610791366004613e4f565b611dbb565b3480156107a257600080fd5b506104126107b1366004613df1565b611e01565b3480156107c257600080fd5b506000546001600160a01b03166104d5565b3480156107e057600080fd5b5061055160125481565b3480156107f657600080fd5b50610551610805366004613c9c565b611e4d565b34801561081657600080fd5b50610412610825366004613e0e565b611eb5565b34801561083657600080fd5b50610449611eeb565b34801561084b57600080fd5b5061041261085a366004613df1565b611efa565b34801561086b57600080fd5b5061041261087a36600461403e565b611f42565b34801561088b57600080fd5b5061041261089a36600461405b565b611f7f565b3480156108ab57600080fd5b506104126108ba366004613c9c565b612044565b3480156108cb57600080fd5b506104126108da366004614094565b612165565b3480156108eb57600080fd5b506104126121c2565b34801561090057600080fd5b506103dd61090f366004613c83565b60009081526006602052604090205460ff1690565b34801561093057600080fd5b5061041261093f366004613d2d565b612324565b34801561095057600080fd5b5061041261095f366004613c83565b6123dc565b34801561097057600080fd5b5061041261097f366004613c9c565b612433565b34801561099057600080fd5b5061055161099f366004613c83565b60146020526000908152604090205481565b3480156109bd57600080fd5b506104126109cc366004613c9c565b6124c6565b3480156109dd57600080fd5b506104496109ec366004613c83565b61258f565b3480156109fd57600080fd5b506104d57f000000000000000000000000000000000000000000000000000000000000000081565b348015610a3157600080fd5b50610412610a40366004613c9c565b612792565b348015610a5157600080fd5b50610412610a60366004613c9c565b612821565b348015610a7157600080fd5b50610412612855565b348015610a8657600080fd5b50610412610a953660046140f3565b61294c565b348015610aa657600080fd5b50610412610ab5366004613d2d565b612a14565b348015610ac657600080fd5b50610ada610ad5366004613c83565b612a6f565b6040516103e99b9a99989796959493929190614159565b348015610afd57600080fd5b50610449612b70565b348015610b1257600080fd5b506103dd610b213660046141d2565b612b7f565b610412610b34366004613c83565b612c81565b348015610b4557600080fd5b50610412610b54366004613df1565b612e74565b348015610b6557600080fd5b50610412610b74366004614200565b612f0c565b348015610b8557600080fd5b50610412610b94366004613df1565b612f68565b348015610ba557600080fd5b50610412610bb4366004614261565b612fbb565b60006001600160e01b031982166380ac58cd60e01b1480610bea57506001600160e01b03198216635b5e139f60e01b145b80610c0557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b03163314610c3e5760405162461bcd60e51b8152600401610c3590614283565b60405180910390fd5b60128054906000610c4e836142ce565b90915550610c5f90508760016142e9565b60128054600090815260116020526040808220805469ffff00000000000000001916600160401b61ffff968716021790559154815220805461ffff60501b1916600160501b928a1692909202919091179055610cbc60028861430f565b60128054600090815260116020526040808220805461ffff60601b1916600160601b61ffff9687160217905582548252808220805465ffff000000001916640100000000958c1695909502949094179093559054815220600101859055610d24856003614332565b60125460009081526011602052604090206002015561ffff8416610d635760125460009081526011602052604090205462010000900461ffff16610d65565b835b6012546000908152601160205260409020805463ffff000019166201000061ffff93841602179055600190851611610db85760125460009081526011602052604090205462010000900461ffff16610dc3565b610dc360028561430f565b60128054600090815260116020526040808220805467ffff0000000000001916600160301b61ffff96909616959095029490941790935581548152828120805460ff60701b1916600160701b881515021790559054815220610e29906004018383613a01565b5050505050505050565b6000546001600160a01b03163314610e5d5760405162461bcd60e51b8152600401610c3590614283565b600f54831115610e9c5760405162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b6044820152606401610c35565b600f546000908152600e60205260409020600101546010548291610ebf91614351565b610ec99190614368565b601055600f80546000908152600e602052604080822080546001600160a01b0319166001600160a01b03969096169590951790945590548152919091206001015550565b606060018054610f1c90614380565b80601f0160208091040260200160405190810160405280929190818152602001828054610f4890614380565b8015610f955780601f10610f6a57610100808354040283529160200191610f95565b820191906000526020600020905b815481529060010190602001808311610f7857829003601f168201915b5050505050905090565b6000610faa8261301d565b61100b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c35565b506000908152600460205260409020546001600160a01b031690565b600061103282611b8d565b9050806001600160a01b0316836001600160a01b031614156110a05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c35565b336001600160a01b03821614806110bc57506110bc8133612b7f565b61112e5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c35565b6111388383613067565b505050565b3360009081526009602052604090205460ff1615156001146111715760405162461bcd60e51b8152600401610c35906143bb565b60005b818110156111ab576003546000908152601460205260409020839055611199846130d5565b806111a3816142ce565b915050611174565b50505050565b600081815260116020526040902054600160701b900460ff166111e65760405162461bcd60e51b8152600401610c35906143de565b60008181526011602052604090206001015434146112165760405162461bcd60e51b8152600401610c3590614403565b60008181526011602052604090205461ffff808216600160501b90920416116112515760405162461bcd60e51b8152600401610c359061442a565b60008181526011602052604090205462010000900461ffff1615806112a05750600081815260116020908152604080832080543385526003909101909252909120546201000090910461ffff16115b6112bc5760405162461bcd60e51b8152600401610c359061445a565b60035460009081526014602052604090208190556112d8613167565b60008181526011602052604090205462010000900461ffff1615611324576000818152601160209081526040808320338452600301909152812080549161131e836142ce565b91905055505b6000818152601160205260408120805461ffff169161134283614487565b91906101000a81548161ffff021916908361ffff1602179055505050565b60135460ff168061137b57506000546001600160a01b031633145b8061139557503360009081526009602052604090205460ff165b6113b15760405162461bcd60e51b8152600401610c35906144a9565b6111388383836131e6565b6000546001600160a01b031633146113e65760405162461bcd60e51b8152600401610c3590614283565b600c805460ff60a01b198116600160a01b9182900460ff1615909102179055565b60008060005b60035481101561147e57846001600160a01b031660038281548110611434576114346144d4565b6000918252602090912001546001600160a01b0316141561146e5783821415611460579150610c059050565b8161146a816142ce565b9250505b611477816142ce565b905061140d565b50600081116114bc5760405162461bcd60e51b815260206004820152600a6024820152691393d39157d193d5539160b21b6044820152606401610c35565b60405162461bcd60e51b815260206004820152600c60248201526b09eaaa8be9e8cbe929c888ab60a31b6044820152606401610c35565b600082815260116020526040902054600160701b900460ff166115285760405162461bcd60e51b8152600401610c35906143de565b600082815260116020526040902060010154349061154b9061ffff841690614332565b146115685760405162461bcd60e51b8152600401610c3590614403565b60008281526011602052604090205461158690829061ffff166142e9565b60008381526011602052604090205461ffff918216600160401b909104909116116115c35760405162461bcd60e51b8152600401610c359061442a565b60008281526011602052604090205461ffff6401000000009091048116908216106116265760405162461bcd60e51b8152602060048201526013602482015272115610d1515117d3505617d4115497d3525395606a1b6044820152606401610c35565b60008281526011602052604090205462010000900461ffff1615158061169157506000828152601160209081526040808320805433855260039091019092529091205461ffff6201000090920482169160019161168591851690614368565b61168f9190614351565b105b6116ad5760405162461bcd60e51b8152600401610c359061445a565b60005b8161ffff168110156116ea5760035460009081526014602052604090208390556116d8613167565b806116e2816142ce565b9150506116b0565b506000828152601160205260408120805483929061170d90849061ffff166142e9565b92506101000a81548161ffff021916908361ffff1602179055505050565b61113883838360405180602001604052806000815250612165565b6000546001600160a01b031633146117705760405162461bcd60e51b8152600401610c3590614283565b60008161ffff1611611783576000611785565b805b6000838152601160205260409020805463ffff000019166201000061ffff938416021790556001908216116117d55760125460009081526011602052604090205462010000900461ffff166117e0565b6117e060028261430f565b600092835260116020526040909220805461ffff93909316600160301b0267ffff000000000000199093169290921790915550565b6000805b8281101561188a57846001600160a01b0316600385858481811061183f5761183f6144d4565b9050602002013581548110611856576118566144d4565b6000918252602090912001546001600160a01b03161461187a576000915050611890565b611883816142ce565b9050611819565b50600190505b9392505050565b600260085414156118ea5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c35565b60026008556000546001600160a01b031633148061191b5750600c546001600160a01b0316336001600160a01b0316145b6119555760405162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b6044820152606401610c35565b600c546001600160a01b031661197d5760405162461bcd60e51b8152600401610c35906144ea565b600c546040516370a0823160e01b8152306004820152611a02916001600160a01b0390811691908416906370a0823190602401602060405180830381865afa1580156119cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f19190614514565b6001600160a01b0384169190613217565b506001600855565b600080611a1684611cb3565b905060005b81811015611a67576000611a2f8683611407565b600081815260146020526040902054909150851415611a545760019350505050610c05565b5080611a5f816142ce565b915050611a1b565b506000949350505050565b6000546001600160a01b03163314611a9c5760405162461bcd60e51b8152600401610c3590614283565b611138600b8383613a01565b6000546001600160a01b03163314611ad25760405162461bcd60e51b8152600401610c3590614283565b6000838152600d602052604090206111ab908383613a01565b60135460ff1680611b0657506000546001600160a01b031633145b80611b2057503360009081526009602052604090205460ff165b611b3c5760405162461bcd60e51b8152600401610c35906144a9565b6111ab84848484613269565b6000546001600160a01b03163314611b725760405162461bcd60e51b8152600401610c3590614283565b6000908152600660205260409020805460ff19169055565b50565b60008060038381548110611ba357611ba36144d4565b6000918252602090912001546001600160a01b0316905080610c055760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610c35565b600d6020526000908152604090208054611c3290614380565b80601f0160208091040260200160405190810160405280929190818152602001828054611c5e90614380565b8015611cab5780601f10611c8057610100808354040283529160200191611cab565b820191906000526020600020905b815481529060010190602001808311611c8e57829003601f168201915b505050505081565b60006001600160a01b038216611d1e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c35565b600354600090815b81811015611d7c5760038181548110611d4157611d416144d4565b6000918252602090912001546001600160a01b0386811691161415611d6c57611d69836142ce565b92505b611d75816142ce565b9050611d26565b50909392505050565b6000546001600160a01b03163314611daf5760405162461bcd60e51b8152600401610c3590614283565b611db960006132ac565b565b6000546001600160a01b03163314611de55760405162461bcd60e51b8152600401610c3590614283565b60008381526011602052604090206111ab906004018383613a01565b6000546001600160a01b03163314611e2b5760405162461bcd60e51b8152600401610c3590614283565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000611e5b85611cb3565b905060005b81811015611eab576000611e748783611407565b600081815260146020526040902054909150861415611e98579350610c0592505050565b5080611ea3816142ce565b915050611e60565b5090949350505050565b6000546001600160a01b03163314611edf5760405162461bcd60e51b8152600401610c3590614283565b611138600a8383613a01565b606060028054610f1c90614380565b6000546001600160a01b03163314611f245760405162461bcd60e51b8152600401610c3590614283565b600780546001600160a01b0319166001600160a01b03831617905550565b6000546001600160a01b03163314611f6c5760405162461bcd60e51b8152600401610c3590614283565b6013805460ff1916911515919091179055565b6001600160a01b038216331415611fd85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c35565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6007546001600160a01b0316336001600160a01b03161461209f5760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610c35565b816001600160a01b03166120b282611b8d565b6001600160a01b0316146120f45760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610c35565b60008181526006602052604090205460ff16156121445760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b6044820152606401610c35565b6000908152600660205260409020805460ff19811660ff9091161517905550565b60135460ff168061218057506000546001600160a01b031633145b8061219a57503360009081526009602052604090205460ff165b6121b65760405162461bcd60e51b8152600401610c35906144a9565b6111ab848484846132fc565b600c546001600160a01b03166121ea5760405162461bcd60e51b8152600401610c35906144ea565b4760015b600f5481116122f3576010546000828152600e60205260408120600101549091906122199085614332565b6122239190614543565b90504781116122325780612234565b475b6000838152600e602052604080822054905192935090916001600160a01b039091169083908381818185875af1925050503d8060008114612291576040519150601f19603f3d011682016040523d82523d6000602084013e612296565b606091505b50509050806122de5760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610c35565b505080806122eb906142ce565b9150506121ee565b50604051819033907f0d20f677b24c0f42423a7e690ab1d066e4ae75145c497a68b1f34bd34944d12290600090a350565b6000546001600160a01b0316331461234e5760405162461bcd60e51b8152600401610c3590614283565b6123598160016142e9565b600083815260116020526040902080546bffffffff00000000000000001916600160401b61ffff9384160261ffff60501b191617600160501b928416929092029190911790556123aa60028261430f565b600092835260116020526040909220805461ffff93909316600160601b0261ffff60601b199093169290921790915550565b6000546001600160a01b031633146124065760405162461bcd60e51b8152600401610c3590614283565b6000908152601160205260409020805460ff60701b198116600160701b9182900460ff1615909102179055565b6000546001600160a01b0316331461245d5760405162461bcd60e51b8152600401610c3590614283565b600f805490600061246d836142ce565b9091555050600f80546000908152600e602052604080822080546001600160a01b0319166001600160a01b03871617905591548152908120600101829055601080548392906124bd908490614368565b90915550505050565b6007546001600160a01b0316336001600160a01b0316146125215760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610c35565b816001600160a01b031661253482611b8d565b6001600160a01b0316146125765760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610c35565b6000908152600660205260409020805460ff1916905550565b606061259a8261301d565b6125fe5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c35565b6000828152600d60205260408120805461261790614380565b905011156126bd576000828152600d60205260409020805461263890614380565b80601f016020809104026020016040519081016040528092919081815260200182805461266490614380565b80156126b15780601f10612686576101008083540402835291602001916126b1565b820191906000526020600020905b81548152906001019060200180831161269457829003601f168201915b50505050509050919050565b60008281526014602090815260408083205483526011909152812060040180546126e690614380565b9050111561271757600082815260146020908152604080832054835260119091529020600401805461263890614380565b600c54600160a01b900460ff161561273657600b805461263890614380565b6000600b805461274590614380565b9050116127615760405180602001604052806000815250610c05565b600b61276c8361332e565b60405160200161277d929190614573565b60405160208183030381529060405292915050565b3360009081526009602052604090205460ff1615156001146127c65760405162461bcd60e51b8152600401610c35906143bb565b60035460009081526014602052604090208190556127e3826130d5565b6003546000908152601460205260409020819055612800826130d5565b600354600090815260146020526040902081905561281d826130d5565b5050565b3360009081526009602052604090205460ff1615156001146128005760405162461bcd60e51b8152600401610c35906143bb565b600c546001600160a01b031661287d5760405162461bcd60e51b8152600401610c35906144ea565b600c5460405147916000916001600160a01b039091169083908381818185875af1925050503d80600081146128ce576040519150601f19603f3d011682016040523d82523d6000602084013e6128d3565b606091505b505090508061291b5760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610c35565b604051829033907f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b7990600090a35050565b6000546001600160a01b031633146129765760405162461bcd60e51b8152600401610c3590614283565b60005b82811015612a0d5760005b828281518110612996576129966144d4565b60200260200101518110156129fa5760035460009081526014602052604090208690556129e88585848181106129ce576129ce6144d4565b90506020020160208101906129e39190613df1565b6130d5565b806129f2816142ce565b915050612984565b5080612a05816142ce565b915050612979565b5050505050565b6000546001600160a01b03163314612a3e5760405162461bcd60e51b8152600401610c3590614283565b600091825260116020526040909120805461ffff9092166401000000000265ffff0000000019909216919091179055565b601160205260009081526040902080546001820154600283015460048401805461ffff808616966201000087048216966401000000008104831696600160301b8204841696600160401b8304851696600160501b8404861696600160601b850490961695600160701b90940460ff16949293919291612aed90614380565b80601f0160208091040260200160405190810160405280929190818152602001828054612b1990614380565b8015612b665780601f10612b3b57610100808354040283529160200191612b66565b820191906000526020600020905b815481529060010190602001808311612b4957829003601f168201915b505050505090508b565b6060600a8054610f1c90614380565b60405163c455279160e01b81526001600160a01b0383811660048301526000917f000000000000000000000000000000000000000000000000000000000000000091848116919083169063c455279190602401602060405180830381865afa158015612bef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c13919061461a565b6001600160a01b03161480612c4057506001600160a01b03831660009081526009602052604090205460ff165b15612c4f576001915050610c05565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b600081815260116020526040902054600160701b900460ff16612cb65760405162461bcd60e51b8152600401610c35906143de565b6000818152601160205260409020600201543414612ce65760405162461bcd60e51b8152600401610c3590614403565b60008181526011602052604090205461ffff808216600160601b9092041611612d215760405162461bcd60e51b8152600401610c359061442a565b60008181526011602052604090205462010000900461ffff161580612d71575060008181526011602090815260408083208054338552600390910190925290912054600160301b90910461ffff16115b612d8d5760405162461bcd60e51b8152600401610c359061445a565b6003546000908152601460205260409020819055612da9613167565b6003546000908152601460205260409020819055612dc5613167565b6003546000908152601460205260409020819055612de1613167565b60008181526011602052604090205462010000900461ffff1615612e3457600081815260116020908152604080832033845260039081019092528220805491929091612e2e908490614368565b90915550505b6000818152601160205260408120805460039290612e5790849061ffff166142e9565b92506101000a81548161ffff021916908361ffff16021790555050565b6000546001600160a01b03163314612e9e5760405162461bcd60e51b8152600401610c3590614283565b6001600160a01b038116612f035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c35565b611b8a816132ac565b60135460ff1680612f2757506000546001600160a01b031633145b80612f4157503360009081526009602052604090205460ff165b612f5d5760405162461bcd60e51b8152600401610c35906144a9565b61113883838361342b565b6000546001600160a01b03163314612f925760405162461bcd60e51b8152600401610c3590614283565b6001600160a01b03166000908152600960205260409020805460ff19811660ff90911615179055565b6000546001600160a01b03163314612fe55760405162461bcd60e51b8152600401610c3590614283565b6000828152601160205260409020600101819055613004816003614332565b6000928352601160205260409092206002019190915550565b60035460009082108015610c05575060006001600160a01b03166003838154811061304a5761304a6144d4565b6000918252602090912001546001600160a01b0316141592915050565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061309c82611b8d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319166001600160a01b038516179055905461312e9190614351565b6040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319163317905590546131b79190614351565b60405133906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4565b6131f0338261346d565b61320c5760405162461bcd60e51b8152600401610c3590614637565b61113883838361352f565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611138908490613685565b60005b8251811015612a0d5761329a858585848151811061328c5761328c6144d4565b602002602001015185612165565b806132a4816142ce565b91505061326c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613306338361346d565b6133225760405162461bcd60e51b8152600401610c3590614637565b6111ab84848484613757565b6060816133525750506040805180820190915260018152600360fc1b602082015290565b8160005b811561337c5780613366816142ce565b91506133759050600a83614543565b9150613356565b6000816001600160401b0381111561339657613396613e8d565b6040519080825280601f01601f1916602001820160405280156133c0576020820181803683370190505b5090505b8415612c79576133d5600183614351565b91506133e2600a86614688565b6133ed906030614368565b60f81b818381518110613402576134026144d4565b60200101906001600160f81b031916908160001a905350613424600a86614543565b94506133c4565b60005b81518110156111ab5761345b848484848151811061344e5761344e6144d4565b6020026020010151611360565b80613465816142ce565b91505061342e565b60006134788261301d565b6134d95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c35565b60006134e483611b8d565b9050806001600160a01b0316846001600160a01b0316148061351f5750836001600160a01b031661351484610f9f565b6001600160a01b0316145b80612c795750612c798185612b7f565b826001600160a01b031661354282611b8d565b6001600160a01b0316146135aa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610c35565b6001600160a01b03821661360c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c35565b613617600082613067565b816003828154811061362b5761362b6144d4565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60006136da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661378a9092919063ffffffff16565b80519091501561113857808060200190518101906136f8919061469c565b6111385760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c35565b61376284848461352f565b61376e84848484613799565b6111ab5760405162461bcd60e51b8152600401610c35906146b9565b6060612c798484600085613897565b60006001600160a01b0384163b1561388c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137dd90339089908890889060040161470b565b6020604051808303816000875af1925050508015613818575060408051601f3d908101601f1916820190925261381591810190614748565b60015b613872573d808015613846576040519150601f19603f3d011682016040523d82523d6000602084013e61384b565b606091505b50805161386a5760405162461bcd60e51b8152600401610c35906146b9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612c79565b506001949350505050565b6060824710156138f85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610c35565b6001600160a01b0385163b61394f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c35565b600080866001600160a01b0316858760405161396b9190614765565b60006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50915091506139bd8282866139c8565b979650505050505050565b606083156139d7575081611890565b8251156139e75782518084602001fd5b8160405162461bcd60e51b8152600401610c359190613c70565b828054613a0d90614380565b90600052602060002090601f016020900481019282613a2f5760008555613a75565b82601f10613a485782800160ff19823516178555613a75565b82800160010185558215613a75579182015b82811115613a75578235825591602001919060010190613a5a565b50613a81929150613a85565b5090565b5b80821115613a815760008155600101613a86565b6001600160e01b031981168114611b8a57600080fd5b600060208284031215613ac257600080fd5b813561189081613a9a565b803561ffff81168114613adf57600080fd5b919050565b8015158114611b8a57600080fd5b60008083601f840112613b0457600080fd5b5081356001600160401b03811115613b1b57600080fd5b602083019150836020828501011115613b3357600080fd5b9250929050565b600080600080600080600060c0888a031215613b5557600080fd5b613b5e88613acd565b9650613b6c60208901613acd565b955060408801359450613b8160608901613acd565b93506080880135613b9181613ae4565b925060a08801356001600160401b03811115613bac57600080fd5b613bb88a828b01613af2565b989b979a50959850939692959293505050565b6001600160a01b0381168114611b8a57600080fd5b600080600060608486031215613bf557600080fd5b833592506020840135613c0781613bcb565b929592945050506040919091013590565b60005b83811015613c33578181015183820152602001613c1b565b838111156111ab5750506000910152565b60008151808452613c5c816020860160208601613c18565b601f01601f19169290920160200192915050565b6020815260006118906020830184613c44565b600060208284031215613c9557600080fd5b5035919050565b60008060408385031215613caf57600080fd5b8235613cba81613bcb565b946020939093013593505050565b600080600060608486031215613cdd57600080fd5b8335613ce881613bcb565b95602085013595506040909401359392505050565b600080600060608486031215613d1257600080fd5b8335613d1d81613bcb565b92506020840135613c0781613bcb565b60008060408385031215613d4057600080fd5b82359150613d5060208401613acd565b90509250929050565b60008083601f840112613d6b57600080fd5b5081356001600160401b03811115613d8257600080fd5b6020830191508360208260051b8501011115613b3357600080fd5b600080600060408486031215613db257600080fd5b8335613dbd81613bcb565b925060208401356001600160401b03811115613dd857600080fd5b613de486828701613d59565b9497909650939450505050565b600060208284031215613e0357600080fd5b813561189081613bcb565b60008060208385031215613e2157600080fd5b82356001600160401b03811115613e3757600080fd5b613e4385828601613af2565b90969095509350505050565b600080600060408486031215613e6457600080fd5b8335925060208401356001600160401b03811115613e8157600080fd5b613de486828701613af2565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613ecb57613ecb613e8d565b604052919050565b600082601f830112613ee457600080fd5b813560206001600160401b03821115613eff57613eff613e8d565b8160051b613f0e828201613ea3565b9283528481018201928281019087851115613f2857600080fd5b83870192505b848310156139bd57823582529183019190830190613f2e565b600082601f830112613f5857600080fd5b81356001600160401b03811115613f7157613f71613e8d565b613f84601f8201601f1916602001613ea3565b818152846020838601011115613f9957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215613fcc57600080fd5b8435613fd781613bcb565b93506020850135613fe781613bcb565b925060408501356001600160401b038082111561400357600080fd5b61400f88838901613ed3565b9350606087013591508082111561402557600080fd5b5061403287828801613f47565b91505092959194509250565b60006020828403121561405057600080fd5b813561189081613ae4565b6000806040838503121561406e57600080fd5b823561407981613bcb565b9150602083013561408981613ae4565b809150509250929050565b600080600080608085870312156140aa57600080fd5b84356140b581613bcb565b935060208501356140c581613bcb565b92506040850135915060608501356001600160401b038111156140e757600080fd5b61403287828801613f47565b6000806000806060858703121561410957600080fd5b8435935060208501356001600160401b038082111561412757600080fd5b61413388838901613d59565b9095509350604087013591508082111561414c57600080fd5b5061403287828801613ed3565b600061016061ffff808f168452808e166020850152808d166040850152808c166060850152808b166080850152808a1660a085015280891660c08501525086151560e08401528561010084015284610120840152806101408401526141c081840185613c44565b9e9d5050505050505050505050505050565b600080604083850312156141e557600080fd5b82356141f081613bcb565b9150602083013561408981613bcb565b60008060006060848603121561421557600080fd5b833561422081613bcb565b9250602084013561423081613bcb565b915060408401356001600160401b0381111561424b57600080fd5b61425786828701613ed3565b9150509250925092565b6000806040838503121561427457600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156142e2576142e26142b8565b5060010190565b600061ffff808316818516808303821115614306576143066142b8565b01949350505050565b600061ffff8381169083168181101561432a5761432a6142b8565b039392505050565b600081600019048311821515161561434c5761434c6142b8565b500290565b600082821015614363576143636142b8565b500390565b6000821982111561437b5761437b6142b8565b500190565b600181811c9082168061439457607f821691505b602082108114156143b557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600990820152686f6e6c7950726f787960b81b604082015260600190565b6020808252600b908201526a14d0531157d0d313d4d15160aa1b604082015260600190565b6020808252600d908201526c0929c869ea4a48a86a8be8aa89609b1b604082015260600190565b6020808252601690820152754558434545445f4d41585f53414c455f535550504c5960501b604082015260600190565b60208082526013908201527222ac21a2a2a22fa6a0ac2fa822a92faaa9a2a960691b604082015260600190565b600061ffff8083168181141561449f5761449f6142b8565b6001019392505050565b6020808252601190820152701514905394d1915497d11254d050931151607a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f1514915054d5549657d393d517d4d15560821b604082015260600190565b60006020828403121561452657600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b6000826145525761455261452d565b500490565b60008151614569818560208601613c18565b9290920192915050565b600080845481600182811c91508083168061458f57607f831692505b60208084108214156145af57634e487b7160e01b86526022600452602486fd5b8180156145c357600181146145d457614601565b60ff19861689528489019650614601565b60008b81526020902060005b868110156145f95781548b8201529085019083016145e0565b505084890196505b5050505050506146118185614557565b95945050505050565b60006020828403121561462c57600080fd5b815161189081613bcb565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000826146975761469761452d565b500690565b6000602082840312156146ae57600080fd5b815161189081613ae4565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061473e90830184613c44565b9695505050505050565b60006020828403121561475a57600080fd5b815161189081613a9a565b60008251614777818460208701613c18565b919091019291505056fea26469706673582212204cfbb34d61d2e4d62d42a7ee28a8ba756136cefffc67f8c8fe62007df5eb60e364736f6c634300080b0033
Deployed Bytecode
0x6080604052600436106103b85760003560e01c8063913d9e1b116101f2578063c87b56dd1161010d578063e8a3d485116100a0578063f2fde38b1161006f578063f2fde38b14610b39578063f3993d1114610b59578063f73c814b14610b79578063f7d9757714610b9957600080fd5b8063e8a3d48514610af1578063e985e9c514610b06578063ea162e1b14610b26578063ef18374a1461054057600080fd5b8063e086e5ec116100dc578063e086e5ec14610a65578063e35805b314610a7a578063e39f433614610a9a578063e5c6f57714610aba57600080fd5b8063c87b56dd146109d1578063cd7c0326146109f1578063cdead76b14610a25578063d48e13c314610a4557600080fd5b8063b88d4fde11610185578063bccb3bb611610154578063bccb3bb614610944578063bf60dc2114610964578063c204135214610984578063c2a672e0146109b157600080fd5b8063b88d4fde146108bf578063b8b9b549146108df578063baa51f86146108f4578063bb8b4d531461092457600080fd5b80639dd373b9116101c15780639dd373b91461083f5780639fe9f6231461085f578063a22cb4651461087f578063adc9772e1461089f57600080fd5b8063913d9e1b146107d457806392721d43146107ea578063938e3d7b1461080a57806395d89b411461082a57600080fd5b80634939cc2f116102e25780635d3eea9111610275578063715018a611610244578063715018a61461076157806380c7712c1461077657806385535cc5146107965780638da5cb5b146107b657600080fd5b80635d3eea91146106e15780636352211e146107015780636909dc121461072157806370a082311461074157600080fd5b80635268bb02116102b15780635268bb021461066157806355f804b31461068157806357f7789e146106a15780635a4fee30146106c157600080fd5b80634939cc2f146105e75780634cd412d5146106075780634d44660c1461062157806351cff8d91461064157600080fd5b8063156e29f61161035a578063292beb5411610329578063292beb541461057f5780632f745c5914610594578063310bddff146105b457806342842e0e146105c757600080fd5b8063156e29f61461050d578063177cd6401461052d57806318160ddd1461054057806323b872dd1461055f57600080fd5b806306fdde031161039657806306fdde03146104345780630753657614610456578063081812fc146104b5578063095ea7b3146104ed57600080fd5b806301ffc9a7146103bd5780630229f77f146103f257806305dfd2c014610414575b600080fd5b3480156103c957600080fd5b506103dd6103d8366004613ab0565b610bb9565b60405190151581526020015b60405180910390f35b3480156103fe57600080fd5b5061041261040d366004613b3a565b610c0b565b005b34801561042057600080fd5b5061041261042f366004613be0565b610e33565b34801561044057600080fd5b50610449610f0d565b6040516103e99190613c70565b34801561046257600080fd5b50610496610471366004613c83565b600e60205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b0390931683526020830191909152016103e9565b3480156104c157600080fd5b506104d56104d0366004613c83565b610f9f565b6040516001600160a01b0390911681526020016103e9565b3480156104f957600080fd5b50610412610508366004613c9c565b611027565b34801561051957600080fd5b50610412610528366004613cc8565b61113d565b61041261053b366004613c83565b6111b1565b34801561054c57600080fd5b506003545b6040519081526020016103e9565b34801561056b57600080fd5b5061041261057a366004613cfd565b611360565b34801561058b57600080fd5b506104126113bc565b3480156105a057600080fd5b506105516105af366004613c9c565b611407565b6104126105c2366004613d2d565b6114f3565b3480156105d357600080fd5b506104126105e2366004613cfd565b61172b565b3480156105f357600080fd5b50610412610602366004613d2d565b611746565b34801561061357600080fd5b506013546103dd9060ff1681565b34801561062d57600080fd5b506103dd61063c366004613d9d565b611815565b34801561064d57600080fd5b5061041261065c366004613df1565b611897565b34801561066d57600080fd5b506103dd61067c366004613c9c565b611a0a565b34801561068d57600080fd5b5061041261069c366004613e0e565b611a72565b3480156106ad57600080fd5b506104126106bc366004613e4f565b611aa8565b3480156106cd57600080fd5b506104126106dc366004613fb6565b611aeb565b3480156106ed57600080fd5b506104126106fc366004613c83565b611b48565b34801561070d57600080fd5b506104d561071c366004613c83565b611b8d565b34801561072d57600080fd5b5061044961073c366004613c83565b611c19565b34801561074d57600080fd5b5061055161075c366004613df1565b611cb3565b34801561076d57600080fd5b50610412611d85565b34801561078257600080fd5b50610412610791366004613e4f565b611dbb565b3480156107a257600080fd5b506104126107b1366004613df1565b611e01565b3480156107c257600080fd5b506000546001600160a01b03166104d5565b3480156107e057600080fd5b5061055160125481565b3480156107f657600080fd5b50610551610805366004613c9c565b611e4d565b34801561081657600080fd5b50610412610825366004613e0e565b611eb5565b34801561083657600080fd5b50610449611eeb565b34801561084b57600080fd5b5061041261085a366004613df1565b611efa565b34801561086b57600080fd5b5061041261087a36600461403e565b611f42565b34801561088b57600080fd5b5061041261089a36600461405b565b611f7f565b3480156108ab57600080fd5b506104126108ba366004613c9c565b612044565b3480156108cb57600080fd5b506104126108da366004614094565b612165565b3480156108eb57600080fd5b506104126121c2565b34801561090057600080fd5b506103dd61090f366004613c83565b60009081526006602052604090205460ff1690565b34801561093057600080fd5b5061041261093f366004613d2d565b612324565b34801561095057600080fd5b5061041261095f366004613c83565b6123dc565b34801561097057600080fd5b5061041261097f366004613c9c565b612433565b34801561099057600080fd5b5061055161099f366004613c83565b60146020526000908152604090205481565b3480156109bd57600080fd5b506104126109cc366004613c9c565b6124c6565b3480156109dd57600080fd5b506104496109ec366004613c83565b61258f565b3480156109fd57600080fd5b506104d57f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c181565b348015610a3157600080fd5b50610412610a40366004613c9c565b612792565b348015610a5157600080fd5b50610412610a60366004613c9c565b612821565b348015610a7157600080fd5b50610412612855565b348015610a8657600080fd5b50610412610a953660046140f3565b61294c565b348015610aa657600080fd5b50610412610ab5366004613d2d565b612a14565b348015610ac657600080fd5b50610ada610ad5366004613c83565b612a6f565b6040516103e99b9a99989796959493929190614159565b348015610afd57600080fd5b50610449612b70565b348015610b1257600080fd5b506103dd610b213660046141d2565b612b7f565b610412610b34366004613c83565b612c81565b348015610b4557600080fd5b50610412610b54366004613df1565b612e74565b348015610b6557600080fd5b50610412610b74366004614200565b612f0c565b348015610b8557600080fd5b50610412610b94366004613df1565b612f68565b348015610ba557600080fd5b50610412610bb4366004614261565b612fbb565b60006001600160e01b031982166380ac58cd60e01b1480610bea57506001600160e01b03198216635b5e139f60e01b145b80610c0557506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b03163314610c3e5760405162461bcd60e51b8152600401610c3590614283565b60405180910390fd5b60128054906000610c4e836142ce565b90915550610c5f90508760016142e9565b60128054600090815260116020526040808220805469ffff00000000000000001916600160401b61ffff968716021790559154815220805461ffff60501b1916600160501b928a1692909202919091179055610cbc60028861430f565b60128054600090815260116020526040808220805461ffff60601b1916600160601b61ffff9687160217905582548252808220805465ffff000000001916640100000000958c1695909502949094179093559054815220600101859055610d24856003614332565b60125460009081526011602052604090206002015561ffff8416610d635760125460009081526011602052604090205462010000900461ffff16610d65565b835b6012546000908152601160205260409020805463ffff000019166201000061ffff93841602179055600190851611610db85760125460009081526011602052604090205462010000900461ffff16610dc3565b610dc360028561430f565b60128054600090815260116020526040808220805467ffff0000000000001916600160301b61ffff96909616959095029490941790935581548152828120805460ff60701b1916600160701b881515021790559054815220610e29906004018383613a01565b5050505050505050565b6000546001600160a01b03163314610e5d5760405162461bcd60e51b8152600401610c3590614283565b600f54831115610e9c5760405162461bcd60e51b815260206004820152600a6024820152691253959053125117d25160b21b6044820152606401610c35565b600f546000908152600e60205260409020600101546010548291610ebf91614351565b610ec99190614368565b601055600f80546000908152600e602052604080822080546001600160a01b0319166001600160a01b03969096169590951790945590548152919091206001015550565b606060018054610f1c90614380565b80601f0160208091040260200160405190810160405280929190818152602001828054610f4890614380565b8015610f955780601f10610f6a57610100808354040283529160200191610f95565b820191906000526020600020905b815481529060010190602001808311610f7857829003601f168201915b5050505050905090565b6000610faa8261301d565b61100b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c35565b506000908152600460205260409020546001600160a01b031690565b600061103282611b8d565b9050806001600160a01b0316836001600160a01b031614156110a05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610c35565b336001600160a01b03821614806110bc57506110bc8133612b7f565b61112e5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c35565b6111388383613067565b505050565b3360009081526009602052604090205460ff1615156001146111715760405162461bcd60e51b8152600401610c35906143bb565b60005b818110156111ab576003546000908152601460205260409020839055611199846130d5565b806111a3816142ce565b915050611174565b50505050565b600081815260116020526040902054600160701b900460ff166111e65760405162461bcd60e51b8152600401610c35906143de565b60008181526011602052604090206001015434146112165760405162461bcd60e51b8152600401610c3590614403565b60008181526011602052604090205461ffff808216600160501b90920416116112515760405162461bcd60e51b8152600401610c359061442a565b60008181526011602052604090205462010000900461ffff1615806112a05750600081815260116020908152604080832080543385526003909101909252909120546201000090910461ffff16115b6112bc5760405162461bcd60e51b8152600401610c359061445a565b60035460009081526014602052604090208190556112d8613167565b60008181526011602052604090205462010000900461ffff1615611324576000818152601160209081526040808320338452600301909152812080549161131e836142ce565b91905055505b6000818152601160205260408120805461ffff169161134283614487565b91906101000a81548161ffff021916908361ffff1602179055505050565b60135460ff168061137b57506000546001600160a01b031633145b8061139557503360009081526009602052604090205460ff165b6113b15760405162461bcd60e51b8152600401610c35906144a9565b6111388383836131e6565b6000546001600160a01b031633146113e65760405162461bcd60e51b8152600401610c3590614283565b600c805460ff60a01b198116600160a01b9182900460ff1615909102179055565b60008060005b60035481101561147e57846001600160a01b031660038281548110611434576114346144d4565b6000918252602090912001546001600160a01b0316141561146e5783821415611460579150610c059050565b8161146a816142ce565b9250505b611477816142ce565b905061140d565b50600081116114bc5760405162461bcd60e51b815260206004820152600a6024820152691393d39157d193d5539160b21b6044820152606401610c35565b60405162461bcd60e51b815260206004820152600c60248201526b09eaaa8be9e8cbe929c888ab60a31b6044820152606401610c35565b600082815260116020526040902054600160701b900460ff166115285760405162461bcd60e51b8152600401610c35906143de565b600082815260116020526040902060010154349061154b9061ffff841690614332565b146115685760405162461bcd60e51b8152600401610c3590614403565b60008281526011602052604090205461158690829061ffff166142e9565b60008381526011602052604090205461ffff918216600160401b909104909116116115c35760405162461bcd60e51b8152600401610c359061442a565b60008281526011602052604090205461ffff6401000000009091048116908216106116265760405162461bcd60e51b8152602060048201526013602482015272115610d1515117d3505617d4115497d3525395606a1b6044820152606401610c35565b60008281526011602052604090205462010000900461ffff1615158061169157506000828152601160209081526040808320805433855260039091019092529091205461ffff6201000090920482169160019161168591851690614368565b61168f9190614351565b105b6116ad5760405162461bcd60e51b8152600401610c359061445a565b60005b8161ffff168110156116ea5760035460009081526014602052604090208390556116d8613167565b806116e2816142ce565b9150506116b0565b506000828152601160205260408120805483929061170d90849061ffff166142e9565b92506101000a81548161ffff021916908361ffff1602179055505050565b61113883838360405180602001604052806000815250612165565b6000546001600160a01b031633146117705760405162461bcd60e51b8152600401610c3590614283565b60008161ffff1611611783576000611785565b805b6000838152601160205260409020805463ffff000019166201000061ffff938416021790556001908216116117d55760125460009081526011602052604090205462010000900461ffff166117e0565b6117e060028261430f565b600092835260116020526040909220805461ffff93909316600160301b0267ffff000000000000199093169290921790915550565b6000805b8281101561188a57846001600160a01b0316600385858481811061183f5761183f6144d4565b9050602002013581548110611856576118566144d4565b6000918252602090912001546001600160a01b03161461187a576000915050611890565b611883816142ce565b9050611819565b50600190505b9392505050565b600260085414156118ea5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c35565b60026008556000546001600160a01b031633148061191b5750600c546001600160a01b0316336001600160a01b0316145b6119555760405162461bcd60e51b815260206004820152600b60248201526a1393d517d0531313d5d15160aa1b6044820152606401610c35565b600c546001600160a01b031661197d5760405162461bcd60e51b8152600401610c35906144ea565b600c546040516370a0823160e01b8152306004820152611a02916001600160a01b0390811691908416906370a0823190602401602060405180830381865afa1580156119cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f19190614514565b6001600160a01b0384169190613217565b506001600855565b600080611a1684611cb3565b905060005b81811015611a67576000611a2f8683611407565b600081815260146020526040902054909150851415611a545760019350505050610c05565b5080611a5f816142ce565b915050611a1b565b506000949350505050565b6000546001600160a01b03163314611a9c5760405162461bcd60e51b8152600401610c3590614283565b611138600b8383613a01565b6000546001600160a01b03163314611ad25760405162461bcd60e51b8152600401610c3590614283565b6000838152600d602052604090206111ab908383613a01565b60135460ff1680611b0657506000546001600160a01b031633145b80611b2057503360009081526009602052604090205460ff165b611b3c5760405162461bcd60e51b8152600401610c35906144a9565b6111ab84848484613269565b6000546001600160a01b03163314611b725760405162461bcd60e51b8152600401610c3590614283565b6000908152600660205260409020805460ff19169055565b50565b60008060038381548110611ba357611ba36144d4565b6000918252602090912001546001600160a01b0316905080610c055760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610c35565b600d6020526000908152604090208054611c3290614380565b80601f0160208091040260200160405190810160405280929190818152602001828054611c5e90614380565b8015611cab5780601f10611c8057610100808354040283529160200191611cab565b820191906000526020600020905b815481529060010190602001808311611c8e57829003601f168201915b505050505081565b60006001600160a01b038216611d1e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610c35565b600354600090815b81811015611d7c5760038181548110611d4157611d416144d4565b6000918252602090912001546001600160a01b0386811691161415611d6c57611d69836142ce565b92505b611d75816142ce565b9050611d26565b50909392505050565b6000546001600160a01b03163314611daf5760405162461bcd60e51b8152600401610c3590614283565b611db960006132ac565b565b6000546001600160a01b03163314611de55760405162461bcd60e51b8152600401610c3590614283565b60008381526011602052604090206111ab906004018383613a01565b6000546001600160a01b03163314611e2b5760405162461bcd60e51b8152600401610c3590614283565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000611e5b85611cb3565b905060005b81811015611eab576000611e748783611407565b600081815260146020526040902054909150861415611e98579350610c0592505050565b5080611ea3816142ce565b915050611e60565b5090949350505050565b6000546001600160a01b03163314611edf5760405162461bcd60e51b8152600401610c3590614283565b611138600a8383613a01565b606060028054610f1c90614380565b6000546001600160a01b03163314611f245760405162461bcd60e51b8152600401610c3590614283565b600780546001600160a01b0319166001600160a01b03831617905550565b6000546001600160a01b03163314611f6c5760405162461bcd60e51b8152600401610c3590614283565b6013805460ff1916911515919091179055565b6001600160a01b038216331415611fd85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c35565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6007546001600160a01b0316336001600160a01b03161461209f5760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610c35565b816001600160a01b03166120b282611b8d565b6001600160a01b0316146120f45760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610c35565b60008181526006602052604090205460ff16156121445760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d4d51052d15160921b6044820152606401610c35565b6000908152600660205260409020805460ff19811660ff9091161517905550565b60135460ff168061218057506000546001600160a01b031633145b8061219a57503360009081526009602052604090205460ff165b6121b65760405162461bcd60e51b8152600401610c35906144a9565b6111ab848484846132fc565b600c546001600160a01b03166121ea5760405162461bcd60e51b8152600401610c35906144ea565b4760015b600f5481116122f3576010546000828152600e60205260408120600101549091906122199085614332565b6122239190614543565b90504781116122325780612234565b475b6000838152600e602052604080822054905192935090916001600160a01b039091169083908381818185875af1925050503d8060008114612291576040519150601f19603f3d011682016040523d82523d6000602084013e612296565b606091505b50509050806122de5760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610c35565b505080806122eb906142ce565b9150506121ee565b50604051819033907f0d20f677b24c0f42423a7e690ab1d066e4ae75145c497a68b1f34bd34944d12290600090a350565b6000546001600160a01b0316331461234e5760405162461bcd60e51b8152600401610c3590614283565b6123598160016142e9565b600083815260116020526040902080546bffffffff00000000000000001916600160401b61ffff9384160261ffff60501b191617600160501b928416929092029190911790556123aa60028261430f565b600092835260116020526040909220805461ffff93909316600160601b0261ffff60601b199093169290921790915550565b6000546001600160a01b031633146124065760405162461bcd60e51b8152600401610c3590614283565b6000908152601160205260409020805460ff60701b198116600160701b9182900460ff1615909102179055565b6000546001600160a01b0316331461245d5760405162461bcd60e51b8152600401610c3590614283565b600f805490600061246d836142ce565b9091555050600f80546000908152600e602052604080822080546001600160a01b0319166001600160a01b03871617905591548152908120600101829055601080548392906124bd908490614368565b90915550505050565b6007546001600160a01b0316336001600160a01b0316146125215760405162461bcd60e51b815260206004820152601560248201527413d3931657d4d51052d25391d7d0d3d395149050d5605a1b6044820152606401610c35565b816001600160a01b031661253482611b8d565b6001600160a01b0316146125765760405162461bcd60e51b81526020600482015260096024820152682727aa2fa7aba722a960b91b6044820152606401610c35565b6000908152600660205260409020805460ff1916905550565b606061259a8261301d565b6125fe5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c35565b6000828152600d60205260408120805461261790614380565b905011156126bd576000828152600d60205260409020805461263890614380565b80601f016020809104026020016040519081016040528092919081815260200182805461266490614380565b80156126b15780601f10612686576101008083540402835291602001916126b1565b820191906000526020600020905b81548152906001019060200180831161269457829003601f168201915b50505050509050919050565b60008281526014602090815260408083205483526011909152812060040180546126e690614380565b9050111561271757600082815260146020908152604080832054835260119091529020600401805461263890614380565b600c54600160a01b900460ff161561273657600b805461263890614380565b6000600b805461274590614380565b9050116127615760405180602001604052806000815250610c05565b600b61276c8361332e565b60405160200161277d929190614573565b60405160208183030381529060405292915050565b3360009081526009602052604090205460ff1615156001146127c65760405162461bcd60e51b8152600401610c35906143bb565b60035460009081526014602052604090208190556127e3826130d5565b6003546000908152601460205260409020819055612800826130d5565b600354600090815260146020526040902081905561281d826130d5565b5050565b3360009081526009602052604090205460ff1615156001146128005760405162461bcd60e51b8152600401610c35906143bb565b600c546001600160a01b031661287d5760405162461bcd60e51b8152600401610c35906144ea565b600c5460405147916000916001600160a01b039091169083908381818185875af1925050503d80600081146128ce576040519150601f19603f3d011682016040523d82523d6000602084013e6128d3565b606091505b505090508061291b5760405162461bcd60e51b81526020600482015260146024820152734641494c45445f53454e44494e475f46554e445360601b6044820152606401610c35565b604051829033907f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b7990600090a35050565b6000546001600160a01b031633146129765760405162461bcd60e51b8152600401610c3590614283565b60005b82811015612a0d5760005b828281518110612996576129966144d4565b60200260200101518110156129fa5760035460009081526014602052604090208690556129e88585848181106129ce576129ce6144d4565b90506020020160208101906129e39190613df1565b6130d5565b806129f2816142ce565b915050612984565b5080612a05816142ce565b915050612979565b5050505050565b6000546001600160a01b03163314612a3e5760405162461bcd60e51b8152600401610c3590614283565b600091825260116020526040909120805461ffff9092166401000000000265ffff0000000019909216919091179055565b601160205260009081526040902080546001820154600283015460048401805461ffff808616966201000087048216966401000000008104831696600160301b8204841696600160401b8304851696600160501b8404861696600160601b850490961695600160701b90940460ff16949293919291612aed90614380565b80601f0160208091040260200160405190810160405280929190818152602001828054612b1990614380565b8015612b665780601f10612b3b57610100808354040283529160200191612b66565b820191906000526020600020905b815481529060010190602001808311612b4957829003601f168201915b505050505090508b565b6060600a8054610f1c90614380565b60405163c455279160e01b81526001600160a01b0383811660048301526000917f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c191848116919083169063c455279190602401602060405180830381865afa158015612bef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c13919061461a565b6001600160a01b03161480612c4057506001600160a01b03831660009081526009602052604090205460ff165b15612c4f576001915050610c05565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b600081815260116020526040902054600160701b900460ff16612cb65760405162461bcd60e51b8152600401610c35906143de565b6000818152601160205260409020600201543414612ce65760405162461bcd60e51b8152600401610c3590614403565b60008181526011602052604090205461ffff808216600160601b9092041611612d215760405162461bcd60e51b8152600401610c359061442a565b60008181526011602052604090205462010000900461ffff161580612d71575060008181526011602090815260408083208054338552600390910190925290912054600160301b90910461ffff16115b612d8d5760405162461bcd60e51b8152600401610c359061445a565b6003546000908152601460205260409020819055612da9613167565b6003546000908152601460205260409020819055612dc5613167565b6003546000908152601460205260409020819055612de1613167565b60008181526011602052604090205462010000900461ffff1615612e3457600081815260116020908152604080832033845260039081019092528220805491929091612e2e908490614368565b90915550505b6000818152601160205260408120805460039290612e5790849061ffff166142e9565b92506101000a81548161ffff021916908361ffff16021790555050565b6000546001600160a01b03163314612e9e5760405162461bcd60e51b8152600401610c3590614283565b6001600160a01b038116612f035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c35565b611b8a816132ac565b60135460ff1680612f2757506000546001600160a01b031633145b80612f4157503360009081526009602052604090205460ff165b612f5d5760405162461bcd60e51b8152600401610c35906144a9565b61113883838361342b565b6000546001600160a01b03163314612f925760405162461bcd60e51b8152600401610c3590614283565b6001600160a01b03166000908152600960205260409020805460ff19811660ff90911615179055565b6000546001600160a01b03163314612fe55760405162461bcd60e51b8152600401610c3590614283565b6000828152601160205260409020600101819055613004816003614332565b6000928352601160205260409092206002019190915550565b60035460009082108015610c05575060006001600160a01b03166003838154811061304a5761304a6144d4565b6000918252602090912001546001600160a01b0316141592915050565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061309c82611b8d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319166001600160a01b038516179055905461312e9190614351565b6040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450565b600380546001808201835560008390527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319163317905590546131b79190614351565b60405133906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4565b6131f0338261346d565b61320c5760405162461bcd60e51b8152600401610c3590614637565b61113883838361352f565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611138908490613685565b60005b8251811015612a0d5761329a858585848151811061328c5761328c6144d4565b602002602001015185612165565b806132a4816142ce565b91505061326c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b613306338361346d565b6133225760405162461bcd60e51b8152600401610c3590614637565b6111ab84848484613757565b6060816133525750506040805180820190915260018152600360fc1b602082015290565b8160005b811561337c5780613366816142ce565b91506133759050600a83614543565b9150613356565b6000816001600160401b0381111561339657613396613e8d565b6040519080825280601f01601f1916602001820160405280156133c0576020820181803683370190505b5090505b8415612c79576133d5600183614351565b91506133e2600a86614688565b6133ed906030614368565b60f81b818381518110613402576134026144d4565b60200101906001600160f81b031916908160001a905350613424600a86614543565b94506133c4565b60005b81518110156111ab5761345b848484848151811061344e5761344e6144d4565b6020026020010151611360565b80613465816142ce565b91505061342e565b60006134788261301d565b6134d95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610c35565b60006134e483611b8d565b9050806001600160a01b0316846001600160a01b0316148061351f5750836001600160a01b031661351484610f9f565b6001600160a01b0316145b80612c795750612c798185612b7f565b826001600160a01b031661354282611b8d565b6001600160a01b0316146135aa5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610c35565b6001600160a01b03821661360c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c35565b613617600082613067565b816003828154811061362b5761362b6144d4565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60006136da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661378a9092919063ffffffff16565b80519091501561113857808060200190518101906136f8919061469c565b6111385760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c35565b61376284848461352f565b61376e84848484613799565b6111ab5760405162461bcd60e51b8152600401610c35906146b9565b6060612c798484600085613897565b60006001600160a01b0384163b1561388c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137dd90339089908890889060040161470b565b6020604051808303816000875af1925050508015613818575060408051601f3d908101601f1916820190925261381591810190614748565b60015b613872573d808015613846576040519150601f19603f3d011682016040523d82523d6000602084013e61384b565b606091505b50805161386a5760405162461bcd60e51b8152600401610c35906146b9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612c79565b506001949350505050565b6060824710156138f85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610c35565b6001600160a01b0385163b61394f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c35565b600080866001600160a01b0316858760405161396b9190614765565b60006040518083038185875af1925050503d80600081146139a8576040519150601f19603f3d011682016040523d82523d6000602084013e6139ad565b606091505b50915091506139bd8282866139c8565b979650505050505050565b606083156139d7575081611890565b8251156139e75782518084602001fd5b8160405162461bcd60e51b8152600401610c359190613c70565b828054613a0d90614380565b90600052602060002090601f016020900481019282613a2f5760008555613a75565b82601f10613a485782800160ff19823516178555613a75565b82800160010185558215613a75579182015b82811115613a75578235825591602001919060010190613a5a565b50613a81929150613a85565b5090565b5b80821115613a815760008155600101613a86565b6001600160e01b031981168114611b8a57600080fd5b600060208284031215613ac257600080fd5b813561189081613a9a565b803561ffff81168114613adf57600080fd5b919050565b8015158114611b8a57600080fd5b60008083601f840112613b0457600080fd5b5081356001600160401b03811115613b1b57600080fd5b602083019150836020828501011115613b3357600080fd5b9250929050565b600080600080600080600060c0888a031215613b5557600080fd5b613b5e88613acd565b9650613b6c60208901613acd565b955060408801359450613b8160608901613acd565b93506080880135613b9181613ae4565b925060a08801356001600160401b03811115613bac57600080fd5b613bb88a828b01613af2565b989b979a50959850939692959293505050565b6001600160a01b0381168114611b8a57600080fd5b600080600060608486031215613bf557600080fd5b833592506020840135613c0781613bcb565b929592945050506040919091013590565b60005b83811015613c33578181015183820152602001613c1b565b838111156111ab5750506000910152565b60008151808452613c5c816020860160208601613c18565b601f01601f19169290920160200192915050565b6020815260006118906020830184613c44565b600060208284031215613c9557600080fd5b5035919050565b60008060408385031215613caf57600080fd5b8235613cba81613bcb565b946020939093013593505050565b600080600060608486031215613cdd57600080fd5b8335613ce881613bcb565b95602085013595506040909401359392505050565b600080600060608486031215613d1257600080fd5b8335613d1d81613bcb565b92506020840135613c0781613bcb565b60008060408385031215613d4057600080fd5b82359150613d5060208401613acd565b90509250929050565b60008083601f840112613d6b57600080fd5b5081356001600160401b03811115613d8257600080fd5b6020830191508360208260051b8501011115613b3357600080fd5b600080600060408486031215613db257600080fd5b8335613dbd81613bcb565b925060208401356001600160401b03811115613dd857600080fd5b613de486828701613d59565b9497909650939450505050565b600060208284031215613e0357600080fd5b813561189081613bcb565b60008060208385031215613e2157600080fd5b82356001600160401b03811115613e3757600080fd5b613e4385828601613af2565b90969095509350505050565b600080600060408486031215613e6457600080fd5b8335925060208401356001600160401b03811115613e8157600080fd5b613de486828701613af2565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613ecb57613ecb613e8d565b604052919050565b600082601f830112613ee457600080fd5b813560206001600160401b03821115613eff57613eff613e8d565b8160051b613f0e828201613ea3565b9283528481018201928281019087851115613f2857600080fd5b83870192505b848310156139bd57823582529183019190830190613f2e565b600082601f830112613f5857600080fd5b81356001600160401b03811115613f7157613f71613e8d565b613f84601f8201601f1916602001613ea3565b818152846020838601011115613f9957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215613fcc57600080fd5b8435613fd781613bcb565b93506020850135613fe781613bcb565b925060408501356001600160401b038082111561400357600080fd5b61400f88838901613ed3565b9350606087013591508082111561402557600080fd5b5061403287828801613f47565b91505092959194509250565b60006020828403121561405057600080fd5b813561189081613ae4565b6000806040838503121561406e57600080fd5b823561407981613bcb565b9150602083013561408981613ae4565b809150509250929050565b600080600080608085870312156140aa57600080fd5b84356140b581613bcb565b935060208501356140c581613bcb565b92506040850135915060608501356001600160401b038111156140e757600080fd5b61403287828801613f47565b6000806000806060858703121561410957600080fd5b8435935060208501356001600160401b038082111561412757600080fd5b61413388838901613d59565b9095509350604087013591508082111561414c57600080fd5b5061403287828801613ed3565b600061016061ffff808f168452808e166020850152808d166040850152808c166060850152808b166080850152808a1660a085015280891660c08501525086151560e08401528561010084015284610120840152806101408401526141c081840185613c44565b9e9d5050505050505050505050505050565b600080604083850312156141e557600080fd5b82356141f081613bcb565b9150602083013561408981613bcb565b60008060006060848603121561421557600080fd5b833561422081613bcb565b9250602084013561423081613bcb565b915060408401356001600160401b0381111561424b57600080fd5b61425786828701613ed3565b9150509250925092565b6000806040838503121561427457600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156142e2576142e26142b8565b5060010190565b600061ffff808316818516808303821115614306576143066142b8565b01949350505050565b600061ffff8381169083168181101561432a5761432a6142b8565b039392505050565b600081600019048311821515161561434c5761434c6142b8565b500290565b600082821015614363576143636142b8565b500390565b6000821982111561437b5761437b6142b8565b500190565b600181811c9082168061439457607f821691505b602082108114156143b557634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600990820152686f6e6c7950726f787960b81b604082015260600190565b6020808252600b908201526a14d0531157d0d313d4d15160aa1b604082015260600190565b6020808252600d908201526c0929c869ea4a48a86a8be8aa89609b1b604082015260600190565b6020808252601690820152754558434545445f4d41585f53414c455f535550504c5960501b604082015260600190565b60208082526013908201527222ac21a2a2a22fa6a0ac2fa822a92faaa9a2a960691b604082015260600190565b600061ffff8083168181141561449f5761449f6142b8565b6001019392505050565b6020808252601190820152701514905394d1915497d11254d050931151607a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f1514915054d5549657d393d517d4d15560821b604082015260600190565b60006020828403121561452657600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b6000826145525761455261452d565b500490565b60008151614569818560208601613c18565b9290920192915050565b600080845481600182811c91508083168061458f57607f831692505b60208084108214156145af57634e487b7160e01b86526022600452602486fd5b8180156145c357600181146145d457614601565b60ff19861689528489019650614601565b60008b81526020902060005b868110156145f95781548b8201529085019083016145e0565b505084890196505b5050505050506146118185614557565b95945050505050565b60006020828403121561462c57600080fd5b815161189081613bcb565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000826146975761469761452d565b500690565b6000602082840312156146ae57600080fd5b815161189081613ae4565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061473e90830184613c44565b9695505050505050565b60006020828403121561475a57600080fd5b815161189081613a9a565b60008251614777818460208701613c18565b919091019291505056fea26469706673582212204cfbb34d61d2e4d62d42a7ee28a8ba756136cefffc67f8c8fe62007df5eb60e364736f6c634300080b0033
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.