Polygon Sponsored slots available. Book your slot here!
ERC-721
Overview
Max Total Supply
27,965 MnA
Holders
212
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 MnALoading...
Loading
Loading...
Loading
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xA6E3D49F...c895ABF3b The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
MnA
Compiler Version
v0.8.2+commit.661d1103
Contract Source Code (Solidity Standard Json-Input format)
// 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/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // 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/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // 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 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 (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 LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import "./interfaces/IMnA.sol"; import "./interfaces/IStakingPool.sol"; import "./interfaces/ITraits.sol"; import "./interfaces/IRandomSeedGenerator.sol"; import "./interfaces/IFounderPass.sol"; import "./libraries/ERC721A.sol"; contract MnA is IMnA, IERC721Receiver, ERC721Enumerable, Ownable, Pausable { struct LastWrite { uint64 time; uint64 blockNum; } event MarineMinted(uint256 indexed tokenId); event AlienMinted(uint256 indexed tokenId); event MarineStolen(uint256 indexed tokenId); event AlienStolen(uint256 indexed tokenId); event MarineBurned(uint256 indexed tokenId); event AlienBurned(uint256 indexed tokenId); // max number of tokens that can be minted uint256 public maxTokens = 27997; // number of tokens that can be airdropped for a fee uint256 public PAID_TOKENS = 6969; // number of tokens that admin can mint for airdrop at a time uint256 public airdropMintingCount = 100; // number of tokens have been minted so far uint16 public override minted; // flag to show airdrop stage bool public isAirdropStage; // mapping from tokenId to a struct containing the token's traits mapping(uint256 => MarineAlien) private tokenTraits; // mapping from hashed(tokenTrait) to the tokenId it's associated with // used to ensure there are no duplicates mapping(uint256 => uint256) public existingCombinations; // Tracks the last block and timestamp that a caller has written to state. // Disallow some access to functions if they occur while a change is being written. mapping(address => LastWrite) private lastWriteAddress; mapping(uint256 => LastWrite) private lastWriteToken; // list of probabilities for each trait type // 0 - 5 are associated with Marine, 6 - 11 are associated with Aliens uint8[][12] public rarities; // list of aliases for Walker's Alias algorithm // 0 - 5 are associated with Marine, 6 - 11 are associated with Aliens uint8[][12] public aliases; // reference to the Tower contract to allow transfers to it without approval IStakingPool public stakingPool; // reference to Traits ITraits public traits; // random seed generator IRandomSeedGenerator public randomSeedGenerator; // founder pass IFounderPass public founderPass; // address => allowedToCallFunctions mapping(address => bool) private admins; constructor(address _founderPass) ERC721("Marines & Aliens Game", "MnA") { _pause(); // A.J. Walker's Alias Algorithm // Marines // Weapon rarities[0] = [255, 38, 50, 237, 211, 201, 248, 61, 8, 45, 106, 18, 122, 49, 45, 34, 19, 16]; aliases[0] = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 11]; // Back rarities[1] = [255, 204, 30, 225, 71, 245, 196, 81, 40, 28, 20]; aliases[1] = [0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 4]; // Headgear rarities[2] = [255, 188, 14, 219, 208, 239, 55, 75, 137, 239, 126, 47, 245, 221, 163, 122, 81, 40]; aliases[2] = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 11]; // Eyes rarities[3] = [255, 38, 50, 237, 211, 201, 248, 61, 8, 45, 106, 18, 122, 49, 45, 34, 19, 16]; aliases[3] = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 11]; // Emblem rarities[4] = [255, 151, 239, 219, 215, 104, 18, 229, 208, 229, 26, 112, 231, 118, 47, 245, 196, 163, 122, 65]; aliases[4] = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 6, 7, 8, 10, 11, 14]; // Body rarities[5] = [255, 73, 114, 186, 43, 204, 184, 204, 241, 55, 198, 102, 30, 245, 204, 163, 131, 98, 65, 40]; aliases[5] = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 5, 6, 7, 9, 12]; // Aliens // Headgear rarities[6] = [255, 71, 163, 102, 122, 163, 51, 245, 180, 86, 20]; aliases[6] = [0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 1, 1, 2, 3, 4, 6]; // Eye rarities[7] = [255, 112, 204, 102, 81, 184, 71, 245, 163, 61, 20]; aliases[7] = [0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 1, 1, 2, 3, 4, 6]; // Back rarities[8] = [255, 245, 143, 81, 61, 122, 10, 204, 163, 81, 20]; aliases[8] = [0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 1, 2, 3, 4, 6]; // Mouth rarities[9] = [255, 245, 143, 81, 61, 122, 10, 204, 163, 81, 20]; aliases[9] = [0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 1, 2, 3, 4, 6]; // Body rarities[10] = [255, 51, 143, 40, 20, 122, 51, 204, 163, 122, 20]; aliases[10] = [0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 1, 1, 2, 3, 4, 6]; // rankIndex rarities[11] = [255, 79, 165, 25]; aliases[11] = [0, 1, 1, 1]; founderPass = IFounderPass(_founderPass); } modifier requireContractsSet() { require(address(traits) != address(0) && address(stakingPool) != address(0) && address(randomSeedGenerator) != address(0), "Contracts not set"); _; } modifier blockIfChangingAddress() { // frens can always call whenever they want :) require(admins[_msgSender()] || lastWriteAddress[tx.origin].blockNum < block.number, "hmmmm what doing?"); _; } modifier blockIfChangingToken(uint256 tokenId) { // frens can always call whenever they want :) require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?"); _; } function setContracts(address _traits, address _stakingPool, address _randomSeedGenerator) external onlyOwner { traits = ITraits(_traits); stakingPool = IStakingPool(_stakingPool); randomSeedGenerator = IRandomSeedGenerator(_randomSeedGenerator); } function getTokenWriteBlock(uint256 tokenId) external view override returns(uint64) { require(admins[_msgSender()], "Only admins can call this"); return lastWriteToken[tokenId].blockNum; } function mintForAirdrop() external onlyOwner whenNotPaused { require(isAirdropStage, "Airdrop minting is only available in airdrop stage"); require(PAID_TOKENS > minted, "Airdrop minting completed"); require(address(randomSeedGenerator) != address(0), "random seed generator is null"); uint256 _mintCount = airdropMintingCount; if (PAID_TOKENS < minted + airdropMintingCount) _mintCount = PAID_TOKENS - minted; for (uint256 i = 0; i < _mintCount; i++) { uint256 randomNumber = uint256(keccak256(abi.encode(randomSeedGenerator.random(), minted))); mint(address(this), randomNumber); } } function claim() external whenNotPaused { uint256 balance = founderPass.balanceOf(msg.sender); for (uint256 index = 0; index < balance; index++) { uint256 tokenId = founderPass.tokenOfOwnerByIndex(msg.sender, index); require(IERC721(address(this)).ownerOf(tokenId) == address(this), "Invalid tokenId"); IERC721(address(this)).safeTransferFrom(address(this), msg.sender, tokenId); } } function withdrawUnClaimed(address recipient, uint256 tokenId) external onlyOwner whenNotPaused { require(!isAirdropStage, "Can withdraw after airdrop stage ends"); uint256 remainingIds = IMnA(address(this)).balanceOf(address(this)); require(remainingIds > 0, "Nothing to withdraw"); require(IERC721(address(this)).ownerOf(tokenId) == address(this), "Invalid tokenId"); IERC721(address(this)).safeTransferFrom(address(this), recipient, tokenId); } /** * Mint a token - any payment / game logic should be handled in the game contract. * This will just generate random traits and mint a token to a designated address. */ function mint(address recipient, uint256 seed) public override whenNotPaused { require(admins[_msgSender()], "Only admins can call this"); require(minted + 1 <= maxTokens, "All tokens minted"); minted++; generate(minted, seed, lastWriteAddress[tx.origin]); if(tx.origin != recipient && recipient != address(stakingPool) && recipient != address(this)) { // Stolen! if(tokenTraits[minted].isMarine) { emit MarineStolen(minted); } else { emit AlienStolen(minted); } } _safeMint(recipient, minted); } /** * Burn a token - any game logic should be handled before this function. */ function burn(uint256 tokenId) external override whenNotPaused { require(admins[_msgSender()], "Only admins can call this"); require(ownerOf(tokenId) == tx.origin, "Oops you don't own that"); if(tokenTraits[tokenId].isMarine) { emit MarineBurned(tokenId); } else { emit AlienBurned(tokenId); } _burn(tokenId); } function updateOriginAccess(uint16[] memory tokenIds) external override { require(admins[_msgSender()], "Only admins can call this"); uint64 blockNum = uint64(block.number); uint64 time = uint64(block.timestamp); lastWriteAddress[tx.origin] = LastWrite(time, blockNum); for (uint256 i = 0; i < tokenIds.length; i++) { lastWriteToken[tokenIds[i]] = LastWrite(time, blockNum); } } function transferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { // allow admin contracts to be send without approval if(!admins[_msgSender()]) { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); } _transfer(from, to, tokenId); } /** INTERNAL */ /** * generates traits for a specific token, checking to make sure it's unique * @param tokenId the id of the token to generate traits for * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of traits for the given token ID */ function generate(uint256 tokenId, uint256 seed, LastWrite memory lw) internal returns (MarineAlien memory t) { t = selectTraits(seed); if (existingCombinations[structToHash(t)] == 0) { tokenTraits[tokenId] = t; existingCombinations[structToHash(t)] = tokenId; if(t.isMarine) { emit MarineMinted(tokenId); } else { emit AlienMinted(tokenId); } return t; } uint256 nextSeed = uint256(keccak256(abi.encode(randomSeedGenerator.random(), seed))); return generate(tokenId, nextSeed, lw); } /** * uses A.J. Walker's Alias algorithm for O(1) rarity table lookup * ensuring O(1) instead of O(n) reduces mint cost by more than 50% * probability & alias tables are generated off-chain beforehand * @param seed portion of the 256 bit seed to remove trait correlation * @param traitType the trait type to select a trait for * @return the ID of the randomly selected trait */ function selectTrait(uint16 seed, uint8 traitType) internal view returns (uint8) { uint8 trait = uint8(seed) % uint8(rarities[traitType].length); // If a selected random trait probability is selected (biased coin) return that trait if (seed >> 8 < rarities[traitType][trait]) return trait; return aliases[traitType][trait]; } /** * selects the species and all of its traits based on the seed value * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of randomly selected traits */ function selectTraits(uint256 seed) internal view returns (MarineAlien memory t) { t.isMarine = (seed & 0xFFFF) % 10 != 0; if (t.isMarine) { seed >>= 16; t.M_Weapon = selectTrait(uint16(seed & 0xFFFF), 0); seed >>= 16; t.M_Back = selectTrait(uint16(seed & 0xFFFF), 1); seed >>= 16; t.M_Headgear = selectTrait(uint16(seed & 0xFFFF), 2); seed >>= 16; t.M_Eyes = selectTrait(uint16(seed & 0xFFFF), 3); seed >>= 16; t.M_Emblem = selectTrait(uint16(seed & 0xFFFF), 4); seed >>= 16; t.M_Body = selectTrait(uint16(seed & 0xFFFF), 5); } else { seed >>= 16; t.A_Headgear = selectTrait(uint16(seed & 0xFFFF), 6); seed >>= 16; t.A_Eye = selectTrait(uint16(seed & 0xFFFF), 7); seed >>= 16; t.A_Back = selectTrait(uint16(seed & 0xFFFF), 8); seed >>= 16; t.A_Mouth = selectTrait(uint16(seed & 0xFFFF), 9); seed >>= 16; t.A_Body = selectTrait(uint16(seed & 0xFFFF), 10); seed >>= 16; t.rankIndex = selectTrait(uint16(seed & 0xFFFF), 11); } } /** * converts a struct to a 256 bit hash to check for uniqueness * @param s the struct to pack into a hash * @return the 256 bit hash of the struct */ function structToHash(MarineAlien memory s) internal pure returns (uint256) { return uint256(keccak256( abi.encodePacked( s.isMarine, s.M_Weapon, s.M_Back, s.M_Headgear, s.M_Eyes, s.M_Emblem, s.M_Body, s.A_Headgear, s.A_Eye, s.A_Back, s.A_Mouth, s.A_Body, s.rankIndex ) )); } /** READ */ /** * checks if a token is a Marines * @param tokenId the ID of the token to check * @return marine - whether or not a token is a Marines */ function isMarine(uint256 tokenId) external view override blockIfChangingToken(tokenId) returns (bool) { // Sneaky aliens will be slain if they try to peep this after mint. Nice try. IMnA.MarineAlien memory s = tokenTraits[tokenId]; return s.isMarine; } function getMaxTokens() external view override returns (uint256) { return maxTokens; } function getPaidTokens() external view override returns (uint256) { return PAID_TOKENS; } /** * updates the number of tokens for sale */ function setPaidTokens(uint256 _paidTokens) external onlyOwner { PAID_TOKENS = uint16(_paidTokens); } /** * start or end airdrop stage */ function setAirdropStage(bool _isAirdropStage) external onlyOwner { isAirdropStage = _isAirdropStage; } /** * set the number of tokens to mint at a time for airdrop. */ function setAirdropMintingCount(uint256 _airdropMintingCount) external onlyOwner { airdropMintingCount = _airdropMintingCount; } /** * enables owner to pause / unpause minting */ function setPaused(bool _paused) external requireContractsSet onlyOwner { if (_paused) _pause(); else _unpause(); } /** * enables an address to mint / burn * @param addr the address to enable */ function addAdmin(address addr) external onlyOwner { admins[addr] = true; } /** * disables an address from minting / burning * @param addr the address to disbale */ function removeAdmin(address addr) external onlyOwner { admins[addr] = false; } function getTokenTraits(uint256 tokenId) external view override blockIfChangingAddress blockIfChangingToken(tokenId) returns (MarineAlien memory) { return tokenTraits[tokenId]; } function tokenURI(uint256 tokenId) public view override blockIfChangingAddress blockIfChangingToken(tokenId) returns (string memory) { require(_exists(tokenId), "Token ID does not exist"); return traits.tokenURI(tokenId); } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override(ERC721Enumerable, IERC721Enumerable) blockIfChangingAddress returns (uint256) { require(admins[_msgSender()] || lastWriteAddress[owner].blockNum < block.number, "hmmmm what doing?"); uint256 tokenId = super.tokenOfOwnerByIndex(owner, index); require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?"); return tokenId; } function balanceOf(address owner) public view virtual override(ERC721, IERC721) blockIfChangingAddress returns (uint256) { require(admins[_msgSender()] || lastWriteAddress[owner].blockNum < block.number, "hmmmm what doing?"); return super.balanceOf(owner); } function ownerOf(uint256 tokenId) public view virtual override(ERC721, IERC721) blockIfChangingAddress blockIfChangingToken(tokenId) returns (address) { address addr = super.ownerOf(tokenId); require(admins[_msgSender()] || lastWriteAddress[addr].blockNum < block.number, "hmmmm what doing?"); return addr; } function tokenByIndex(uint256 index) public view virtual override(ERC721Enumerable, IERC721Enumerable) returns (uint256) { uint256 tokenId = super.tokenByIndex(index); require(admins[_msgSender()] || lastWriteToken[tokenId].blockNum < block.number, "hmmmm what doing?"); return tokenId; } function approve(address to, uint256 tokenId) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { super.approve(to, tokenId); } function getApproved(uint256 tokenId) public view virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) returns (address) { return super.getApproved(tokenId); } function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) blockIfChangingAddress { super.setApprovalForAll(operator, approved); } function isApprovedForAll(address owner, address operator) public view virtual override(ERC721, IERC721) blockIfChangingAddress returns (bool) { return super.isApprovedForAll(owner, operator); } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override(ERC721, IERC721) blockIfChangingToken(tokenId) { super.safeTransferFrom(from, to, tokenId, _data); } function onERC721Received( address, address from, uint256, bytes calldata ) external pure override returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IFounderPass is IERC721{ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; interface IMnA is IERC721Enumerable { // game data storage struct MarineAlien { bool isMarine; uint8 M_Weapon; uint8 M_Back; uint8 M_Headgear; uint8 M_Eyes; uint8 M_Emblem; uint8 M_Body; uint8 A_Headgear; uint8 A_Eye; uint8 A_Back; uint8 A_Mouth; uint8 A_Body; uint8 rankIndex; } function minted() external returns (uint16); function updateOriginAccess(uint16[] memory tokenIds) external; function mint(address recipient, uint256 seed) external; function burn(uint256 tokenId) external; function getMaxTokens() external view returns (uint256); function getPaidTokens() external view returns (uint256); function getTokenTraits(uint256 tokenId) external view returns (MarineAlien memory); function getTokenWriteBlock(uint256 tokenId) external view returns(uint64); function isMarine(uint256 tokenId) external view returns(bool); }
pragma solidity ^0.8.0; interface IRandomSeedGenerator { function random() external returns (uint256); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IStakingPool { function addManyToMarinePoolAndAlienPool(address account, uint16[] calldata tokenIds) external; function randomAlienOwner(uint256 seed) external view returns (address); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface ITraits { function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 1, 2, 3..). * * Does not support burning tokens to address(0). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 private currentIndex = 1; uint256 internal immutable maxBatchSize; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) private _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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 * `maxBatchSize` refers to how much a minter can mint at a time. */ constructor( string memory name_, string memory symbol_, uint256 maxBatchSize_ ) { require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero"); _name = name_; _symbol = symbol_; maxBatchSize = maxBatchSize_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { return currentIndex; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { require(index < totalSupply(), "ERC721A: global index out of bounds"); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { require(index < balanceOf(owner), "ERC721A: owner index out of bounds"); uint256 numMintedSoFar = totalSupply(); uint256 tokenIdsIdx = 0; address currOwnershipAddr = address(0); for (uint256 i = 0; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } revert("ERC721A: unable to get token of owner by index"); } /** * @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 || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), "ERC721A: balance query for the zero address"); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { require( owner != address(0), "ERC721A: number minted query for the zero address" ); return uint256(_addressData[owner].numberMinted); } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { require(_exists(tokenId), "ERC721A: owner query for nonexistent token"); uint256 lowestTokenToCheck; if (tokenId >= maxBatchSize) { lowestTokenToCheck = tokenId - maxBatchSize + 1; } for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } revert("ERC721A: unable to determine the owner of token"); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); require(to != owner, "ERC721A: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721A: approve caller is not owner nor approved for all" ); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), "ERC721A: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { require(operator != _msgSender(), "ERC721A: 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 override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), "ERC721A: 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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < currentIndex; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` cannot be larger than the max batch size. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = currentIndex; require(to != address(0), "ERC721A: mint to the zero address"); // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering. require(!_exists(startTokenId), "ERC721A: token already minted"); require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high"); _beforeTokenTransfers(address(0), to, startTokenId, quantity); AddressData memory addressData = _addressData[to]; _addressData[to] = AddressData( addressData.balance + uint128(quantity), addressData.numberMinted + uint128(quantity) ); _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp)); uint256 updatedIndex = startTokenId; for (uint256 i = 0; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); require( _checkOnERC721Received(address(0), to, updatedIndex, _data), "ERC721A: transfer to non ERC721Receiver implementer" ); updatedIndex++; } currentIndex = updatedIndex; _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || getApproved(tokenId) == _msgSender() || isApprovedForAll(prevOwnership.addr, _msgSender())); require( isApprovedOrOwner, "ERC721A: transfer caller is not owner nor approved" ); require( prevOwnership.addr == from, "ERC721A: transfer from incorrect owner" ); require(to != address(0), "ERC721A: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp)); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId] = TokenOwnership( prevOwnership.addr, prevOwnership.startTimestamp ); } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } uint256 public nextOwnerToExplicitlySet = 0; /** * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf(). */ function _setOwnersExplicit(uint256 quantity) internal { uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet; require(quantity > 0, "quantity must be nonzero"); uint256 endIndex = oldNextOwnerToSet + quantity - 1; if (endIndex > currentIndex - 1) { endIndex = currentIndex - 1; } // We know if the last one in the group exists, all in the group exist, due to serial ordering. require(_exists(endIndex), "not enough minted yet for this cleanup"); for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) { if (_ownerships[i].addr == address(0)) { TokenOwnership memory ownership = ownershipOf(i); _ownerships[i] = TokenOwnership( ownership.addr, ownership.startTimestamp ); } } nextOwnerToExplicitlySet = endIndex + 1; } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721A: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_founderPass","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AlienBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AlienMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"AlienStolen","type":"event"},{"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":"uint256","name":"tokenId","type":"uint256"}],"name":"MarineBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MarineMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MarineStolen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"PAID_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"airdropMintingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"aliases","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"existingCombinations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"founderPass","outputs":[{"internalType":"contract IFounderPass","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaidTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenTraits","outputs":[{"components":[{"internalType":"bool","name":"isMarine","type":"bool"},{"internalType":"uint8","name":"M_Weapon","type":"uint8"},{"internalType":"uint8","name":"M_Back","type":"uint8"},{"internalType":"uint8","name":"M_Headgear","type":"uint8"},{"internalType":"uint8","name":"M_Eyes","type":"uint8"},{"internalType":"uint8","name":"M_Emblem","type":"uint8"},{"internalType":"uint8","name":"M_Body","type":"uint8"},{"internalType":"uint8","name":"A_Headgear","type":"uint8"},{"internalType":"uint8","name":"A_Eye","type":"uint8"},{"internalType":"uint8","name":"A_Back","type":"uint8"},{"internalType":"uint8","name":"A_Mouth","type":"uint8"},{"internalType":"uint8","name":"A_Body","type":"uint8"},{"internalType":"uint8","name":"rankIndex","type":"uint8"}],"internalType":"struct IMnA.MarineAlien","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenWriteBlock","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAirdropStage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isMarine","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintForAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","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":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomSeedGenerator","outputs":[{"internalType":"contract IRandomSeedGenerator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rarities","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_airdropMintingCount","type":"uint256"}],"name":"setAirdropMintingCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isAirdropStage","type":"bool"}],"name":"setAirdropStage","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":"address","name":"_traits","type":"address"},{"internalType":"address","name":"_stakingPool","type":"address"},{"internalType":"address","name":"_randomSeedGenerator","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_paidTokens","type":"uint256"}],"name":"setPaidTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingPool","outputs":[{"internalType":"contract IStakingPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traits","outputs":[{"internalType":"contract ITraits","name":"","type":"address"}],"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":"uint16[]","name":"tokenIds","type":"uint16[]"}],"name":"updateOriginAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawUnClaimed","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052616d5d600b55611b39600c556064600d553480156200002257600080fd5b5060405162005745380380620057458339810160408190526200004591620012ed565b604080518082018252601581527f4d6172696e6573202620416c69656e732047616d6500000000000000000000006020808301918252835180850190945260038452624d6e4160e81b908401528151919291620000a591600091620011a4565b508051620000bb906001906020840190620011a4565b505050620000d8620000d26200109c60201b60201c565b620010a0565b600a805460ff60a01b19169055620000ef620010f2565b604080516102408101825260ff81526026602082015260329181019190915260ed606082015260d3608082015260c960a082015260f860c0820152603d60e08201526008610100820152602d6101208201819052606a6101408301526012610160830152607a61018083015260316101a08301526101c082015260226101e082015260136102008201819052601061022083015260006200019592910190601262001233565b506040805161040081018252600080825260208083018290526001938301849052600260608401819052600360808501819052600460a08601819052600560c08701819052600660e088018190526007610100890181905260086101208a0181905260096101408b01819052600a6101608c01526101808b018a90526101a08b018a90526101c08b01999099526101e08a018b90526102008a018b90526102208a019a909a52610240890186905261026089018690526102808901959095526102a088018490526102c08801939093526102e0870182905261030087019190915261032086018190526103408601526103608501526103808401526103a08301939093526103c0820152600b6103e0820152620002b691601f919062001233565b50604080516101608101825260ff815260cc6020820152601e9181019190915260e160608201526047608082015260f560a082015260c460c0820152605160e08201526028610100820152601c610120820152601461014082018190526200032091600b62001233565b5060408051610200810182526000808252602080830182905260019383018490526002606084018190526003608085015260a0840183905260c0840183905260e084018390526101008401839052610120840183905261014084019290925261016083018490526101808301939093526101a082018190526101c082015260046101e0820152620003b49190601062001233565b50604080516102408101825260ff815260bc6020820152600e9181019190915260db606082015260d0608082015260ef60a08201819052603760c0830152604b60e08301526089610100830152610120820152607e610140820152602f61016082015260f561018082015260dd6101a082015260a36101c0820152607a6101e0820152605161020082015260286102208201526200045790601590601262001233565b506040805161040081018252600080825260208083018290526001938301849052600260608401819052600360808501819052600460a08601819052600560c08701819052600660e088018190526007610100890181905260086101208a0181905260096101408b0152600a6101608b01526101808a018990526101a08a018990526101c08a018990526101e08a018990526102008a018990526102208a019890985261024089018a905261026089019990995261028088018590526102a088018590526102c08801949094526102e0870183905261030087019290925261032086018190526103408601526103608501526103808401526103a08301939093526103c0820152600b6103e082015262000575916021919062001233565b50604080516102408101825260ff81526026602082015260329181019190915260ed606082015260d3608082015260c960a082015260f860c0820152603d60e08201526008610100820152602d6101208201819052606a6101408301526012610160830152607a61018083015260316101a08301526101c082015260226101e082015260136102008201819052601061022083015260036200061c92910190601262001233565b506040805161040081018252600080825260208083018290526001938301849052600260608401819052600360808501819052600460a08601819052600560c08701819052600660e088018190526007610100890181905260086101208a0181905260096101408b01819052600a6101608c01526101808b018a90526101a08b018a90526101c08b01999099526101e08a018b90526102008a018b90526102208a019a909a52610240890186905261026089018690526102808901959095526102a088018490526102c08801939093526102e0870182905261030087019190915261032086018190526103408601526103608501526103808401526103a08301939093526103c0820152600b6103e08201526200073d916022919062001233565b50604080516102808101825260ff81526097602082015260ef9181019190915260db606082015260d76080820152606860a0820152601260c082015260e560e0820181905260d0610100830152610120820152601a610140820152607061016082015260e761018082015260766101a0820152602f6101c082015260f56101e082015260c461020082015260a3610220820152607a6102408201526041610260820152620007f090601790601462001233565b506040805161040081018252600080825260208083018290526001938301849052600260608401819052600360808501819052600460a08601819052600560c08701819052600660e088018190526007610100890181905260086101208a0181905260096101408b0152600a6101608b01819052600b6101808c01819052600c6101a08d0152600d6101c08d01526101e08c018b90526102008c018b90526102208c018b90526102408c019a909a526102608b018c90526102808b019b909b526102a08a01969096526102c08901949094526102e088019290925261030087015261032086018190526103408601526103608501526103808401526103a08301939093526103c0820152600e6103e082015262000911916023919062001233565b50604080516102808101825260ff81526049602082015260729181019190915260ba6060820152602b608082015260cc60a0820181905260b860c083015260e0820181905260f1610100830152603761012083015260c66101408301526066610160830152601e61018083015260f56101a08301526101c082015260a36101e08201526083610200820152606261022082015260416102408201526028610260820152620009c490601890601462001233565b506040805161040081018252600080825260208083018290526001938301849052600260608401819052600360808501819052600460a08601819052600560c08701819052600660e088018190526007610100890181905260086101208a015260096101408a01819052600a6101608b0152600b6101808b01526101a08a018990526101c08a018990526101e08a018990526102008a018990526102208a018990526102408a019890985261026089018a905261028089018a90526102a08901999099526102c088018590526102e088019490945261030087019290925261032086018190526103408601526103608501526103808401526103a08301939093526103c0820152600c6103e082015262000ae2916024919062001233565b50604080516101608101825260ff81526047602082015260a391810182905260666060820152607a608082015260a0810191909152603360c082015260f560e082015260b46101008201526056610120820152601461014082015262000b4d90601990600b62001233565b5060408051610200810182526000808252602082018190526001928201839052600260608301819052600360808401819052600460a08501819052600560c086015260e08501849052610100850184905261012085019390935261014084018590526101608401949094526101808301526101a08201929092526101c081019190915260066101e082015262000be890602590601062001233565b50604080516101608101825260ff81526070602082015260cc91810191909152606660608201526051608082015260b860a0820152604760c082015260f560e082015260a3610100820152603d610120820152601461014082015262000c5390601a90600b62001233565b5060408051610200810182526000808252602082018190526001928201839052600260608301819052600360808401819052600460a08501819052600560c086015260e08501849052610100850184905261012085019390935261014084018590526101608401949094526101808301526101a08201929092526101c081019190915260066101e082015262000cee90602690601062001233565b50604080516101608101825260ff815260f56020820152608f91810191909152605160608201819052603d6080830152607a60a0830152600a60c083015260cc60e083015260a3610100830152610120820152601461014082015262000d5990601b90600b62001233565b5060408051610200810182526000808252602082018190526001928201839052600260608301819052600360808401819052600460a08501819052600560c086015260e08501849052610100850184905261012085018490526101408501939093526101608401949094526101808301526101a08201929092526101c081019190915260066101e082015262000df490602790601062001233565b50604080516101608101825260ff815260f56020820152608f91810191909152605160608201819052603d6080830152607a60a0830152600a60c083015260cc60e083015260a3610100830152610120820152601461014082015262000e5f90601c90600b62001233565b5060408051610200810182526000808252602082018190526001928201839052600260608301819052600360808401819052600460a08501819052600560c086015260e08501849052610100850184905261012085018490526101408501939093526101608401949094526101808301526101a08201929092526101c081019190915260066101e082015262000efa90602890601062001233565b50604080516101608101825260ff8152603360208201819052608f9282019290925260286060820152601460808201819052607a60a0830181905260c083019390935260cc60e083015260a361010083015261012082019290925261014081019190915262000f6e90601d90600b62001233565b5060408051610200810182526000808252602082018190526001928201839052600260608301819052600360808401819052600460a08501819052600560c086015260e08501849052610100850184905261012085019390935261014084018590526101608401949094526101808301526101a08201929092526101c081019190915260066101e08201526200100990602990601062001233565b506040805160808101825260ff8152604f602082015260a591810191909152601960608201526200103f90601e90600462001233565b50604080516080810182526000815260016020820181905291810182905260608101919091526200107590602a90600462001233565b50602e80546001600160a01b0319166001600160a01b03929092169190911790556200135a565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62001106600a54600160a01b900460ff1690565b156200114b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620011873390565b6040516001600160a01b03909116815260200160405180910390a1565b828054620011b2906200131d565b90600052602060002090601f016020900481019282620011d6576000855562001221565b82601f10620011f157805160ff191683800117855562001221565b8280016001018555821562001221579182015b828111156200122157825182559160200191906001019062001204565b506200122f929150620012d6565b5090565b82805482825590600052602060002090601f01602090048101928215620012215791602002820160005b838211156200129d57835183826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026200125d565b8015620012cc5782816101000a81549060ff02191690556001016020816000010492830192600103026200129d565b50506200122f9291505b5b808211156200122f5760008155600101620012d7565b600060208284031215620012ff578081fd5b81516001600160a01b038116811462001316578182fd5b9392505050565b6002810460018216806200133257607f821691505b602082108114156200135457634e487b7160e01b600052602260045260246000fd5b50919050565b6143db806200136a6000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c80634f986b331161019d578063a5e4ee8c116100e9578063ca49d247116100a2578063e985e9c51161007c578063e985e9c5146106a0578063ebd17368146106b3578063f2fde38b146106de578063fd6b86e5146106f1576102f1565b8063ca49d24714610671578063e1fc334f14610684578063e831574214610697576102f1565b8063a5e4ee8c14610613578063b3066d4914610626578063b88d4fde14610639578063c084f5401461064c578063c08a192d14610655578063c87b56dd1461065e576102f1565b8063715018a61161015657806394e568471161013057806394e56847146105b857806395d89b41146105d8578063a1b8f374146105e0578063a22cb46514610600576102f1565b8063715018a61461058c57806377251f86146105945780638da5cb5b146105a7576102f1565b80634f986b33146105255780635c975abb146105385780636352211e1461054b5780636abcded11461055e578063704802751461056657806370a0823114610579576102f1565b806333df4b2c1161025c57806340c10f1911610215578063453e8149116101ef578063453e8149146104e15780634e71d92d146104e95780634f02c420146104f15780634f6ccce714610512576102f1565b806340c10f19146104a857806342842e0e146104bb57806342966c68146104ce576102f1565b806333df4b2c1461042f5780633431a7531461045457806335ca838b14610467578063368383911461047a5780634018b1f81461048d5780634019bfc714610495576102f1565b806316c38b3c116102ae57806316c38b3c146103be5780631785f53c146103d157806318160ddd146103e457806323b872dd146103f65780632f745c59146104095780632f97b0591461041c576102f1565b806301ffc9a7146102f657806306fdde031461031e578063081812fc14610333578063095ea7b31461035e5780630c56ae3b14610373578063150b7a0214610386575b600080fd5b610309610304366004613d24565b610704565b60405190151581526020015b60405180910390f35b610326610731565b6040516103159190613f56565b610346610341366004613dce565b6107c3565b6040516001600160a01b039091168152602001610315565b61037161036c366004613c27565b610838565b005b602b54610346906001600160a01b031681565b6103a5610394366004613ab4565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610315565b6103716103cc366004613d0a565b6108a1565b6103716103df3660046139ba565b610963565b6008545b604051908152602001610315565b610371610404366004613a74565b6109ae565b6103e8610417366004613c27565b610a57565b61037161042a366004613c27565b610b82565b61044261043d366004613dfe565b610e21565b60405160ff9091168152602001610315565b610371610462366004613dce565b610e67565b610371610475366004613c52565b610e9a565b610442610488366004613dfe565b610ffb565b600c546103e8565b6103096104a3366004613dce565b61100b565b6103716104b6366004613c27565b611149565b6103716104c9366004613a74565b61135c565b6103716104dc366004613dce565b6113c1565b6103716114fc565b610371611786565b600e546104ff9061ffff1681565b60405161ffff9091168152602001610315565b6103e8610520366004613dce565b6119f0565b602d54610346906001600160a01b031681565b610309600a54600160a01b900460ff1690565b610346610559366004613dce565b611a57565b600b546103e8565b6103716105743660046139ba565b611b7a565b6103e86105873660046139ba565b611bc8565b610371611c8c565b6103716105a2366004613d0a565b611cc2565b600a546001600160a01b0316610346565b6105cb6105c6366004613dce565b611d08565b60405161031591906140cd565b610326611ea6565b6103e86105ee366004613dce565b60106020526000908152604090205481565b61037161060e366004613bf3565b611eb5565b600e546103099062010000900460ff1681565b610371610634366004613a2a565b611f18565b610371610647366004613b4d565b611f81565b6103e8600c5481565b6103e8600d5481565b61032661066c366004613dce565b611fee565b602e54610346906001600160a01b031681565b602c54610346906001600160a01b031681565b6103e8600b5481565b6103096106ae3660046139f2565b612188565b6106c66106c1366004613dce565b61220f565b6040516001600160401b039091168152602001610315565b6103716106ec3660046139ba565b612261565b6103716106ff366004613dce565b6122f9565b60006001600160e01b0319821663780e9d6360e01b1480610729575061072982612328565b90505b919050565b60606000805461074090614290565b80601f016020809104026020016040519081016040528092919081815260200182805461076c90614290565b80156107b95780601f1061078e576101008083540402835291602001916107b9565b820191906000526020600020905b81548152906001019060200180831161079c57829003601f168201915b5050505050905090565b336000908152602f6020526040812054829060ff1680610801575060008181526012602052604090205443600160401b9091046001600160401b0316105b6108265760405162461bcd60e51b815260040161081d90613ff2565b60405180910390fd5b61082f83612378565b91505b50919050565b336000908152602f6020526040902054819060ff1680610876575060008181526012602052604090205443600160401b9091046001600160401b0316105b6108925760405162461bcd60e51b815260040161081d90613ff2565b61089c838361240d565b505050565b602c546001600160a01b0316158015906108c55750602b546001600160a01b031615155b80156108db5750602d546001600160a01b031615155b61091b5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b604482015260640161081d565b600a546001600160a01b031633146109455760405162461bcd60e51b815260040161081d90614047565b80156109585761095361251e565b610960565b6109606125a6565b50565b600a546001600160a01b0316331461098d5760405162461bcd60e51b815260040161081d90614047565b6001600160a01b03166000908152602f60205260409020805460ff19169055565b336000908152602f6020526040902054819060ff16806109ec575060008181526012602052604090205443600160401b9091046001600160401b0316105b610a085760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604090205460ff16610a4657610a2a335b83612630565b610a465760405162461bcd60e51b815260040161081d9061407c565b610a51848484612707565b50505050565b336000908152602f602052604081205460ff1680610a9457503260009081526011602052604090205443600160401b9091046001600160401b0316105b610ab05760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604090205460ff1680610af657506001600160a01b03831660009081526011602052604090205443600160401b9091046001600160401b0316105b610b125760405162461bcd60e51b815260040161081d90613ff2565b6000610b1e84846128b2565b336000908152602f602052604090205490915060ff1680610b5d575060008181526012602052604090205443600160401b9091046001600160401b0316105b610b795760405162461bcd60e51b815260040161081d90613ff2565b90505b92915050565b600a546001600160a01b03163314610bac5760405162461bcd60e51b815260040161081d90614047565b610bbf600a54600160a01b900460ff1690565b15610bdc5760405162461bcd60e51b815260040161081d9061401d565b600e5462010000900460ff1615610c435760405162461bcd60e51b815260206004820152602560248201527f43616e2077697468647261772061667465722061697264726f7020737461676560448201526420656e647360d81b606482015260840161081d565b6040516370a0823160e01b815230600482018190526000916370a082319060240160206040518083038186803b158015610c7c57600080fd5b505afa158015610c90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb49190613de6565b905060008111610cfc5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161081d565b6040516331a9108f60e11b81526004810183905230908190636352211e9060240160206040518083038186803b158015610d3557600080fd5b505afa158015610d49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6d91906139d6565b6001600160a01b031614610db55760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b604482015260640161081d565b604051632142170760e11b815230600482018190526001600160a01b038516602483015260448201849052906342842e0e90606401600060405180830381600087803b158015610e0457600080fd5b505af1158015610e18573d6000803e3d6000fd5b50505050505050565b601382600c8110610e3157600080fd5b018181548110610e4057600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600a546001600160a01b03163314610e915760405162461bcd60e51b815260040161081d90614047565b61ffff16600c55565b336000908152602f602052604090205460ff16610ec95760405162461bcd60e51b815260040161081d90613fbb565b604080518082018252426001600160401b038181168352438082166020808601918252326000908152601190915295862094518554915167ffffffffffffffff199092169084161767ffffffffffffffff60401b1916600160401b91909316029190911790925590915b8351811015610a51576040518060400160405280836001600160401b03168152602001846001600160401b031681525060126000868481518110610f8757634e487b7160e01b600052603260045260246000fd5b60209081029190910181015161ffff168252818101929092526040016000208251815493909201516001600160401b03908116600160401b0267ffffffffffffffff60401b199190931667ffffffffffffffff19909416939093179290921617905580610ff3816142e7565b915050610f33565b601f82600c8110610e3157600080fd5b336000908152602f6020526040812054829060ff1680611049575060008181526012602052604090205443600160401b9091046001600160401b0316105b6110655760405162461bcd60e51b815260040161081d90613ff2565b50506000908152600f602090815260409182902082516101a081018452905460ff80821615158084526101008084048316958501959095526201000083048216958401959095526301000000820481166060840152640100000000820481166080840152650100000000008204811660a084015266010000000000008204811660c0840152600160381b8204811660e0840152600160401b8204811693830193909352600160481b81048316610120830152600160501b81048316610140830152600160581b81048316610160830152600160601b90049091166101809091015290565b61115c600a54600160a01b900460ff1690565b156111795760405162461bcd60e51b815260040161081d9061401d565b336000908152602f602052604090205460ff166111a85760405162461bcd60e51b815260040161081d90613fbb565b600b54600e546111bd9061ffff16600161420f565b61ffff1611156112035760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b604482015260640161081d565b600e805461ffff16906000611217836142c5565b82546101009290920a61ffff818102199093169183160217909155600e54326000908152601160209081526040918290208251808401909352546001600160401b038082168452600160401b909104169082015261127a93509116908390612948565b50326001600160a01b038316148015906112a25750602b546001600160a01b03838116911614155b80156112b757506001600160a01b0382163014155b1561134657600e5461ffff166000908152600f602052604090205460ff161561131257600e5460405161ffff909116907fcf32c81b2c202b1b54ee14fa8a20c4707725e3d03d581a6e513a29d6cf4c511a90600090a2611346565b600e5460405161ffff909116907f6ea12d397b099d5fc983cd4d42866130c2134d023c87255a52c150c328c20e2090600090a25b600e5461135890839061ffff16612c91565b5050565b336000908152602f6020526040902054819060ff168061139a575060008181526012602052604090205443600160401b9091046001600160401b0316105b6113b65760405162461bcd60e51b815260040161081d90613ff2565b610a51848484612cab565b6113d4600a54600160a01b900460ff1690565b156113f15760405162461bcd60e51b815260040161081d9061401d565b336000908152602f602052604090205460ff166114205760405162461bcd60e51b815260040161081d90613fbb565b3261142a82611a57565b6001600160a01b0316146114805760405162461bcd60e51b815260206004820152601760248201527f4f6f707320796f7520646f6e2774206f776e2074686174000000000000000000604482015260640161081d565b6000818152600f602052604090205460ff16156114c75760405181907f86f8109fc1014c667ee2be6fb0b2b1d54dc3677ab2235dd38d9ea7d6419ff73890600090a26114f3565b60405181907f53a25ae4217fbc3bc27383ae359a946f20812eb9b2cb7c25142d40c433acb65890600090a25b61096081612cc6565b600a546001600160a01b031633146115265760405162461bcd60e51b815260040161081d90614047565b611539600a54600160a01b900460ff1690565b156115565760405162461bcd60e51b815260040161081d9061401d565b600e5462010000900460ff166115c95760405162461bcd60e51b815260206004820152603260248201527f41697264726f70206d696e74696e67206973206f6e6c7920617661696c61626c6044820152716520696e2061697264726f7020737461676560701b606482015260840161081d565b600e54600c5461ffff909116106116225760405162461bcd60e51b815260206004820152601960248201527f41697264726f70206d696e74696e6720636f6d706c6574656400000000000000604482015260640161081d565b602d546001600160a01b031661167a5760405162461bcd60e51b815260206004820152601d60248201527f72616e646f6d20736565642067656e657261746f72206973206e756c6c000000604482015260640161081d565b600d54600e5461168f90829061ffff16614235565b600c5410156116af57600e54600c546116ac9161ffff169061424d565b90505b60005b8181101561135857602d5460408051635ec01e4d60e01b815290516000926001600160a01b031691635ec01e4d91600480830192602092919082900301818787803b15801561170057600080fd5b505af1158015611714573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117389190613de6565b600e546040805160208082019490945261ffff9092168282015280518083038201815260609092019052805191012090506117733082611149565b508061177e816142e7565b9150506116b2565b611799600a54600160a01b900460ff1690565b156117b65760405162461bcd60e51b815260040161081d9061401d565b602e546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156117fa57600080fd5b505afa15801561180e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118329190613de6565b905060005b8181101561135857602e54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b15801561188a57600080fd5b505afa15801561189e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c29190613de6565b6040516331a9108f60e11b81526004810182905290915030908190636352211e9060240160206040518083038186803b1580156118fe57600080fd5b505afa158015611912573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193691906139d6565b6001600160a01b03161461197e5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b604482015260640161081d565b604051632142170760e11b8152306004820181905233602483015260448201839052906342842e0e90606401600060405180830381600087803b1580156119c457600080fd5b505af11580156119d8573d6000803e3d6000fd5b505050505080806119e8906142e7565b915050611837565b6000806119fc83612d6d565b336000908152602f602052604090205490915060ff1680611a3b575060008181526012602052604090205443600160401b9091046001600160401b0316105b6107295760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604081205460ff1680611a9457503260009081526011602052604090205443600160401b9091046001600160401b0316105b611ab05760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f6020526040902054829060ff1680611aee575060008181526012602052604090205443600160401b9091046001600160401b0316105b611b0a5760405162461bcd60e51b815260040161081d90613ff2565b6000611b1584612e0e565b336000908152602f602052604090205490915060ff1680611b5e57506001600160a01b03811660009081526011602052604090205443600160401b9091046001600160401b0316105b61082f5760405162461bcd60e51b815260040161081d90613ff2565b600a546001600160a01b03163314611ba45760405162461bcd60e51b815260040161081d90614047565b6001600160a01b03166000908152602f60205260409020805460ff19166001179055565b336000908152602f602052604081205460ff1680611c0557503260009081526011602052604090205443600160401b9091046001600160401b0316105b611c215760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604090205460ff1680611c6757506001600160a01b03821660009081526011602052604090205443600160401b9091046001600160401b0316105b611c835760405162461bcd60e51b815260040161081d90613ff2565b61072982612e85565b600a546001600160a01b03163314611cb65760405162461bcd60e51b815260040161081d90614047565b611cc06000612f0c565b565b600a546001600160a01b03163314611cec5760405162461bcd60e51b815260040161081d90614047565b600e8054911515620100000262ff000019909216919091179055565b611d1061393e565b336000908152602f602052604090205460ff1680611d4d57503260009081526011602052604090205443600160401b9091046001600160401b0316105b611d695760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f6020526040902054829060ff1680611da7575060008181526012602052604090205443600160401b9091046001600160401b0316105b611dc35760405162461bcd60e51b815260040161081d90613ff2565b50506000908152600f602090815260409182902082516101a081018452905460ff808216151583526101008083048216948401949094526201000082048116948301949094526301000000810484166060830152640100000000810484166080830152650100000000008104841660a083015266010000000000008104841660c0830152600160381b8104841660e0830152600160401b8104841692820192909252600160481b82048316610120820152600160501b82048316610140820152600160581b82048316610160820152600160601b90910490911661018082015290565b60606001805461074090614290565b336000908152602f602052604090205460ff1680611ef257503260009081526011602052604090205443600160401b9091046001600160401b0316105b611f0e5760405162461bcd60e51b815260040161081d90613ff2565b6113588282612f5e565b600a546001600160a01b03163314611f425760405162461bcd60e51b815260040161081d90614047565b602c80546001600160a01b039485166001600160a01b031991821617909155602b805493851693821693909317909255602d8054919093169116179055565b336000908152602f6020526040902054829060ff1680611fbf575060008181526012602052604090205443600160401b9091046001600160401b0316105b611fdb5760405162461bcd60e51b815260040161081d90613ff2565b611fe785858585612f69565b5050505050565b336000908152602f602052604090205460609060ff168061202e57503260009081526011602052604090205443600160401b9091046001600160401b0316105b61204a5760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f6020526040902054829060ff1680612088575060008181526012602052604090205443600160401b9091046001600160401b0316105b6120a45760405162461bcd60e51b815260040161081d90613ff2565b6000838152600260205260409020546001600160a01b03166121085760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420646f6573206e6f74206578697374000000000000000000604482015260640161081d565b602c5460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561214c57600080fd5b505afa158015612160573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261082f9190810190613d5c565b336000908152602f602052604081205460ff16806121c557503260009081526011602052604090205443600160401b9091046001600160401b0316105b6121e15760405162461bcd60e51b815260040161081d90613ff2565b6001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff16610b79565b336000908152602f602052604081205460ff1661223e5760405162461bcd60e51b815260040161081d90613fbb565b50600090815260126020526040902054600160401b90046001600160401b031690565b600a546001600160a01b0316331461228b5760405162461bcd60e51b815260040161081d90614047565b6001600160a01b0381166122f05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081d565b61096081612f0c565b600a546001600160a01b031633146123235760405162461bcd60e51b815260040161081d90614047565b600d55565b60006001600160e01b031982166380ac58cd60e01b148061235957506001600160e01b03198216635b5e139f60e01b145b8061072957506301ffc9a760e01b6001600160e01b0319831614610729565b6000818152600260205260408120546001600160a01b03166123f15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161081d565b506000908152600460205260409020546001600160a01b031690565b600061241882612e0e565b9050806001600160a01b0316836001600160a01b031614156124865760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161081d565b336001600160a01b03821614806124a257506124a281336106ae565b6125145760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161081d565b61089c8383612f9a565b612531600a54600160a01b900460ff1690565b1561254e5760405162461bcd60e51b815260040161081d9061401d565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125893390565b6040516001600160a01b03909116815260200160405180910390a1565b6125b9600a54600160a01b900460ff1690565b6125fc5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161081d565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612589565b6000818152600260205260408120546001600160a01b03166126a95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161081d565b60006126b483612e0e565b9050806001600160a01b0316846001600160a01b031614806126ef5750836001600160a01b03166126e4846107c3565b6001600160a01b0316145b806126ff57506126ff8185612188565b949350505050565b826001600160a01b031661271a82612e0e565b6001600160a01b0316146127825760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161081d565b6001600160a01b0382166127e45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161081d565b6127ef838383613008565b6127fa600082612f9a565b6001600160a01b038316600090815260036020526040812080546001929061282390849061424d565b90915550506001600160a01b0382166000908152600360205260408120805460019290612851908490614235565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006128bd83612e85565b821061291f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161081d565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61295061393e565b612959836130c5565b9050601060006129688361325c565b81526020019081526020016000205460001415612bce5780600f600086815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff1602179055506101008201518160000160086101000a81548160ff021916908360ff1602179055506101208201518160000160096101000a81548160ff021916908360ff16021790555061014082015181600001600a6101000a81548160ff021916908360ff16021790555061016082015181600001600b6101000a81548160ff021916908360ff16021790555061018082015181600001600c6101000a81548160ff021916908360ff1602179055509050508360106000612b558461325c565b8152602081019190915260400160002055805115612b9d5760405184907fe0fa44a304932c545206473a933ecea615b522baa4188ca656811fa23eeebefc90600090a2612bc9565b60405184907f3fd269bac8ce5679c129fb62f42855a1e0d2cdeab71acb5cc81000726bb36bc990600090a25b612c8a565b602d5460408051635ec01e4d60e01b815290516000926001600160a01b031691635ec01e4d91600480830192602092919082900301818787803b158015612c1457600080fd5b505af1158015612c28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4c9190613de6565b60408051602081019290925281018590526060016040516020818303038152906040528051906020012060001c9050612c86858285612948565b9150505b9392505050565b6113588282604051806020016040528060008152506132d2565b61089c83838360405180602001604052806000815250611f81565b6000612cd182612e0e565b9050612cdf81600084613008565b612cea600083612f9a565b6001600160a01b0381166000908152600360205260408120805460019290612d1390849061424d565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000612d7860085490565b8210612ddb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161081d565b60088281548110612dfc57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806107295760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161081d565b60006001600160a01b038216612ef05760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161081d565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611358338383613305565b612f7233610a24565b612f8e5760405162461bcd60e51b815260040161081d9061407c565b610a51848484846133d4565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612fcf82612e0e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0383166130635761305e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613086565b816001600160a01b0316836001600160a01b031614613086576130868382613407565b6001600160a01b0382166130a25761309d816134a4565b61089c565b826001600160a01b0316826001600160a01b03161461089c5761089c828261357d565b6130cd61393e565b6130dc600a61ffff8416614302565b158015825261319e57601082901c91506130fb8261ffff1660006135c1565b60ff16602082015260109190911c9061311961ffff831660016135c1565b60ff16604082015260109190911c9061313761ffff831660026135c1565b60ff16606082015260109190911c9061315561ffff831660036135c1565b60ff16608082015260109190911c9061317361ffff831660046135c1565b60ff1660a082015260109190911c9061319161ffff831660056135c1565b60ff1660c082015261072c565b601082901c91506131b48261ffff1660066135c1565b60ff1660e082015260109190911c906131d261ffff831660076135c1565b60ff1661010082015260109190911c906131f161ffff831660086135c1565b60ff1661012082015260109190911c9061321061ffff831660096135c1565b60ff1661014082015260109190911c9061322f61ffff8316600a6135c1565b60ff1661016082015260109190911c9061324e61ffff8316600b6135c1565b60ff16610180820152919050565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f01519a5160009e6132b49e909d9c9101613e5c565b60408051601f19818403018152919052805160209091012092915050565b6132dc83836136e3565b6132e96000848484613831565b61089c5760405162461bcd60e51b815260040161081d90613f69565b816001600160a01b0316836001600160a01b031614156133675760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161081d565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6133df848484612707565b6133eb84848484613831565b610a515760405162461bcd60e51b815260040161081d90613f69565b6000600161341484612e85565b61341e919061424d565b600083815260076020526040902054909150808214613471576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906134b69060019061424d565b600083815260096020526040812054600880549394509092849081106134ec57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061351b57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061356157634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061358883612e85565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008060138360ff16600c81106135e857634e487b7160e01b600052603260045260246000fd5b01546135f49085614316565b905060138360ff16600c811061361a57634e487b7160e01b600052603260045260246000fd5b018160ff168154811061363d57634e487b7160e01b600052603260045260246000fd5b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c9091161015613673579050610b7c565b601f8360ff16600c811061369757634e487b7160e01b600052603260045260246000fd5b018160ff16815481106136ba57634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b0382166137395760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161081d565b6000818152600260205260409020546001600160a01b03161561379e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081d565b6137aa60008383613008565b6001600160a01b03821660009081526003602052604081208054600192906137d3908490614235565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561393357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613875903390899088908890600401613f19565b602060405180830381600087803b15801561388f57600080fd5b505af19250505080156138bf575060408051601f3d908101601f191682019092526138bc91810190613d40565b60015b613919573d8080156138ed576040519150601f19603f3d011682016040523d82523d6000602084013e6138f2565b606091505b5080516139115760405162461bcd60e51b815260040161081d90613f69565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506126ff565b506001949350505050565b604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081019190915290565b8035801515811461072c57600080fd5b6000602082840312156139cb578081fd5b8135610b798161437a565b6000602082840312156139e7578081fd5b8151610b798161437a565b60008060408385031215613a04578081fd5b8235613a0f8161437a565b91506020830135613a1f8161437a565b809150509250929050565b600080600060608486031215613a3e578081fd5b8335613a498161437a565b92506020840135613a598161437a565b91506040840135613a698161437a565b809150509250925092565b600080600060608486031215613a88578283fd5b8335613a938161437a565b92506020840135613aa38161437a565b929592945050506040919091013590565b600080600080600060808688031215613acb578081fd5b8535613ad68161437a565b94506020860135613ae68161437a565b93506040860135925060608601356001600160401b0380821115613b08578283fd5b818801915088601f830112613b1b578283fd5b813581811115613b29578384fd5b896020828501011115613b3a578384fd5b9699959850939650602001949392505050565b60008060008060808587031215613b62578384fd5b8435613b6d8161437a565b93506020850135613b7d8161437a565b92506040850135915060608501356001600160401b03811115613b9e578182fd5b8501601f81018713613bae578182fd5b8035613bc1613bbc826141e8565b6141b8565b818152886020838501011115613bd5578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215613c05578182fd5b8235613c108161437a565b9150613c1e602084016139aa565b90509250929050565b60008060408385031215613c39578182fd5b8235613c448161437a565b946020939093013593505050565b60006020808385031215613c64578182fd5b82356001600160401b0380821115613c7a578384fd5b818501915085601f830112613c8d578384fd5b813581811115613c9f57613c9f614364565b8381029150613caf8483016141b8565b8181528481019084860184860187018a1015613cc9578788fd5b8795505b83861015613cfd578035945061ffff85168514613ce8578788fd5b84835260019590950194918601918601613ccd565b5098975050505050505050565b600060208284031215613d1b578081fd5b610b79826139aa565b600060208284031215613d35578081fd5b8135610b798161438f565b600060208284031215613d51578081fd5b8151610b798161438f565b600060208284031215613d6d578081fd5b81516001600160401b03811115613d82578182fd5b8201601f81018413613d92578182fd5b8051613da0613bbc826141e8565b818152856020838501011115613db4578384fd5b613dc5826020830160208601614264565b95945050505050565b600060208284031215613ddf578081fd5b5035919050565b600060208284031215613df7578081fd5b5051919050565b60008060408385031215613e10578182fd5b50508035926020909101359150565b60008151808452613e37816020860160208601614264565b601f01601f19169290920160200192915050565b60f81b6001600160f81b0319169052565b60008e151560f81b825260ff60f81b8e60f81b166001830152613e82600283018e613e4b565b613e8f600383018d613e4b565b613e9c600483018c613e4b565b613ea9600583018b613e4b565b613eb6600683018a613e4b565b613ec36007830189613e4b565b613ed06008830188613e4b565b613edd6009830187613e4b565b613eea600a830186613e4b565b613ef7600b830185613e4b565b613f04600c830184613e4b565b50600d019d9c50505050505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613f4c90830184613e1f565b9695505050505050565b600060208252610b796020830184613e1f565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8151151581526101a0810160208301516140ec602084018260ff169052565b506040830151614101604084018260ff169052565b506060830151614116606084018260ff169052565b50608083015161412b608084018260ff169052565b5060a083015161414060a084018260ff169052565b5060c083015161415560c084018260ff169052565b5060e083015161416a60e084018260ff169052565b506101008381015160ff908116918401919091526101208085015182169084015261014080850151821690840152610160808501518216908401526101809384015116929091019190915290565b604051601f8201601f191681016001600160401b03811182821017156141e0576141e0614364565b604052919050565b60006001600160401b0382111561420157614201614364565b50601f01601f191660200190565b600061ffff80831681851680830382111561422c5761422c614338565b01949350505050565b6000821982111561424857614248614338565b500190565b60008282101561425f5761425f614338565b500390565b60005b8381101561427f578181015183820152602001614267565b83811115610a515750506000910152565b6002810460018216806142a457607f821691505b6020821081141561083257634e487b7160e01b600052602260045260246000fd5b600061ffff808316818114156142dd576142dd614338565b6001019392505050565b60006000198214156142fb576142fb614338565b5060010190565b6000826143115761431161434e565b500690565b600060ff8316806143295761432961434e565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461096057600080fd5b6001600160e01b03198116811461096057600080fdfea2646970667358221220d09efbebbcfcf3c2272b2e4058569db64dea4e4a698b90576e0a269efdda331d64736f6c63430008020033000000000000000000000000f4a57dac3d3a4772347f813c6bf52b6286ac649e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102f15760003560e01c80634f986b331161019d578063a5e4ee8c116100e9578063ca49d247116100a2578063e985e9c51161007c578063e985e9c5146106a0578063ebd17368146106b3578063f2fde38b146106de578063fd6b86e5146106f1576102f1565b8063ca49d24714610671578063e1fc334f14610684578063e831574214610697576102f1565b8063a5e4ee8c14610613578063b3066d4914610626578063b88d4fde14610639578063c084f5401461064c578063c08a192d14610655578063c87b56dd1461065e576102f1565b8063715018a61161015657806394e568471161013057806394e56847146105b857806395d89b41146105d8578063a1b8f374146105e0578063a22cb46514610600576102f1565b8063715018a61461058c57806377251f86146105945780638da5cb5b146105a7576102f1565b80634f986b33146105255780635c975abb146105385780636352211e1461054b5780636abcded11461055e578063704802751461056657806370a0823114610579576102f1565b806333df4b2c1161025c57806340c10f1911610215578063453e8149116101ef578063453e8149146104e15780634e71d92d146104e95780634f02c420146104f15780634f6ccce714610512576102f1565b806340c10f19146104a857806342842e0e146104bb57806342966c68146104ce576102f1565b806333df4b2c1461042f5780633431a7531461045457806335ca838b14610467578063368383911461047a5780634018b1f81461048d5780634019bfc714610495576102f1565b806316c38b3c116102ae57806316c38b3c146103be5780631785f53c146103d157806318160ddd146103e457806323b872dd146103f65780632f745c59146104095780632f97b0591461041c576102f1565b806301ffc9a7146102f657806306fdde031461031e578063081812fc14610333578063095ea7b31461035e5780630c56ae3b14610373578063150b7a0214610386575b600080fd5b610309610304366004613d24565b610704565b60405190151581526020015b60405180910390f35b610326610731565b6040516103159190613f56565b610346610341366004613dce565b6107c3565b6040516001600160a01b039091168152602001610315565b61037161036c366004613c27565b610838565b005b602b54610346906001600160a01b031681565b6103a5610394366004613ab4565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610315565b6103716103cc366004613d0a565b6108a1565b6103716103df3660046139ba565b610963565b6008545b604051908152602001610315565b610371610404366004613a74565b6109ae565b6103e8610417366004613c27565b610a57565b61037161042a366004613c27565b610b82565b61044261043d366004613dfe565b610e21565b60405160ff9091168152602001610315565b610371610462366004613dce565b610e67565b610371610475366004613c52565b610e9a565b610442610488366004613dfe565b610ffb565b600c546103e8565b6103096104a3366004613dce565b61100b565b6103716104b6366004613c27565b611149565b6103716104c9366004613a74565b61135c565b6103716104dc366004613dce565b6113c1565b6103716114fc565b610371611786565b600e546104ff9061ffff1681565b60405161ffff9091168152602001610315565b6103e8610520366004613dce565b6119f0565b602d54610346906001600160a01b031681565b610309600a54600160a01b900460ff1690565b610346610559366004613dce565b611a57565b600b546103e8565b6103716105743660046139ba565b611b7a565b6103e86105873660046139ba565b611bc8565b610371611c8c565b6103716105a2366004613d0a565b611cc2565b600a546001600160a01b0316610346565b6105cb6105c6366004613dce565b611d08565b60405161031591906140cd565b610326611ea6565b6103e86105ee366004613dce565b60106020526000908152604090205481565b61037161060e366004613bf3565b611eb5565b600e546103099062010000900460ff1681565b610371610634366004613a2a565b611f18565b610371610647366004613b4d565b611f81565b6103e8600c5481565b6103e8600d5481565b61032661066c366004613dce565b611fee565b602e54610346906001600160a01b031681565b602c54610346906001600160a01b031681565b6103e8600b5481565b6103096106ae3660046139f2565b612188565b6106c66106c1366004613dce565b61220f565b6040516001600160401b039091168152602001610315565b6103716106ec3660046139ba565b612261565b6103716106ff366004613dce565b6122f9565b60006001600160e01b0319821663780e9d6360e01b1480610729575061072982612328565b90505b919050565b60606000805461074090614290565b80601f016020809104026020016040519081016040528092919081815260200182805461076c90614290565b80156107b95780601f1061078e576101008083540402835291602001916107b9565b820191906000526020600020905b81548152906001019060200180831161079c57829003601f168201915b5050505050905090565b336000908152602f6020526040812054829060ff1680610801575060008181526012602052604090205443600160401b9091046001600160401b0316105b6108265760405162461bcd60e51b815260040161081d90613ff2565b60405180910390fd5b61082f83612378565b91505b50919050565b336000908152602f6020526040902054819060ff1680610876575060008181526012602052604090205443600160401b9091046001600160401b0316105b6108925760405162461bcd60e51b815260040161081d90613ff2565b61089c838361240d565b505050565b602c546001600160a01b0316158015906108c55750602b546001600160a01b031615155b80156108db5750602d546001600160a01b031615155b61091b5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b604482015260640161081d565b600a546001600160a01b031633146109455760405162461bcd60e51b815260040161081d90614047565b80156109585761095361251e565b610960565b6109606125a6565b50565b600a546001600160a01b0316331461098d5760405162461bcd60e51b815260040161081d90614047565b6001600160a01b03166000908152602f60205260409020805460ff19169055565b336000908152602f6020526040902054819060ff16806109ec575060008181526012602052604090205443600160401b9091046001600160401b0316105b610a085760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604090205460ff16610a4657610a2a335b83612630565b610a465760405162461bcd60e51b815260040161081d9061407c565b610a51848484612707565b50505050565b336000908152602f602052604081205460ff1680610a9457503260009081526011602052604090205443600160401b9091046001600160401b0316105b610ab05760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604090205460ff1680610af657506001600160a01b03831660009081526011602052604090205443600160401b9091046001600160401b0316105b610b125760405162461bcd60e51b815260040161081d90613ff2565b6000610b1e84846128b2565b336000908152602f602052604090205490915060ff1680610b5d575060008181526012602052604090205443600160401b9091046001600160401b0316105b610b795760405162461bcd60e51b815260040161081d90613ff2565b90505b92915050565b600a546001600160a01b03163314610bac5760405162461bcd60e51b815260040161081d90614047565b610bbf600a54600160a01b900460ff1690565b15610bdc5760405162461bcd60e51b815260040161081d9061401d565b600e5462010000900460ff1615610c435760405162461bcd60e51b815260206004820152602560248201527f43616e2077697468647261772061667465722061697264726f7020737461676560448201526420656e647360d81b606482015260840161081d565b6040516370a0823160e01b815230600482018190526000916370a082319060240160206040518083038186803b158015610c7c57600080fd5b505afa158015610c90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb49190613de6565b905060008111610cfc5760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161081d565b6040516331a9108f60e11b81526004810183905230908190636352211e9060240160206040518083038186803b158015610d3557600080fd5b505afa158015610d49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6d91906139d6565b6001600160a01b031614610db55760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b604482015260640161081d565b604051632142170760e11b815230600482018190526001600160a01b038516602483015260448201849052906342842e0e90606401600060405180830381600087803b158015610e0457600080fd5b505af1158015610e18573d6000803e3d6000fd5b50505050505050565b601382600c8110610e3157600080fd5b018181548110610e4057600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600a546001600160a01b03163314610e915760405162461bcd60e51b815260040161081d90614047565b61ffff16600c55565b336000908152602f602052604090205460ff16610ec95760405162461bcd60e51b815260040161081d90613fbb565b604080518082018252426001600160401b038181168352438082166020808601918252326000908152601190915295862094518554915167ffffffffffffffff199092169084161767ffffffffffffffff60401b1916600160401b91909316029190911790925590915b8351811015610a51576040518060400160405280836001600160401b03168152602001846001600160401b031681525060126000868481518110610f8757634e487b7160e01b600052603260045260246000fd5b60209081029190910181015161ffff168252818101929092526040016000208251815493909201516001600160401b03908116600160401b0267ffffffffffffffff60401b199190931667ffffffffffffffff19909416939093179290921617905580610ff3816142e7565b915050610f33565b601f82600c8110610e3157600080fd5b336000908152602f6020526040812054829060ff1680611049575060008181526012602052604090205443600160401b9091046001600160401b0316105b6110655760405162461bcd60e51b815260040161081d90613ff2565b50506000908152600f602090815260409182902082516101a081018452905460ff80821615158084526101008084048316958501959095526201000083048216958401959095526301000000820481166060840152640100000000820481166080840152650100000000008204811660a084015266010000000000008204811660c0840152600160381b8204811660e0840152600160401b8204811693830193909352600160481b81048316610120830152600160501b81048316610140830152600160581b81048316610160830152600160601b90049091166101809091015290565b61115c600a54600160a01b900460ff1690565b156111795760405162461bcd60e51b815260040161081d9061401d565b336000908152602f602052604090205460ff166111a85760405162461bcd60e51b815260040161081d90613fbb565b600b54600e546111bd9061ffff16600161420f565b61ffff1611156112035760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b604482015260640161081d565b600e805461ffff16906000611217836142c5565b82546101009290920a61ffff818102199093169183160217909155600e54326000908152601160209081526040918290208251808401909352546001600160401b038082168452600160401b909104169082015261127a93509116908390612948565b50326001600160a01b038316148015906112a25750602b546001600160a01b03838116911614155b80156112b757506001600160a01b0382163014155b1561134657600e5461ffff166000908152600f602052604090205460ff161561131257600e5460405161ffff909116907fcf32c81b2c202b1b54ee14fa8a20c4707725e3d03d581a6e513a29d6cf4c511a90600090a2611346565b600e5460405161ffff909116907f6ea12d397b099d5fc983cd4d42866130c2134d023c87255a52c150c328c20e2090600090a25b600e5461135890839061ffff16612c91565b5050565b336000908152602f6020526040902054819060ff168061139a575060008181526012602052604090205443600160401b9091046001600160401b0316105b6113b65760405162461bcd60e51b815260040161081d90613ff2565b610a51848484612cab565b6113d4600a54600160a01b900460ff1690565b156113f15760405162461bcd60e51b815260040161081d9061401d565b336000908152602f602052604090205460ff166114205760405162461bcd60e51b815260040161081d90613fbb565b3261142a82611a57565b6001600160a01b0316146114805760405162461bcd60e51b815260206004820152601760248201527f4f6f707320796f7520646f6e2774206f776e2074686174000000000000000000604482015260640161081d565b6000818152600f602052604090205460ff16156114c75760405181907f86f8109fc1014c667ee2be6fb0b2b1d54dc3677ab2235dd38d9ea7d6419ff73890600090a26114f3565b60405181907f53a25ae4217fbc3bc27383ae359a946f20812eb9b2cb7c25142d40c433acb65890600090a25b61096081612cc6565b600a546001600160a01b031633146115265760405162461bcd60e51b815260040161081d90614047565b611539600a54600160a01b900460ff1690565b156115565760405162461bcd60e51b815260040161081d9061401d565b600e5462010000900460ff166115c95760405162461bcd60e51b815260206004820152603260248201527f41697264726f70206d696e74696e67206973206f6e6c7920617661696c61626c6044820152716520696e2061697264726f7020737461676560701b606482015260840161081d565b600e54600c5461ffff909116106116225760405162461bcd60e51b815260206004820152601960248201527f41697264726f70206d696e74696e6720636f6d706c6574656400000000000000604482015260640161081d565b602d546001600160a01b031661167a5760405162461bcd60e51b815260206004820152601d60248201527f72616e646f6d20736565642067656e657261746f72206973206e756c6c000000604482015260640161081d565b600d54600e5461168f90829061ffff16614235565b600c5410156116af57600e54600c546116ac9161ffff169061424d565b90505b60005b8181101561135857602d5460408051635ec01e4d60e01b815290516000926001600160a01b031691635ec01e4d91600480830192602092919082900301818787803b15801561170057600080fd5b505af1158015611714573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117389190613de6565b600e546040805160208082019490945261ffff9092168282015280518083038201815260609092019052805191012090506117733082611149565b508061177e816142e7565b9150506116b2565b611799600a54600160a01b900460ff1690565b156117b65760405162461bcd60e51b815260040161081d9061401d565b602e546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156117fa57600080fd5b505afa15801561180e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118329190613de6565b905060005b8181101561135857602e54604051632f745c5960e01b8152336004820152602481018390526000916001600160a01b031690632f745c599060440160206040518083038186803b15801561188a57600080fd5b505afa15801561189e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c29190613de6565b6040516331a9108f60e11b81526004810182905290915030908190636352211e9060240160206040518083038186803b1580156118fe57600080fd5b505afa158015611912573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193691906139d6565b6001600160a01b03161461197e5760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d1bdad95b9259608a1b604482015260640161081d565b604051632142170760e11b8152306004820181905233602483015260448201839052906342842e0e90606401600060405180830381600087803b1580156119c457600080fd5b505af11580156119d8573d6000803e3d6000fd5b505050505080806119e8906142e7565b915050611837565b6000806119fc83612d6d565b336000908152602f602052604090205490915060ff1680611a3b575060008181526012602052604090205443600160401b9091046001600160401b0316105b6107295760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604081205460ff1680611a9457503260009081526011602052604090205443600160401b9091046001600160401b0316105b611ab05760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f6020526040902054829060ff1680611aee575060008181526012602052604090205443600160401b9091046001600160401b0316105b611b0a5760405162461bcd60e51b815260040161081d90613ff2565b6000611b1584612e0e565b336000908152602f602052604090205490915060ff1680611b5e57506001600160a01b03811660009081526011602052604090205443600160401b9091046001600160401b0316105b61082f5760405162461bcd60e51b815260040161081d90613ff2565b600a546001600160a01b03163314611ba45760405162461bcd60e51b815260040161081d90614047565b6001600160a01b03166000908152602f60205260409020805460ff19166001179055565b336000908152602f602052604081205460ff1680611c0557503260009081526011602052604090205443600160401b9091046001600160401b0316105b611c215760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f602052604090205460ff1680611c6757506001600160a01b03821660009081526011602052604090205443600160401b9091046001600160401b0316105b611c835760405162461bcd60e51b815260040161081d90613ff2565b61072982612e85565b600a546001600160a01b03163314611cb65760405162461bcd60e51b815260040161081d90614047565b611cc06000612f0c565b565b600a546001600160a01b03163314611cec5760405162461bcd60e51b815260040161081d90614047565b600e8054911515620100000262ff000019909216919091179055565b611d1061393e565b336000908152602f602052604090205460ff1680611d4d57503260009081526011602052604090205443600160401b9091046001600160401b0316105b611d695760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f6020526040902054829060ff1680611da7575060008181526012602052604090205443600160401b9091046001600160401b0316105b611dc35760405162461bcd60e51b815260040161081d90613ff2565b50506000908152600f602090815260409182902082516101a081018452905460ff808216151583526101008083048216948401949094526201000082048116948301949094526301000000810484166060830152640100000000810484166080830152650100000000008104841660a083015266010000000000008104841660c0830152600160381b8104841660e0830152600160401b8104841692820192909252600160481b82048316610120820152600160501b82048316610140820152600160581b82048316610160820152600160601b90910490911661018082015290565b60606001805461074090614290565b336000908152602f602052604090205460ff1680611ef257503260009081526011602052604090205443600160401b9091046001600160401b0316105b611f0e5760405162461bcd60e51b815260040161081d90613ff2565b6113588282612f5e565b600a546001600160a01b03163314611f425760405162461bcd60e51b815260040161081d90614047565b602c80546001600160a01b039485166001600160a01b031991821617909155602b805493851693821693909317909255602d8054919093169116179055565b336000908152602f6020526040902054829060ff1680611fbf575060008181526012602052604090205443600160401b9091046001600160401b0316105b611fdb5760405162461bcd60e51b815260040161081d90613ff2565b611fe785858585612f69565b5050505050565b336000908152602f602052604090205460609060ff168061202e57503260009081526011602052604090205443600160401b9091046001600160401b0316105b61204a5760405162461bcd60e51b815260040161081d90613ff2565b336000908152602f6020526040902054829060ff1680612088575060008181526012602052604090205443600160401b9091046001600160401b0316105b6120a45760405162461bcd60e51b815260040161081d90613ff2565b6000838152600260205260409020546001600160a01b03166121085760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420646f6573206e6f74206578697374000000000000000000604482015260640161081d565b602c5460405163c87b56dd60e01b8152600481018590526001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561214c57600080fd5b505afa158015612160573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261082f9190810190613d5c565b336000908152602f602052604081205460ff16806121c557503260009081526011602052604090205443600160401b9091046001600160401b0316105b6121e15760405162461bcd60e51b815260040161081d90613ff2565b6001600160a01b0380841660009081526005602090815260408083209386168352929052205460ff16610b79565b336000908152602f602052604081205460ff1661223e5760405162461bcd60e51b815260040161081d90613fbb565b50600090815260126020526040902054600160401b90046001600160401b031690565b600a546001600160a01b0316331461228b5760405162461bcd60e51b815260040161081d90614047565b6001600160a01b0381166122f05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081d565b61096081612f0c565b600a546001600160a01b031633146123235760405162461bcd60e51b815260040161081d90614047565b600d55565b60006001600160e01b031982166380ac58cd60e01b148061235957506001600160e01b03198216635b5e139f60e01b145b8061072957506301ffc9a760e01b6001600160e01b0319831614610729565b6000818152600260205260408120546001600160a01b03166123f15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161081d565b506000908152600460205260409020546001600160a01b031690565b600061241882612e0e565b9050806001600160a01b0316836001600160a01b031614156124865760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161081d565b336001600160a01b03821614806124a257506124a281336106ae565b6125145760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161081d565b61089c8383612f9a565b612531600a54600160a01b900460ff1690565b1561254e5760405162461bcd60e51b815260040161081d9061401d565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125893390565b6040516001600160a01b03909116815260200160405180910390a1565b6125b9600a54600160a01b900460ff1690565b6125fc5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161081d565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612589565b6000818152600260205260408120546001600160a01b03166126a95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161081d565b60006126b483612e0e565b9050806001600160a01b0316846001600160a01b031614806126ef5750836001600160a01b03166126e4846107c3565b6001600160a01b0316145b806126ff57506126ff8185612188565b949350505050565b826001600160a01b031661271a82612e0e565b6001600160a01b0316146127825760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161081d565b6001600160a01b0382166127e45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161081d565b6127ef838383613008565b6127fa600082612f9a565b6001600160a01b038316600090815260036020526040812080546001929061282390849061424d565b90915550506001600160a01b0382166000908152600360205260408120805460019290612851908490614235565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006128bd83612e85565b821061291f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161081d565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61295061393e565b612959836130c5565b9050601060006129688361325c565b81526020019081526020016000205460001415612bce5780600f600086815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff021916908360ff16021790555060408201518160000160026101000a81548160ff021916908360ff16021790555060608201518160000160036101000a81548160ff021916908360ff16021790555060808201518160000160046101000a81548160ff021916908360ff16021790555060a08201518160000160056101000a81548160ff021916908360ff16021790555060c08201518160000160066101000a81548160ff021916908360ff16021790555060e08201518160000160076101000a81548160ff021916908360ff1602179055506101008201518160000160086101000a81548160ff021916908360ff1602179055506101208201518160000160096101000a81548160ff021916908360ff16021790555061014082015181600001600a6101000a81548160ff021916908360ff16021790555061016082015181600001600b6101000a81548160ff021916908360ff16021790555061018082015181600001600c6101000a81548160ff021916908360ff1602179055509050508360106000612b558461325c565b8152602081019190915260400160002055805115612b9d5760405184907fe0fa44a304932c545206473a933ecea615b522baa4188ca656811fa23eeebefc90600090a2612bc9565b60405184907f3fd269bac8ce5679c129fb62f42855a1e0d2cdeab71acb5cc81000726bb36bc990600090a25b612c8a565b602d5460408051635ec01e4d60e01b815290516000926001600160a01b031691635ec01e4d91600480830192602092919082900301818787803b158015612c1457600080fd5b505af1158015612c28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4c9190613de6565b60408051602081019290925281018590526060016040516020818303038152906040528051906020012060001c9050612c86858285612948565b9150505b9392505050565b6113588282604051806020016040528060008152506132d2565b61089c83838360405180602001604052806000815250611f81565b6000612cd182612e0e565b9050612cdf81600084613008565b612cea600083612f9a565b6001600160a01b0381166000908152600360205260408120805460019290612d1390849061424d565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000612d7860085490565b8210612ddb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161081d565b60088281548110612dfc57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806107295760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161081d565b60006001600160a01b038216612ef05760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161081d565b506001600160a01b031660009081526003602052604090205490565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611358338383613305565b612f7233610a24565b612f8e5760405162461bcd60e51b815260040161081d9061407c565b610a51848484846133d4565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612fcf82612e0e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0383166130635761305e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613086565b816001600160a01b0316836001600160a01b031614613086576130868382613407565b6001600160a01b0382166130a25761309d816134a4565b61089c565b826001600160a01b0316826001600160a01b03161461089c5761089c828261357d565b6130cd61393e565b6130dc600a61ffff8416614302565b158015825261319e57601082901c91506130fb8261ffff1660006135c1565b60ff16602082015260109190911c9061311961ffff831660016135c1565b60ff16604082015260109190911c9061313761ffff831660026135c1565b60ff16606082015260109190911c9061315561ffff831660036135c1565b60ff16608082015260109190911c9061317361ffff831660046135c1565b60ff1660a082015260109190911c9061319161ffff831660056135c1565b60ff1660c082015261072c565b601082901c91506131b48261ffff1660066135c1565b60ff1660e082015260109190911c906131d261ffff831660076135c1565b60ff1661010082015260109190911c906131f161ffff831660086135c1565b60ff1661012082015260109190911c9061321061ffff831660096135c1565b60ff1661014082015260109190911c9061322f61ffff8316600a6135c1565b60ff1661016082015260109190911c9061324e61ffff8316600b6135c1565b60ff16610180820152919050565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c01516101408d01516101608e01516101808f01519a5160009e6132b49e909d9c9101613e5c565b60408051601f19818403018152919052805160209091012092915050565b6132dc83836136e3565b6132e96000848484613831565b61089c5760405162461bcd60e51b815260040161081d90613f69565b816001600160a01b0316836001600160a01b031614156133675760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161081d565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6133df848484612707565b6133eb84848484613831565b610a515760405162461bcd60e51b815260040161081d90613f69565b6000600161341484612e85565b61341e919061424d565b600083815260076020526040902054909150808214613471576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906134b69060019061424d565b600083815260096020526040812054600880549394509092849081106134ec57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061351b57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061356157634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061358883612e85565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008060138360ff16600c81106135e857634e487b7160e01b600052603260045260246000fd5b01546135f49085614316565b905060138360ff16600c811061361a57634e487b7160e01b600052603260045260246000fd5b018160ff168154811061363d57634e487b7160e01b600052603260045260246000fd5b60009182526020918290209181049091015460ff601f9092166101000a90048116600886901c9091161015613673579050610b7c565b601f8360ff16600c811061369757634e487b7160e01b600052603260045260246000fd5b018160ff16815481106136ba57634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1691505092915050565b6001600160a01b0382166137395760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161081d565b6000818152600260205260409020546001600160a01b03161561379e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081d565b6137aa60008383613008565b6001600160a01b03821660009081526003602052604081208054600192906137d3908490614235565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561393357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613875903390899088908890600401613f19565b602060405180830381600087803b15801561388f57600080fd5b505af19250505080156138bf575060408051601f3d908101601f191682019092526138bc91810190613d40565b60015b613919573d8080156138ed576040519150601f19603f3d011682016040523d82523d6000602084013e6138f2565b606091505b5080516139115760405162461bcd60e51b815260040161081d90613f69565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506126ff565b506001949350505050565b604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081019190915290565b8035801515811461072c57600080fd5b6000602082840312156139cb578081fd5b8135610b798161437a565b6000602082840312156139e7578081fd5b8151610b798161437a565b60008060408385031215613a04578081fd5b8235613a0f8161437a565b91506020830135613a1f8161437a565b809150509250929050565b600080600060608486031215613a3e578081fd5b8335613a498161437a565b92506020840135613a598161437a565b91506040840135613a698161437a565b809150509250925092565b600080600060608486031215613a88578283fd5b8335613a938161437a565b92506020840135613aa38161437a565b929592945050506040919091013590565b600080600080600060808688031215613acb578081fd5b8535613ad68161437a565b94506020860135613ae68161437a565b93506040860135925060608601356001600160401b0380821115613b08578283fd5b818801915088601f830112613b1b578283fd5b813581811115613b29578384fd5b896020828501011115613b3a578384fd5b9699959850939650602001949392505050565b60008060008060808587031215613b62578384fd5b8435613b6d8161437a565b93506020850135613b7d8161437a565b92506040850135915060608501356001600160401b03811115613b9e578182fd5b8501601f81018713613bae578182fd5b8035613bc1613bbc826141e8565b6141b8565b818152886020838501011115613bd5578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215613c05578182fd5b8235613c108161437a565b9150613c1e602084016139aa565b90509250929050565b60008060408385031215613c39578182fd5b8235613c448161437a565b946020939093013593505050565b60006020808385031215613c64578182fd5b82356001600160401b0380821115613c7a578384fd5b818501915085601f830112613c8d578384fd5b813581811115613c9f57613c9f614364565b8381029150613caf8483016141b8565b8181528481019084860184860187018a1015613cc9578788fd5b8795505b83861015613cfd578035945061ffff85168514613ce8578788fd5b84835260019590950194918601918601613ccd565b5098975050505050505050565b600060208284031215613d1b578081fd5b610b79826139aa565b600060208284031215613d35578081fd5b8135610b798161438f565b600060208284031215613d51578081fd5b8151610b798161438f565b600060208284031215613d6d578081fd5b81516001600160401b03811115613d82578182fd5b8201601f81018413613d92578182fd5b8051613da0613bbc826141e8565b818152856020838501011115613db4578384fd5b613dc5826020830160208601614264565b95945050505050565b600060208284031215613ddf578081fd5b5035919050565b600060208284031215613df7578081fd5b5051919050565b60008060408385031215613e10578182fd5b50508035926020909101359150565b60008151808452613e37816020860160208601614264565b601f01601f19169290920160200192915050565b60f81b6001600160f81b0319169052565b60008e151560f81b825260ff60f81b8e60f81b166001830152613e82600283018e613e4b565b613e8f600383018d613e4b565b613e9c600483018c613e4b565b613ea9600583018b613e4b565b613eb6600683018a613e4b565b613ec36007830189613e4b565b613ed06008830188613e4b565b613edd6009830187613e4b565b613eea600a830186613e4b565b613ef7600b830185613e4b565b613f04600c830184613e4b565b50600d019d9c50505050505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613f4c90830184613e1f565b9695505050505050565b600060208252610b796020830184613e1f565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8151151581526101a0810160208301516140ec602084018260ff169052565b506040830151614101604084018260ff169052565b506060830151614116606084018260ff169052565b50608083015161412b608084018260ff169052565b5060a083015161414060a084018260ff169052565b5060c083015161415560c084018260ff169052565b5060e083015161416a60e084018260ff169052565b506101008381015160ff908116918401919091526101208085015182169084015261014080850151821690840152610160808501518216908401526101809384015116929091019190915290565b604051601f8201601f191681016001600160401b03811182821017156141e0576141e0614364565b604052919050565b60006001600160401b0382111561420157614201614364565b50601f01601f191660200190565b600061ffff80831681851680830382111561422c5761422c614338565b01949350505050565b6000821982111561424857614248614338565b500190565b60008282101561425f5761425f614338565b500390565b60005b8381101561427f578181015183820152602001614267565b83811115610a515750506000910152565b6002810460018216806142a457607f821691505b6020821081141561083257634e487b7160e01b600052602260045260246000fd5b600061ffff808316818114156142dd576142dd614338565b6001019392505050565b60006000198214156142fb576142fb614338565b5060010190565b6000826143115761431161434e565b500690565b600060ff8316806143295761432961434e565b8060ff84160691505092915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461096057600080fd5b6001600160e01b03198116811461096057600080fdfea2646970667358221220d09efbebbcfcf3c2272b2e4058569db64dea4e4a698b90576e0a269efdda331d64736f6c63430008020033
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.