Token MMC
Overview ERC-721
Total Supply:
5,000 MummyClub NFT
Holders:
52 addresses
Transfers:
-
Contract:
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MummyClubNFT
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-12-19 */ // File @openzeppelin/contracts/security/[email protected] // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File: @openzeppelin/contracts/utils/Context.sol /* * @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 GSN 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 payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin/contracts/introspection/IERC165.sol /** * @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); } // File: @openzeppelin/contracts/token/ERC721/IERC721.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; } // File: @openzeppelin/contracts/token/ERC721/IERC721Metadata.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); } // File: @openzeppelin/contracts/token/ERC721/IERC721Enumerable.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); } // File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol /** * @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); } // File: @openzeppelin/contracts/introspection/ERC165.sol /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } } // File: @openzeppelin/contracts/math/SafeMath.sol /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high power programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts/utils/Address.sol /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly {size := extcodesize(account)} return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-power-calls, avoid-call-value (bool success,) = recipient.call{value : amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low power `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-power 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-power call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-power-calls (bool success, bytes memory returndata) = target.call{value : value}(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-power static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-power-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-power delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-power-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/utils/EnumerableSet.sol /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) {// Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } // File: @openzeppelin/contracts/utils/EnumerableMap.sol /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct MapEntry { bytes32 _key; bytes32 _value; } struct Map { // Storage of map keys and values MapEntry[] _entries; // Position of the entry defined by a key in the `entries` array, plus 1 // because index 0 means a key is not in the map. mapping(bytes32 => uint256) _indexes; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) {// Equivalent to !contains(map, key) map._entries.push(MapEntry({_key : key, _value : value})); // The entry is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value map._indexes[key] = map._entries.length; return true; } else { map._entries[keyIndex - 1]._value = value; return false; } } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) {// Equivalent to contains(map, key) // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one // in the array, and then remove the last entry (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = keyIndex - 1; uint256 lastIndex = map._entries.length - 1; // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. MapEntry storage lastEntry = map._entries[lastIndex]; // Move the last entry to the index where the entry to delete is map._entries[toDeleteIndex] = lastEntry; // Update the index for the moved entry map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved entry was stored map._entries.pop(); // Delete the index for the deleted slot delete map._indexes[key]; return true; } else { return false; } } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._entries.length; } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require(map._entries.length > index, "EnumerableMap: index out of bounds"); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. */ function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {_tryGet}. */ function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element stored at position `index` in the set. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint160(uint256(value)))); } /** * @dev Tries to returns the value associated with `key`. O(1). * Does not revert if `key` is not in the map. * * _Available since v3.4._ */ function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); return (success, address(uint160(uint256(value)))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint160(uint256(_get(map._inner, bytes32(key))))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryGet}. */ function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage)))); } } // File: @openzeppelin/contracts/utils/Strings.sol /** * @dev String operations. */ library Strings { /** * @dev Converts a `uint256` to its ASCII `string` representation. */ function toString(uint256 _i) 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 (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len; while (_i != 0) { k = k - 1; uint8 temp = (48 + uint8(_i - _i / 10 * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } } // File: @openzeppelin/contracts/token/ERC721/ERC721.sol /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from holder address to their (enumerable) set of owned tokens mapping(address => EnumerableSet.UintSet) private _holderTokens; // Enumerable mapping from token ids to their owners EnumerableMap.UintToAddressMap private _tokenOwners; // 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; // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; // Base URI string private _baseURI; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; /* * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /* * bytes4(keccak256('totalSupply()')) == 0x18160ddd * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 * * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 */ bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721_METADATA); _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); } /** * @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 _holderTokens[owner].length(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); } /** * @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 _tokenURI = _tokenURIs[tokenId]; string memory base = baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. return string(abi.encodePacked(base, tokenId.toString())); } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function baseURI() public view virtual returns (string memory) { return _baseURI; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { return _holderTokens[owner].at(index); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds return _tokenOwners.length(); } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { (uint256 tokenId,) = _tokenOwners.at(index); return tokenId; } /** * @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 || ERC721.isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _tokenOwners.contains(tokenId); } /** * @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 || ERC721.isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: d* * - `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); _holderTokens[to].add(tokenId); _tokenOwners.set(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); // internal owner _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } _holderTokens[owner].remove(tokenId); _tokenOwners.remove(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"); // internal owner require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _holderTokens[from].remove(tokenId); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(from, to, tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */ function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; } /** * @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()) { return true; } bytes memory returndata = to.functionCall(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, _msgSender(), from, tokenId, _data ), "ERC721: transfer to non ERC721Receiver implementer"); bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == _ERC721_RECEIVED); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner } /** * @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 {} } // File: @openzeppelin/contracts/access/Ownable.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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); } interface IERC1155 { function balanceOf(address account, uint id) external view returns (uint256); } interface IVester { function bonusRewards(address _account) external view returns (uint256); function setBonusRewards(address _account, uint256 _amount) external; } contract MockVester { mapping(address => uint256) public bonusRewards; function setBonusRewards(address _account, uint256 _amount) external { bonusRewards[_account] = _amount; } } contract MummyClubNFT is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; /// @notice Collection of NFT details to describe each NFT struct NFTDetails { uint256 power; } /// @notice Use the NFT tokenId to read NFT details mapping(uint256 => NFTDetails) public nftDetailsById; address public saleContract; constructor(address _saleContract) ERC721("MMC", "MummyClub NFT") { saleContract = _saleContract; } /* ========== Public view functions ========== */ function getTokenPower(uint256 tokenId) external view returns (uint256) { NFTDetails memory currentNFTDetails = nftDetailsById[tokenId]; return currentNFTDetails.power; } // @dev sets base URI function setBaseURI(string memory baseURI) external onlyOwner { _setBaseURI(baseURI); } /** * @dev Throws if called by any account other than the saleContract. */ modifier onlySaleContract() { require(saleContract == _msgSender(), "MummyNFT: caller is not the saleContract"); _; } function mint(uint256 _power, address _to) external onlySaleContract returns (uint256) { uint256 id = totalSupply() + 1; nftDetailsById[id] = NFTDetails(_power); _mint(_to, id); return id; } } contract MummyClubSale is Ownable, ReentrancyGuard { using SafeMath for uint256; uint256 public constant MAX_MMC_PURCHASE = 5; // max purchase per txn uint256 public constant MAX_MMC = 5000; // max of 5000 // State variables address public communityFund; address public mmyVester; address public esMMY; MummyClubNFT public mummyClubNFT; string public MMC_PROVENANCE = ""; uint256 public mmcPrice = 500 ether; // 500 FTM uint256 public mmcPower = 10000; // 10000 power uint256 public esMMYBonus = 388e18; // 10000 power uint256 public totalVolume; uint256 public totalPower; uint256 public totalBonus; uint256 public stepEsMMY = 9900; // 0.99 uint256 public stepPrice = 10100; // 1.01 uint256 public stepPower = 9900; // 0.99 uint256 public step = 100; // bool public saleIsActive = false; // determines whether sales is active event AssetMinted(address account, uint256 tokenId, uint256 power, uint256 bonus); constructor(address _communityFund, address _esMMY, address _mmyVester) { mummyClubNFT = new MummyClubNFT(address(this)); communityFund = _communityFund; esMMY = _esMMY; mmyVester = _mmyVester; mummyClubNFT.transferOwnership(msg.sender); } // get current price and power function getCurrentPP() public view returns (uint256 _mccPrice, uint256 _mccPower, uint256 _esMMYBonus) { _mccPrice = mmcPrice; _mccPower = mmcPower; _esMMYBonus = esMMYBonus; uint256 _totalSupply = mummyClubNFT.totalSupply(); uint256 modulus = mummyClubNFT.totalSupply() % step; if (modulus == 0 && _totalSupply != 0) { _mccPrice = (mmcPrice * stepPrice) / 10000; _mccPower = (mmcPower * stepPower) / 10000; _esMMYBonus = (esMMYBonus * stepEsMMY) / 10000; } } /* ========== External public sales functions ========== */ // @dev mints meerkat for the general public function mintMummyClub(uint256 numberOfTokens) external payable nonReentrant returns (uint256 _totalPrice,uint256 _totalPower,uint256 _totalBonus) { require(saleIsActive, 'Sale Is Not Active'); // Sale must be active require(numberOfTokens <= MAX_MMC_PURCHASE, 'Exceed Purchase'); // Max mint of 1 require(mummyClubNFT.totalSupply().add(numberOfTokens) <= MAX_MMC); for (uint i = 0; i < numberOfTokens; i++) { if (mummyClubNFT.totalSupply() < MAX_MMC) { (mmcPrice, mmcPower, esMMYBonus) = this.getCurrentPP(); _totalPrice = _totalPrice + mmcPrice; uint256 id = mummyClubNFT.mint(mmcPower,msg.sender); emit AssetMinted(msg.sender, id, mmcPower, esMMYBonus); IERC20(esMMY).transfer(msg.sender, esMMYBonus); IVester vester = IVester(mmyVester); vester.setBonusRewards(msg.sender, vester.bonusRewards(msg.sender) + esMMYBonus); _totalPower += mmcPower; _totalBonus += esMMYBonus; } } require(_totalPrice <= msg.value); if (msg.value > _totalPrice) { payable(msg.sender).transfer(msg.value - _totalPrice); } payable(communityFund).transfer(_totalPrice); totalVolume += _totalPrice; totalBonus += _totalBonus; totalPower += _totalPower; } function estimateAmount(uint256 numberOfTokens) external view returns (uint256 _totalPrice, uint256 _totalPower, uint256 _totalBonus) { uint256 _price = mmcPrice; uint256 _power = mmcPower; uint256 _bonus = esMMYBonus; uint256 _totalSupply = mummyClubNFT.totalSupply(); for (uint i = 0; i < numberOfTokens; i++) { if (_totalSupply < MAX_MMC) { if (_totalSupply % step == 0 && _totalSupply != 0) { _price = (_price * stepPrice) / 10000; _power = (_power * stepPower) / 10000; _bonus = (_bonus * stepEsMMY) / 10000; } _totalPrice += _price; _totalPower += _power; _totalBonus += _bonus; _totalSupply = _totalSupply + 1; } else { break; } } } // @dev withdraw funds function withdraw() external onlyOwner { uint balance = address(this).balance; payable(msg.sender).transfer(balance); } // @dev withdraw funds function withdrawERC20(address token) external onlyOwner { uint balance = IERC20(token).balanceOf(address(this)); IERC20(token).transfer(msg.sender, balance); } // @dev flips the state for sales function flipSaleState() external onlyOwner { saleIsActive = !saleIsActive; } // @dev set insurance fund contract address function setCommunityFund(address _communityFund) public onlyOwner { communityFund = _communityFund; } // @dev set esMMY contract address function setEsMMY(address _esMMY) public onlyOwner { esMMY = _esMMY; } // @dev set mmyVester contract address function setMmyVester(address _mmyVester) public onlyOwner { mmyVester = _mmyVester; } // @dev sets sale info (price + power) function setSaleInfo(uint256 _price, uint256 _power, uint256 _esMMYBonus) external onlyOwner { mmcPrice = _price; mmcPower = _power; esMMYBonus = _esMMYBonus; } // @dev set increate Price And Power function setIncreaseInfo(uint256 _stepPrice, uint256 _stepPower, uint256 _step, uint256 _stepEsMMY) public onlyOwner { stepPrice = _stepPrice; stepPower = _stepPower; step = _step; stepEsMMY = _stepEsMMY; } // @dev set provenance once it's calculated function setProvenanceHash(string memory provenanceHash) public onlyOwner { MMC_PROVENANCE = provenanceHash; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_saleContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenPower","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_power","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftDetailsById","outputs":[{"internalType":"uint256","name":"power","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":[],"name":"saleContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620027df380380620027df833981016040819052620000349162000281565b60408051808201825260038152624d4d4360e81b6020808301919091528251808401909352600d83526c135d5b5b5e50db1d5888139195609a1b9083015290620000856301ffc9a760e01b62000157565b81516200009a906006906020850190620001db565b508051620000b0906007906020840190620001db565b50620000c36380ac58cd60e01b62000157565b620000d5635b5e139f60e01b62000157565b620000e763780e9d6360e01b62000157565b5050600a80546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600b55600d80546001600160a01b0319166001600160a01b0392909216919091179055620002f0565b6001600160e01b03198082161415620001b65760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054620001e990620002b3565b90600052602060002090601f0160209004810192826200020d576000855562000258565b82601f106200022857805160ff191683800117855562000258565b8280016001018555821562000258579182015b82811115620002585782518255916020019190600101906200023b565b50620002669291506200026a565b5090565b5b808211156200026657600081556001016200026b565b6000602082840312156200029457600080fd5b81516001600160a01b0381168114620002ac57600080fd5b9392505050565b600181811c90821680620002c857607f821691505b60208210811415620002ea57634e487b7160e01b600052602260045260246000fd5b50919050565b6124df80620003006000396000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c806370a08231116100ee578063a22cb46511610097578063daf6ca3011610071578063daf6ca30146103b2578063df82eb8b146103d2578063e985e9c5146103f2578063f2fde38b1461043b57600080fd5b8063a22cb46514610379578063b88d4fde1461038c578063c87b56dd1461039f57600080fd5b80638da5cb5b116100c85780638da5cb5b1461034057806394bf804d1461035e57806395d89b411461037157600080fd5b806370a08231146102f4578063715018a61461030757806387c5d8321461030f57600080fd5b80632f745c591161015057806355f804b31161012a57806355f804b3146102c65780636352211e146102d95780636c0360eb146102ec57600080fd5b80632f745c591461028d57806342842e0e146102a05780634f6ccce7146102b357600080fd5b8063095ea7b311610181578063095ea7b31461024f57806318160ddd1461026457806323b872dd1461027a57600080fd5b806301ffc9a7146101a857806306fdde0314610202578063081812fc14610217575b600080fd5b6101ed6101b636600461202f565b7fffffffff000000000000000000000000000000000000000000000000000000001660009081526020819052604090205460ff1690565b60405190151581526020015b60405180910390f35b61020a61044e565b6040516101f991906121cc565b61022a6102253660046120b2565b6104e0565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f9565b61026261025d366004612005565b61058b565b005b61026c6106e4565b6040519081526020016101f9565b610262610288366004611f11565b6106f5565b61026c61029b366004612005565b61077c565b6102626102ae366004611f11565b6107b4565b61026c6102c13660046120b2565b6107cf565b6102626102d4366004612069565b6107e5565b61022a6102e73660046120b2565b610858565b61020a610880565b61026c610302366004611ec3565b61088f565b610262610948565b61026c61031d3660046120b2565b6000908152600c6020908152604091829020825191820190925290549081905290565b600a5473ffffffffffffffffffffffffffffffffffffffff1661022a565b61026c61036c3660046120cb565b610a1e565b61020a610aef565b610262610387366004611fc9565b610afe565b61026261039a366004611f4d565b610bfb565b61020a6103ad3660046120b2565b610c89565b600d5461022a9073ffffffffffffffffffffffffffffffffffffffff1681565b61026c6103e03660046120b2565b600c6020526000908152604090205481565b6101ed610400366004611ede565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b610262610449366004611ec3565b610e09565b60606006805461045d906122d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610489906122d7565b80156104d65780601f106104ab576101008083540402835291602001916104d6565b820191906000526020600020905b8154815290600101906020018083116104b957829003601f168201915b5050505050905090565b60006104eb82610f87565b6105625760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b600061059682610858565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561063a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610559565b3373ffffffffffffffffffffffffffffffffffffffff8216148061066357506106638133610400565b6106d55760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610559565b6106df8383610f94565b505050565b60006106f06002611034565b905090565b6106ff338261103e565b6107715760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610559565b6106df83838361117a565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604081206107ab9083611383565b90505b92915050565b6106df83838360405180602001604052806000815250610bfb565b6000806107dd60028461138f565b509392505050565b600a5473ffffffffffffffffffffffffffffffffffffffff16331461084c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610559565b610855816113ab565b50565b60006107ae8260405180606001604052806029815260200161248160299139600291906113c2565b60606009805461045d906122d7565b600073ffffffffffffffffffffffffffffffffffffffff821661091a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610559565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090206107ae90611034565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146109af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610559565b600a5460405160009173ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a80547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600d5460009073ffffffffffffffffffffffffffffffffffffffff163314610aae5760405162461bcd60e51b815260206004820152602860248201527f4d756d6d794e46543a2063616c6c6572206973206e6f74207468652073616c6560448201527f436f6e74726163740000000000000000000000000000000000000000000000006064820152608401610559565b6000610ab86106e4565b610ac39060016121df565b60408051602080820183528782526000848152600c909152919091209051905590506107ab83826113d9565b60606007805461045d906122d7565b73ffffffffffffffffffffffffffffffffffffffff8216331415610b645760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610559565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610c05338361103e565b610c775760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610559565b610c8384848484611518565b50505050565b6060610c9482610f87565b610d065760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610559565b60008281526008602052604081208054610d1f906122d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4b906122d7565b8015610d985780601f10610d6d57610100808354040283529160200191610d98565b820191906000526020600020905b815481529060010190602001808311610d7b57829003601f168201915b505050505090506000610da9610880565b9050805160001415610dbc575092915050565b815115610dee578082604051602001610dd6929190612154565b60405160208183030381529060405292505050919050565b80610df8856115a1565b604051602001610dd6929190612154565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610e705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610559565b73ffffffffffffffffffffffffffffffffffffffff8116610ef95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610559565b600a5460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006107ae6002836116fe565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190610fee82610858565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006107ae825490565b600061104982610f87565b6110bb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610559565b60006110c683610858565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061113557508373ffffffffffffffffffffffffffffffffffffffff1661111d846104e0565b73ffffffffffffffffffffffffffffffffffffffff16145b80611172575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff1661119a82610858565b73ffffffffffffffffffffffffffffffffffffffff16146112235760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610559565b73ffffffffffffffffffffffffffffffffffffffff82166112ab5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610559565b6112b6600082610f94565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604090206112e59082611716565b5073ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090206113159082611722565b506113226002828461172e565b50808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006107ab8383611751565b600080808061139e86866117f2565b9097909650945050505050565b80516113be906009906020840190611d6d565b5050565b60006113cf8484846118aa565b90505b9392505050565b73ffffffffffffffffffffffffffffffffffffffff821661143c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610559565b61144581610f87565b156114925760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610559565b73ffffffffffffffffffffffffffffffffffffffff821660009081526001602052604090206114c19082611722565b506114ce6002828461172e565b50604051819073ffffffffffffffffffffffffffffffffffffffff8416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61152384848461117a565b61152f84848484611913565b610c835760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610559565b6060816115e157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561160b57806115f58161232b565b91506116049050600a8361221c565b91506115e5565b60008167ffffffffffffffff811115611626576116266123f1565b6040519080825280601f01601f191660200182016040528015611650576020820181803683370190505b509050815b85156116f557611666600182612294565b90506000611675600a8861221c565b61168090600a612257565b61168a9088612294565b6116959060306121f7565b905060008160f81b9050808484815181106116b2576116b26123c2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506116ec600a8961221c565b97505050611655565b50949350505050565b600081815260018301602052604081205415156107ab565b60006107ab8383611a72565b60006107ab8383611b65565b60006113cf848473ffffffffffffffffffffffffffffffffffffffff8516611bb4565b815460009082106117ca5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60448201527f64730000000000000000000000000000000000000000000000000000000000006064820152608401610559565b8260000182815481106117df576117df6123c2565b9060005260206000200154905092915050565b81546000908190831061186d5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e60448201527f64730000000000000000000000000000000000000000000000000000000000006064820152608401610559565b6000846000018481548110611884576118846123c2565b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816118da5760405162461bcd60e51b815260040161055991906121cc565b50846118e7600183612294565b815481106118f7576118f76123c2565b9060005260206000209060020201600101549150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff84163b61193957506001611172565b6000611a0a7f150b7a0200000000000000000000000000000000000000000000000000000000338887876040516024016119769493929190612183565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405180606001604052806032815260200161244f6032913973ffffffffffffffffffffffffffffffffffffffff88169190611c55565b9050600081806020019051810190611a22919061204c565b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001492505050949350505050565b60008181526001830160205260408120548015611b5b576000611a96600183612294565b8554909150600090611aaa90600190612294565b90506000866000018281548110611ac357611ac36123c2565b9060005260206000200154905080876000018481548110611ae657611ae66123c2565b600091825260209091200155611afd8360016121df565b60008281526001890160205260409020558654879080611b1f57611b1f612393565b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506107ae565b60009150506107ae565b6000818152600183016020526040812054611bac575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107ae565b5060006107ae565b600082815260018401602052604081205480611c195750506040805180820182528381526020808201848152865460018181018955600089815284812095516002909302909501918255915190820155865486845281880190925292909120556113d2565b8285611c26600184612294565b81548110611c3657611c366123c2565b90600052602060002090600202016001018190555060009150506113d2565b60606113cf848460008585843b611cae5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610559565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611cd79190612138565b60006040518083038185875af1925050503d8060008114611d14576040519150601f19603f3d011682016040523d82523d6000602084013e611d19565b606091505b5091509150611d29828286611d34565b979650505050505050565b60608315611d435750816113d2565b825115611d535782518084602001fd5b8160405162461bcd60e51b815260040161055991906121cc565b828054611d79906122d7565b90600052602060002090601f016020900481019282611d9b5760008555611de1565b82601f10611db457805160ff1916838001178555611de1565b82800160010185558215611de1579182015b82811115611de1578251825591602001919060010190611dc6565b50611ded929150611df1565b5090565b5b80821115611ded5760008155600101611df2565b600067ffffffffffffffff80841115611e2157611e216123f1565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611e6757611e676123f1565b81604052809350858152868686011115611e8057600080fd5b858560208301376000602087830101525050509392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611ebe57600080fd5b919050565b600060208284031215611ed557600080fd5b6107ab82611e9a565b60008060408385031215611ef157600080fd5b611efa83611e9a565b9150611f0860208401611e9a565b90509250929050565b600080600060608486031215611f2657600080fd5b611f2f84611e9a565b9250611f3d60208501611e9a565b9150604084013590509250925092565b60008060008060808587031215611f6357600080fd5b611f6c85611e9a565b9350611f7a60208601611e9a565b925060408501359150606085013567ffffffffffffffff811115611f9d57600080fd5b8501601f81018713611fae57600080fd5b611fbd87823560208401611e06565b91505092959194509250565b60008060408385031215611fdc57600080fd5b611fe583611e9a565b915060208301358015158114611ffa57600080fd5b809150509250929050565b6000806040838503121561201857600080fd5b61202183611e9a565b946020939093013593505050565b60006020828403121561204157600080fd5b81356107ab81612420565b60006020828403121561205e57600080fd5b81516107ab81612420565b60006020828403121561207b57600080fd5b813567ffffffffffffffff81111561209257600080fd5b8201601f810184136120a357600080fd5b61117284823560208401611e06565b6000602082840312156120c457600080fd5b5035919050565b600080604083850312156120de57600080fd5b82359150611f0860208401611e9a565b600081518084526121068160208601602086016122ab565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000825161214a8184602087016122ab565b9190910192915050565b600083516121668184602088016122ab565b83519083019061217a8183602088016122ab565b01949350505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526121c260808301846120ee565b9695505050505050565b6020815260006107ab60208301846120ee565b600082198211156121f2576121f2612364565b500190565b600060ff821660ff84168060ff0382111561221457612214612364565b019392505050565b600082612252577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561228f5761228f612364565b500290565b6000828210156122a6576122a6612364565b500390565b60005b838110156122c65781810151838201526020016122ae565b83811115610c835750506000910152565b600181811c908216806122eb57607f821691505b60208210811415612325577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561235d5761235d612364565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461085557600080fdfe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656ea2646970667358221220877b8aecd2f7c8e442523007dd553763067348124e3a412a578f3a59f2e4f7bc64736f6c634300080600330000000000000000000000006983249cfbe49ebd2c7fd37d392d69f1aebe2d11
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006983249cfbe49ebd2c7fd37d392d69f1aebe2d11
-----Decoded View---------------
Arg [0] : _saleContract (address): 0x6983249cfbe49ebd2c7fd37d392d69f1aebe2d11
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006983249cfbe49ebd2c7fd37d392d69f1aebe2d11
Deployed ByteCode Sourcemap
70075:1355:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12718:150;;;;;;:::i;:::-;12827:33;;12803:4;12827:33;;;;;;;;;;;;;;12718:150;;;;6387:14:1;;6380:22;6362:41;;6350:2;6335:18;12718:150:0;;;;;;;;53972:100;;;:::i;:::-;;;;;;;:::i;56757:221::-;;;;;;:::i;:::-;;:::i;:::-;;;5635:42:1;5623:55;;;5605:74;;5593:2;5578:18;56757:221:0;5560:125:1;56287:404:0;;;;;;:::i;:::-;;:::i;:::-;;55766:211;;;:::i;:::-;;;14736:25:1;;;14724:2;14709:18;55766:211:0;14691:76:1;57647:305:0;;;;;;:::i;:::-;;:::i;55528:162::-;;;;;;:::i;:::-;;:::i;58023:151::-;;;;;;:::i;:::-;;:::i;56054:171::-;;;;;;:::i;:::-;;:::i;70855:101::-;;;;;;:::i;:::-;;:::i;53728:177::-;;;;;;:::i;:::-;;:::i;55347:97::-;;;:::i;53445:221::-;;;;;;:::i;:::-;;:::i;68697:148::-;;;:::i;70627:193::-;;;;;;:::i;:::-;70690:7;70748:23;;;:14;:23;;;;;;;;;70710:61;;;;;;;;;;;;;;;70627:193;68046:87;68119:6;;;;68046:87;;71196:231;;;;;;:::i;:::-;;:::i;54141:104::-;;;:::i;57050:295::-;;;;;;:::i;:::-;;:::i;58245:285::-;;;;;;:::i;:::-;;:::i;54316:792::-;;;;;;:::i;:::-;;:::i;70413:27::-;;;;;;;;;70354:52;;;;;;:::i;:::-;;;;;;;;;;;;;;57416:164;;;;;;:::i;:::-;57537:25;;;;57513:4;57537:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;57416:164;69000:244;;;;;;:::i;:::-;;:::i;53972:100::-;54026:13;54059:5;54052:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53972:100;:::o;56757:221::-;56833:7;56861:16;56869:7;56861;:16::i;:::-;56853:73;;;;-1:-1:-1;;;56853:73:0;;12014:2:1;56853:73:0;;;11996:21:1;12053:2;12033:18;;;12026:30;12092:34;12072:18;;;12065:62;12163:14;12143:18;;;12136:42;12195:19;;56853:73:0;;;;;;;;;-1:-1:-1;56946:24:0;;;;:15;:24;;;;;;;;;56757:221::o;56287:404::-;56368:13;56384:23;56399:7;56384:14;:23::i;:::-;56368:39;;56432:5;56426:11;;:2;:11;;;;56418:57;;;;-1:-1:-1;;;56418:57:0;;13614:2:1;56418:57:0;;;13596:21:1;13653:2;13633:18;;;13626:30;13692:34;13672:18;;;13665:62;13763:3;13743:18;;;13736:31;13784:19;;56418:57:0;13586:223:1;56418:57:0;3428:10;56496:21;;;;;:69;;-1:-1:-1;56521:44:0;56545:5;3428:10;57416:164;:::i;56521:44::-;56488:161;;;;-1:-1:-1;;;56488:161:0;;10414:2:1;56488:161:0;;;10396:21:1;10453:2;10433:18;;;10426:30;10492:34;10472:18;;;10465:62;10563:26;10543:18;;;10536:54;10607:19;;56488:161:0;10386:246:1;56488:161:0;56662:21;56671:2;56675:7;56662:8;:21::i;:::-;56357:334;56287:404;;:::o;55766:211::-;55827:7;55948:21;:12;:19;:21::i;:::-;55941:28;;55766:211;:::o;57647:305::-;57808:41;3428:10;57841:7;57808:18;:41::i;:::-;57800:103;;;;-1:-1:-1;;;57800:103:0;;14016:2:1;57800:103:0;;;13998:21:1;14055:2;14035:18;;;14028:30;14094:34;14074:18;;;14067:62;14165:19;14145:18;;;14138:47;14202:19;;57800:103:0;13988:239:1;57800:103:0;57916:28;57926:4;57932:2;57936:7;57916:9;:28::i;55528:162::-;55652:20;;;55625:7;55652:20;;;:13;:20;;;;;:30;;55676:5;55652:23;:30::i;:::-;55645:37;;55528:162;;;;;:::o;58023:151::-;58127:39;58144:4;58150:2;58154:7;58127:39;;;;;;;;;;;;:16;:39::i;56054:171::-;56129:7;;56170:22;:12;56186:5;56170:15;:22::i;:::-;-1:-1:-1;56149:43:0;56054:171;-1:-1:-1;;;56054:171:0:o;70855:101::-;68119:6;;68266:23;68119:6;3428:10;68266:23;68258:68;;;;-1:-1:-1;;;68258:68:0;;12427:2:1;68258:68:0;;;12409:21:1;;;12446:18;;;12439:30;12505:34;12485:18;;;12478:62;12557:18;;68258:68:0;12399:182:1;68258:68:0;70928:20:::1;70940:7;70928:11;:20::i;:::-;70855:101:::0;:::o;53728:177::-;53800:7;53827:70;53844:7;53827:70;;;;;;;;;;;;;;;;;:12;;:70;:16;:70::i;55347:97::-;55395:13;55428:8;55421:15;;;;;:::i;53445:221::-;53517:7;53545:19;;;53537:74;;;;-1:-1:-1;;;53537:74:0;;10839:2:1;53537:74:0;;;10821:21:1;10878:2;10858:18;;;10851:30;10917:34;10897:18;;;10890:62;10988:12;10968:18;;;10961:40;11018:19;;53537:74:0;10811:232:1;53537:74:0;53629:20;;;;;;;:13;:20;;;;;:29;;:27;:29::i;68697:148::-;68119:6;;68266:23;68119:6;3428:10;68266:23;68258:68;;;;-1:-1:-1;;;68258:68:0;;12427:2:1;68258:68:0;;;12409:21:1;;;12446:18;;;12439:30;12505:34;12485:18;;;12478:62;12557:18;;68258:68:0;12399:182:1;68258:68:0;68788:6:::1;::::0;68767:40:::1;::::0;68804:1:::1;::::0;68767:40:::1;68788:6;::::0;68767:40:::1;::::0;68804:1;;68767:40:::1;68818:6;:19:::0;;;::::1;::::0;;68697:148::o;71196:231::-;71097:12;;71274:7;;71097:28;:12;3428:10;71097:28;71089:81;;;;-1:-1:-1;;;71089:81:0;;10005:2:1;71089:81:0;;;9987:21:1;10044:2;10024:18;;;10017:30;10083:34;10063:18;;;10056:62;10154:10;10134:18;;;10127:38;10182:19;;71089:81:0;9977:230:1;71089:81:0;71294:10:::1;71307:13;:11;:13::i;:::-;:17;::::0;71323:1:::1;71307:17;:::i;:::-;71356:18;::::0;;::::1;::::0;;::::1;::::0;;;;;-1:-1:-1;71335:18:0;;;:14:::1;:18:::0;;;;;;;:39;;;;71294:30;-1:-1:-1;71385:14:0::1;71391:3:::0;71294:30;71385:5:::1;:14::i;54141:104::-:0;54197:13;54230:7;54223:14;;;;;:::i;57050:295::-;57153:24;;;3428:10;57153:24;;57145:62;;;;-1:-1:-1;;;57145:62:0;;8831:2:1;57145:62:0;;;8813:21:1;8870:2;8850:18;;;8843:30;8909:27;8889:18;;;8882:55;8954:18;;57145:62:0;8803:175:1;57145:62:0;3428:10;57220:32;;;;:18;:32;;;;;;;;;:42;;;;;;;;;;;;:53;;;;;;;;;;;;;57289:48;;6362:41:1;;;57220:42:0;;3428:10;57289:48;;6335:18:1;57289:48:0;;;;;;;57050:295;;:::o;58245:285::-;58377:41;3428:10;58410:7;58377:18;:41::i;:::-;58369:103;;;;-1:-1:-1;;;58369:103:0;;14016:2:1;58369:103:0;;;13998:21:1;14055:2;14035:18;;;14028:30;14094:34;14074:18;;;14067:62;14165:19;14145:18;;;14138:47;14202:19;;58369:103:0;13988:239:1;58369:103:0;58483:39;58497:4;58503:2;58507:7;58516:5;58483:13;:39::i;:::-;58245:285;;;;:::o;54316:792::-;54389:13;54423:16;54431:7;54423;:16::i;:::-;54415:76;;;;-1:-1:-1;;;54415:76:0;;13198:2:1;54415:76:0;;;13180:21:1;13237:2;13217:18;;;13210:30;13276:34;13256:18;;;13249:62;13347:17;13327:18;;;13320:45;13382:19;;54415:76:0;13170:237:1;54415:76:0;54504:23;54530:19;;;:10;:19;;;;;54504:45;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54560:18;54581:9;:7;:9::i;:::-;54560:30;;54672:4;54666:18;54688:1;54666:23;54662:72;;;-1:-1:-1;54713:9:0;54316:792;-1:-1:-1;;54316:792:0:o;54662:72::-;54838:23;;:27;54834:108;;54913:4;54919:9;54896:33;;;;;;;;;:::i;:::-;;;;;;;;;;;;;54882:48;;;;54316:792;;;:::o;54834:108::-;55074:4;55080:18;:7;:16;:18::i;:::-;55057:42;;;;;;;;;:::i;69000:244::-;68119:6;;68266:23;68119:6;3428:10;68266:23;68258:68;;;;-1:-1:-1;;;68258:68:0;;12427:2:1;68258:68:0;;;12409:21:1;;;12446:18;;;12439:30;12505:34;12485:18;;;12478:62;12557:18;;68258:68:0;12399:182:1;68258:68:0;69089:22:::1;::::0;::::1;69081:73;;;::::0;-1:-1:-1;;;69081:73:0;;7662:2:1;69081:73:0::1;::::0;::::1;7644:21:1::0;7701:2;7681:18;;;7674:30;7740:34;7720:18;;;7713:62;7811:8;7791:18;;;7784:36;7837:19;;69081:73:0::1;7634:228:1::0;69081:73:0::1;69191:6;::::0;69170:38:::1;::::0;::::1;::::0;;::::1;::::0;69191:6:::1;::::0;69170:38:::1;::::0;69191:6:::1;::::0;69170:38:::1;69219:6;:17:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;69000:244::o;59997:127::-;60062:4;60086:30;:12;60108:7;60086:21;:30::i;66053:201::-;66128:24;;;;:15;:24;;;;;:29;;;;;;;;;;;;;:24;;66182:23;66128:24;66182:14;:23::i;:::-;66173:46;;;;;;;;;;;;66053:201;;:::o;46760:123::-;46829:7;46856:19;46864:3;43358:19;;43275:110;60291:355;60384:4;60409:16;60417:7;60409;:16::i;:::-;60401:73;;;;-1:-1:-1;;;60401:73:0;;9592:2:1;60401:73:0;;;9574:21:1;9631:2;9611:18;;;9604:30;9670:34;9650:18;;;9643:62;9741:14;9721:18;;;9714:42;9773:19;;60401:73:0;9564:234:1;60401:73:0;60485:13;60501:23;60516:7;60501:14;:23::i;:::-;60485:39;;60554:5;60543:16;;:7;:16;;;:51;;;;60587:7;60563:31;;:20;60575:7;60563:11;:20::i;:::-;:31;;;60543:51;:94;;;-1:-1:-1;57537:25:0;;;;57513:4;57537:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;60598:39;60535:103;60291:355;-1:-1:-1;;;;60291:355:0:o;63436:608::-;63561:4;63534:31;;:23;63549:7;63534:14;:23::i;:::-;:31;;;63526:85;;;;-1:-1:-1;;;63526:85:0;;12788:2:1;63526:85:0;;;12770:21:1;12827:2;12807:18;;;12800:30;12866:34;12846:18;;;12839:62;12937:11;12917:18;;;12910:39;12966:19;;63526:85:0;12760:231:1;63526:85:0;63657:16;;;63649:65;;;;-1:-1:-1;;;63649:65:0;;8426:2:1;63649:65:0;;;8408:21:1;8465:2;8445:18;;;8438:30;8504:34;8484:18;;;8477:62;8575:6;8555:18;;;8548:34;8599:19;;63649:65:0;8398:226:1;63649:65:0;63831:29;63848:1;63852:7;63831:8;:29::i;:::-;63873:19;;;;;;;:13;:19;;;;;:35;;63900:7;63873:26;:35::i;:::-;-1:-1:-1;63919:17:0;;;;;;;:13;:17;;;;;:30;;63941:7;63919:21;:30::i;:::-;-1:-1:-1;63962:29:0;:12;63979:7;63988:2;63962:16;:29::i;:::-;;64028:7;64024:2;64009:27;;64018:4;64009:27;;;;;;;;;;;;63436:608;;;:::o;38508:137::-;38579:7;38614:22;38618:3;38630:5;38614:3;:22::i;47231:236::-;47311:7;;;;47371:22;47375:3;47387:5;47371:3;:22::i;:::-;47340:53;;;;-1:-1:-1;47231:236:0;-1:-1:-1;;;;;47231:236:0:o;64645:100::-;64718:19;;;;:8;;:19;;;;;:::i;:::-;;64645:100;:::o;48517:213::-;48624:7;48675:44;48680:3;48700;48706:12;48675:4;:44::i;:::-;48667:53;-1:-1:-1;48517:213:0;;;;;;:::o;61912:404::-;61992:16;;;61984:61;;;;-1:-1:-1;;;61984:61:0;;11653:2:1;61984:61:0;;;11635:21:1;;;11672:18;;;11665:30;11731:34;11711:18;;;11704:62;11783:18;;61984:61:0;11625:182:1;61984:61:0;62065:16;62073:7;62065;:16::i;:::-;62064:17;62056:58;;;;-1:-1:-1;;;62056:58:0;;8069:2:1;62056:58:0;;;8051:21:1;8108:2;8088:18;;;8081:30;8147;8127:18;;;8120:58;8195:18;;62056:58:0;8041:178:1;62056:58:0;62185:17;;;;;;;:13;:17;;;;;:30;;62207:7;62185:21;:30::i;:::-;-1:-1:-1;62228:29:0;:12;62245:7;62254:2;62228:16;:29::i;:::-;-1:-1:-1;62275:33:0;;62300:7;;62275:33;;;;62292:1;;62275:33;;62292:1;;62275:33;61912:404;;:::o;59412:272::-;59526:28;59536:4;59542:2;59546:7;59526:9;:28::i;:::-;59573:48;59596:4;59602:2;59606:7;59615:5;59573:22;:48::i;:::-;59565:111;;;;-1:-1:-1;;;59565:111:0;;7243:2:1;59565:111:0;;;7225:21:1;7282:2;7262:18;;;7255:30;7321:34;7301:18;;;7294:62;7392:20;7372:18;;;7365:48;7430:19;;59565:111:0;7215:240:1;48950:755:0;49003:13;49224:7;49220:50;;-1:-1:-1;;49248:10:0;;;;;;;;;;;;;;;;;;48950:755::o;49220:50::-;49289:2;49280:6;49321:69;49328:6;;49321:69;;49351:5;;;;:::i;:::-;;-1:-1:-1;49371:7:0;;-1:-1:-1;49376:2:0;49371:7;;:::i;:::-;;;49321:69;;;49400:17;49430:3;49420:14;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;49420:14:0;-1:-1:-1;49400:34:0;-1:-1:-1;49454:3:0;49468:200;49475:7;;49468:200;;49503:5;49507:1;49503;:5;:::i;:::-;49499:9;-1:-1:-1;49523:10:0;49553:7;49558:2;49553;:7;:::i;:::-;:12;;49563:2;49553:12;:::i;:::-;49548:17;;:2;:17;:::i;:::-;49537:29;;:2;:29;:::i;:::-;49523:44;;49582:9;49601:4;49594:12;;49582:24;;49631:2;49621:4;49626:1;49621:7;;;;;;;;:::i;:::-;;;;:12;;;;;;;;;;-1:-1:-1;49648:8:0;49654:2;49648:8;;:::i;:::-;;;49484:184;;49468:200;;;-1:-1:-1;49692:4:0;48950:755;-1:-1:-1;;;;48950:755:0:o;46521:151::-;46605:4;43150:17;;;:12;;;:17;;;;;;:22;;46629:35;43055:125;37585:137;37655:4;37679:35;37687:3;37707:5;37679:7;:35::i;37278:131::-;37345:4;37369:32;37374:3;37394:5;37369:4;:32::i;45944:185::-;46033:4;46057:64;46062:3;46082;46096:23;;;46057:4;:64::i;33516:204::-;33611:18;;33583:7;;33611:26;-1:-1:-1;33603:73:0;;;;-1:-1:-1;;;33603:73:0;;6840:2:1;33603:73:0;;;6822:21:1;6879:2;6859:18;;;6852:30;6918:34;6898:18;;;6891:62;6989:4;6969:18;;;6962:32;7011:19;;33603:73:0;6812:224:1;33603:73:0;33694:3;:11;;33706:5;33694:18;;;;;;;;:::i;:::-;;;;;;;;;33687:25;;33516:204;;;;:::o;43750:279::-;43854:19;;43817:7;;;;43854:27;-1:-1:-1;43846:74:0;;;;-1:-1:-1;;;43846:74:0;;11250:2:1;43846:74:0;;;11232:21:1;11289:2;11269:18;;;11262:30;11328:34;11308:18;;;11301:62;11399:4;11379:18;;;11372:32;11421:19;;43846:74:0;11222:224:1;43846:74:0;43933:22;43958:3;:12;;43971:5;43958:19;;;;;;;;:::i;:::-;;;;;;;;;;;43933:44;;43996:5;:10;;;44008:5;:12;;;43988:33;;;;;43750:279;;;;;:::o;45283:337::-;45377:7;45416:17;;;:12;;;:17;;;;;;45467:12;45452:13;45444:36;;;;-1:-1:-1;;;45444:36:0;;;;;;;;:::i;:::-;-1:-1:-1;45543:3:0;45556:12;45567:1;45556:8;:12;:::i;:::-;45543:26;;;;;;;;:::i;:::-;;;;;;;;;;;:33;;;45536:40;;;45283:337;;;;;:::o;65310:624::-;65427:4;65454:13;;;22025:20;65449:60;;-1:-1:-1;65493:4:0;65486:11;;65449:60;65519:23;65545:276;65602:45;3428:10;65697:4;65720:7;65746:5;65561:205;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65545:276;;;;;;;;;;;;;;;;;:15;;;;:276;:15;:276::i;:::-;65519:302;;65832:13;65859:10;65848:32;;;;;;;;;;;;:::i;:::-;65899:26;;65909:16;65899:26;;-1:-1:-1;;;65310:624:0;;;;;;:::o;31196:1556::-;31262:4;31401:19;;;:12;;;:19;;;;;;31437:15;;31433:1312;;31798:21;31822:14;31835:1;31822:10;:14;:::i;:::-;31871:18;;31798:38;;-1:-1:-1;31851:17:0;;31871:22;;31892:1;;31871:22;:::i;:::-;31851:42;;32138:17;32158:3;:11;;32170:9;32158:22;;;;;;;;:::i;:::-;;;;;;;;;32138:42;;32304:9;32275:3;:11;;32287:13;32275:26;;;;;;;;:::i;:::-;;;;;;;;;;:38;32407:17;:13;32423:1;32407:17;:::i;:::-;32381:23;;;;:12;;;:23;;;;;:43;32546:17;;32381:3;;32546:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;32641:3;:12;;:19;32654:5;32641:19;;;;;;;;;;;32634:26;;;32684:4;32677:11;;;;;;;;31433:1312;32728:5;32721:12;;;;;30606:414;30669:4;43150:17;;;:12;;;:17;;;;;;30686:327;;-1:-1:-1;30729:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;30912:18;;30890:19;;;:12;;;:19;;;;;;:40;;;;30945:11;;30686:327;-1:-1:-1;30996:5:0;30989:12;;40544:691;40620:4;40755:17;;;:12;;;:17;;;;;;40789:13;40785:443;;-1:-1:-1;;40873:38:0;;;;;;;;;;;;;;;;;;40855:57;;;;;;;;:12;:57;;;;;;;;;;;;;;;;;;;;;;;;41070:19;;41050:17;;;:12;;;:17;;;;;;;:39;41104:11;;40785:443;41184:5;41148:3;41161:12;41172:1;41161:8;:12;:::i;:::-;41148:26;;;;;;;;:::i;:::-;;;;;;;;;;;:33;;:41;;;;41211:5;41204:12;;;;;24575:195;24678:12;24710:52;24732:6;24740:4;24746:1;24749:12;24678;22025:20;;25871:60;;;;-1:-1:-1;;;25871:60:0;;14434:2:1;25871:60:0;;;14416:21:1;14473:2;14453:18;;;14446:30;14512:31;14492:18;;;14485:59;14561:18;;25871:60:0;14406:179:1;25871:60:0;26005:12;26019:23;26046:6;:11;;26066:5;26073:4;26046:32;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26004:74;;;;26096:52;26114:7;26123:10;26135:12;26096:17;:52::i;:::-;26089:59;25627:529;-1:-1:-1;;;;;;;25627:529:0:o;28166:743::-;28282:12;28311:7;28307:595;;;-1:-1:-1;28342:10:0;28335:17;;28307:595;28456:17;;:21;28452:439;;28719:10;28713:17;28780:15;28767:10;28763:2;28759:19;28752:44;28452:439;28855:20;;-1:-1:-1;;;28855:20:0;;;;28862:12;;28855:20;;;:::i;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:690:1;78:5;108:18;149:2;141:6;138:14;135:2;;;155:18;;:::i;:::-;289:2;283:9;355:2;343:15;;194:66;339:24;;;365:2;335:33;331:42;319:55;;;389:18;;;409:22;;;386:46;383:2;;;435:18;;:::i;:::-;475:10;471:2;464:22;504:6;495:15;;534:6;526;519:22;574:3;565:6;560:3;556:16;553:25;550:2;;;591:1;588;581:12;550:2;641:6;636:3;629:4;621:6;617:17;604:44;696:1;689:4;680:6;672;668:19;664:30;657:41;;;;88:616;;;;;:::o;709:196::-;777:20;;837:42;826:54;;816:65;;806:2;;895:1;892;885:12;806:2;758:147;;;:::o;910:186::-;969:6;1022:2;1010:9;1001:7;997:23;993:32;990:2;;;1038:1;1035;1028:12;990:2;1061:29;1080:9;1061:29;:::i;1101:260::-;1169:6;1177;1230:2;1218:9;1209:7;1205:23;1201:32;1198:2;;;1246:1;1243;1236:12;1198:2;1269:29;1288:9;1269:29;:::i;:::-;1259:39;;1317:38;1351:2;1340:9;1336:18;1317:38;:::i;:::-;1307:48;;1188:173;;;;;:::o;1366:328::-;1443:6;1451;1459;1512:2;1500:9;1491:7;1487:23;1483:32;1480:2;;;1528:1;1525;1518:12;1480:2;1551:29;1570:9;1551:29;:::i;:::-;1541:39;;1599:38;1633:2;1622:9;1618:18;1599:38;:::i;:::-;1589:48;;1684:2;1673:9;1669:18;1656:32;1646:42;;1470:224;;;;;:::o;1699:666::-;1794:6;1802;1810;1818;1871:3;1859:9;1850:7;1846:23;1842:33;1839:2;;;1888:1;1885;1878:12;1839:2;1911:29;1930:9;1911:29;:::i;:::-;1901:39;;1959:38;1993:2;1982:9;1978:18;1959:38;:::i;:::-;1949:48;;2044:2;2033:9;2029:18;2016:32;2006:42;;2099:2;2088:9;2084:18;2071:32;2126:18;2118:6;2115:30;2112:2;;;2158:1;2155;2148:12;2112:2;2181:22;;2234:4;2226:13;;2222:27;-1:-1:-1;2212:2:1;;2263:1;2260;2253:12;2212:2;2286:73;2351:7;2346:2;2333:16;2328:2;2324;2320:11;2286:73;:::i;:::-;2276:83;;;1829:536;;;;;;;:::o;2370:347::-;2435:6;2443;2496:2;2484:9;2475:7;2471:23;2467:32;2464:2;;;2512:1;2509;2502:12;2464:2;2535:29;2554:9;2535:29;:::i;:::-;2525:39;;2614:2;2603:9;2599:18;2586:32;2661:5;2654:13;2647:21;2640:5;2637:32;2627:2;;2683:1;2680;2673:12;2627:2;2706:5;2696:15;;;2454:263;;;;;:::o;2722:254::-;2790:6;2798;2851:2;2839:9;2830:7;2826:23;2822:32;2819:2;;;2867:1;2864;2857:12;2819:2;2890:29;2909:9;2890:29;:::i;:::-;2880:39;2966:2;2951:18;;;;2938:32;;-1:-1:-1;;;2809:167:1:o;2981:245::-;3039:6;3092:2;3080:9;3071:7;3067:23;3063:32;3060:2;;;3108:1;3105;3098:12;3060:2;3147:9;3134:23;3166:30;3190:5;3166:30;:::i;3231:249::-;3300:6;3353:2;3341:9;3332:7;3328:23;3324:32;3321:2;;;3369:1;3366;3359:12;3321:2;3401:9;3395:16;3420:30;3444:5;3420:30;:::i;3485:450::-;3554:6;3607:2;3595:9;3586:7;3582:23;3578:32;3575:2;;;3623:1;3620;3613:12;3575:2;3663:9;3650:23;3696:18;3688:6;3685:30;3682:2;;;3728:1;3725;3718:12;3682:2;3751:22;;3804:4;3796:13;;3792:27;-1:-1:-1;3782:2:1;;3833:1;3830;3823:12;3782:2;3856:73;3921:7;3916:2;3903:16;3898:2;3894;3890:11;3856:73;:::i;3940:180::-;3999:6;4052:2;4040:9;4031:7;4027:23;4023:32;4020:2;;;4068:1;4065;4058:12;4020:2;-1:-1:-1;4091:23:1;;4010:110;-1:-1:-1;4010:110:1:o;4125:254::-;4193:6;4201;4254:2;4242:9;4233:7;4229:23;4225:32;4222:2;;;4270:1;4267;4260:12;4222:2;4306:9;4293:23;4283:33;;4335:38;4369:2;4358:9;4354:18;4335:38;:::i;4384:316::-;4425:3;4463:5;4457:12;4490:6;4485:3;4478:19;4506:63;4562:6;4555:4;4550:3;4546:14;4539:4;4532:5;4528:16;4506:63;:::i;:::-;4614:2;4602:15;4619:66;4598:88;4589:98;;;;4689:4;4585:109;;4433:267;-1:-1:-1;;4433:267:1:o;4705:274::-;4834:3;4872:6;4866:13;4888:53;4934:6;4929:3;4922:4;4914:6;4910:17;4888:53;:::i;:::-;4957:16;;;;;4842:137;-1:-1:-1;;4842:137:1:o;4984:470::-;5163:3;5201:6;5195:13;5217:53;5263:6;5258:3;5251:4;5243:6;5239:17;5217:53;:::i;:::-;5333:13;;5292:16;;;;5355:57;5333:13;5292:16;5389:4;5377:17;;5355:57;:::i;:::-;5428:20;;5171:283;-1:-1:-1;;;;5171:283:1:o;5690:527::-;5900:4;5929:42;6010:2;6002:6;5998:15;5987:9;5980:34;6062:2;6054:6;6050:15;6045:2;6034:9;6030:18;6023:43;;6102:6;6097:2;6086:9;6082:18;6075:34;6145:3;6140:2;6129:9;6125:18;6118:31;6166:45;6206:3;6195:9;6191:19;6183:6;6166:45;:::i;:::-;6158:53;5909:308;-1:-1:-1;;;;;;5909:308:1:o;6414:219::-;6563:2;6552:9;6545:21;6526:4;6583:44;6623:2;6612:9;6608:18;6600:6;6583:44;:::i;14772:128::-;14812:3;14843:1;14839:6;14836:1;14833:13;14830:2;;;14849:18;;:::i;:::-;-1:-1:-1;14885:9:1;;14820:80::o;14905:204::-;14943:3;14979:4;14976:1;14972:12;15011:4;15008:1;15004:12;15046:3;15040:4;15036:14;15031:3;15028:23;15025:2;;;15054:18;;:::i;:::-;15090:13;;14951:158;-1:-1:-1;;;14951:158:1:o;15114:274::-;15154:1;15180;15170:2;;15215:77;15212:1;15205:88;15316:4;15313:1;15306:15;15344:4;15341:1;15334:15;15170:2;-1:-1:-1;15373:9:1;;15160:228::o;15393:::-;15433:7;15559:1;15491:66;15487:74;15484:1;15481:81;15476:1;15469:9;15462:17;15458:105;15455:2;;;15566:18;;:::i;:::-;-1:-1:-1;15606:9:1;;15445:176::o;15626:125::-;15666:4;15694:1;15691;15688:8;15685:2;;;15699:18;;:::i;:::-;-1:-1:-1;15736:9:1;;15675:76::o;15756:258::-;15828:1;15838:113;15852:6;15849:1;15846:13;15838:113;;;15928:11;;;15922:18;15909:11;;;15902:39;15874:2;15867:10;15838:113;;;15969:6;15966:1;15963:13;15960:2;;;-1:-1:-1;;16004:1:1;15986:16;;15979:27;15809:205::o;16019:437::-;16098:1;16094:12;;;;16141;;;16162:2;;16216:4;16208:6;16204:17;16194:27;;16162:2;16269;16261:6;16258:14;16238:18;16235:38;16232:2;;;16306:77;16303:1;16296:88;16407:4;16404:1;16397:15;16435:4;16432:1;16425:15;16232:2;;16074:382;;;:::o;16461:195::-;16500:3;16531:66;16524:5;16521:77;16518:2;;;16601:18;;:::i;:::-;-1:-1:-1;16648:1:1;16637:13;;16508:148::o;16661:184::-;16713:77;16710:1;16703:88;16810:4;16807:1;16800:15;16834:4;16831:1;16824:15;16850:184;16902:77;16899:1;16892:88;16999:4;16996:1;16989:15;17023:4;17020:1;17013:15;17039:184;17091:77;17088:1;17081:88;17188:4;17185:1;17178:15;17212:4;17209:1;17202:15;17228:184;17280:77;17277:1;17270:88;17377:4;17374:1;17367:15;17401:4;17398:1;17391:15;17417:177;17502:66;17495:5;17491:78;17484:5;17481:89;17471:2;;17584:1;17581;17574:12
Swarm Source
ipfs://877b8aecd2f7c8e442523007dd553763067348124e3a412a578f3a59f2e4f7bc