Transaction Hash:
Block:
12696634 at Jun-24-2021 11:41:57 AM +UTC
Transaction Fee:
0.00281628 ETH
$8.43
Gas Used:
281,628 Gas / 10 Gwei
Emitted Events:
221 |
BeaconProxy.0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef( 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef, 0x0000000000000000000000000f4676178b5c53ae0a655f1b19a96387e4b8b5f2, 0x000000000000000000000000e14f1283059afa8d3c9c52eff76fe91854f5d1b3, 0000000000000000000000000000000000000000000001a1f5be76ab55b80000 )
|
222 |
BeaconProxy.0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925( 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925, 0x0000000000000000000000000f4676178b5c53ae0a655f1b19a96387e4b8b5f2, 0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d, fffffffffffffffffffffffffffffffffffffffffffffe5e0a418954aa47ffff )
|
223 |
WETH9.Transfer( src=UniswapV2Pair, dst=UniswapV2Pair, wad=161436584731762437 )
|
224 |
UniswapV2Pair.Sync( reserve0=685144460864053162112282, reserve1=14227208960408530832 )
|
225 |
UniswapV2Pair.Swap( sender=UniswapV2Router02, amount0In=7710000000000000000000, amount1In=0, amount0Out=0, amount1Out=161436584731762437, to=UniswapV2Pair )
|
226 |
MuseToken.Transfer( from=UniswapV2Pair, to=Proxy, value=24837899229244895950 )
|
227 |
UniswapV2Pair.Sync( reserve0=86519156047992824086608, reserve1=560814930929669350283 )
|
228 |
UniswapV2Pair.Swap( sender=UniswapV2Router02, amount0In=0, amount1In=161436584731762437, amount0Out=24837899229244895950, amount1Out=0, to=Proxy )
|
229 |
TheAlienBoy.Approval( owner=[Sender] 0x51047ac8977d0dd35f3e1f35d75ddf81b8989f3d, approved=0x00000000...000000000, tokenId=6717 )
|
230 |
TheAlienBoy.Transfer( from=[Sender] 0x51047ac8977d0dd35f3e1f35d75ddf81b8989f3d, to=[Receiver] 0xe89d4c65db4c859a83ba7f100154fa2d172b60b0, tokenId=6717 )
|
231 |
TheAlienBoy.Approval( owner=[Receiver] 0xe89d4c65db4c859a83ba7f100154fa2d172b60b0, approved=0x00000000...000000000, tokenId=7904 )
|
232 |
TheAlienBoy.Transfer( from=[Receiver] 0xe89d4c65db4c859a83ba7f100154fa2d172b60b0, to=[Sender] 0x51047ac8977d0dd35f3e1f35d75ddf81b8989f3d, tokenId=7904 )
|
Account State Difference:
Address | Before | After | State Difference | ||
---|---|---|---|---|---|
0x20d2C17d...a2770BF43 | |||||
0x4581649a...1FE4C5312 | |||||
0x51047Ac8...1b8989f3D |
0.281442664200221858 Eth
Nonce: 220
|
0.278626384200221858 Eth
Nonce: 221
| 0.00281628 | ||
0x60ACD58d...C0793B3b2 | |||||
0xB6Ca7399...4Eef1fc81 | |||||
0xC02aaA39...83C756Cc2 | |||||
0xC4aEb207...332b9BC77
Miner
| (Easy2Mine) | 513.718073746441460689 Eth | 513.720890026441460689 Eth | 0.00281628 | |
0xE14f1283...854F5D1B3 |
Execution Trace
0xe89d4c65db4c859a83ba7f100154fa2d172b60b0.d65ef8ed( )

-
UpgradeableBeacon.STATICCALL( )
NFT20Pair.swap721( _in=6717, _out=7904 )
AdminUpgradeabilityProxy.CALL( )
NFT20FactoryV6.DELEGATECALL( )
BeaconProxy.70a08231( )
-
UpgradeableBeacon.STATICCALL( )
-
NFT20Pair.balanceOf( account=0x0f4676178b5c53Ae0a655f1B19A96387E4b8B5f2 ) => ( 38555000000000000000000 )
-
0xe89d4c65db4c859a83ba7f100154fa2d172b60b0.STATICCALL( )
-
UpgradeableBeacon.STATICCALL( )
-
NFT20Pair.DELEGATECALL( )
-
UniswapV2Router02.swapExactTokensForTokens( amountIn=7710000000000000000000, amountOutMin=0, path=[0x60ACD58d00b2BcC9a8924fdaa54A2F7C0793B3b2, 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 0xB6Ca7399B4F9CA56FC27cBfF44F4d2e4Eef1fc81], to=0x6fBa46974b2b1bEfefA034e236A32e1f10C5A148, deadline=1624536717 ) => ( amounts=[7710000000000000000000, 161436584731762437, 24837899229244895950] )
-
UniswapV2Pair.STATICCALL( )
-
UniswapV2Pair.STATICCALL( )
BeaconProxy.23b872dd( )
-
UpgradeableBeacon.STATICCALL( )
-
NFT20Pair.transferFrom( sender=0x0f4676178b5c53Ae0a655f1B19A96387E4b8B5f2, recipient=0xE14f1283059afA8d3c9c52EFF76FE91854F5D1B3, amount=7710000000000000000000 ) => ( True )
-
UniswapV2Pair.swap( amount0Out=0, amount1Out=161436584731762437, to=0x20d2C17d1928EF4290BF17F922a10eAa2770BF43, data=0x )
-
WETH9.transfer( dst=0x20d2C17d1928EF4290BF17F922a10eAa2770BF43, wad=161436584731762437 ) => ( True )
-
BeaconProxy.70a08231( )
-
WETH9.balanceOf( 0xE14f1283059afA8d3c9c52EFF76FE91854F5D1B3 ) => ( 14227208960408530832 )
-
UniswapV2Pair.swap( amount0Out=24837899229244895950, amount1Out=0, to=0x6fBa46974b2b1bEfefA034e236A32e1f10C5A148, data=0x )
-
MuseToken.transfer( recipient=0x6fBa46974b2b1bEfefA034e236A32e1f10C5A148, amount=24837899229244895950 ) => ( True )
-
MuseToken.balanceOf( account=0x20d2C17d1928EF4290BF17F922a10eAa2770BF43 ) => ( 86519156047992824086608 )
-
WETH9.balanceOf( 0x20d2C17d1928EF4290BF17F922a10eAa2770BF43 ) => ( 560814930929669350283 )
-
-
-
TheAlienBoy.transferFrom( from=0x51047Ac8977d0DD35F3E1F35d75DDf81b8989f3D, to=0xe89D4C65dB4c859a83ba7F100154fA2d172B60B0, tokenId=6717 )
-
TheAlienBoy.safeTransferFrom( from=0xe89D4C65dB4c859a83ba7F100154fA2d172B60B0, to=0x51047Ac8977d0DD35F3E1F35d75DDf81b8989f3D, tokenId=7904 )
File 1 of 12: BeaconProxy
File 2 of 12: UniswapV2Pair
File 3 of 12: UniswapV2Pair
File 4 of 12: WETH9
File 5 of 12: Proxy
File 6 of 12: MuseToken
File 7 of 12: TheAlienBoy
File 8 of 12: UpgradeableBeacon
File 9 of 12: NFT20Pair
File 10 of 12: AdminUpgradeabilityProxy
File 11 of 12: NFT20FactoryV6
File 12 of 12: UniswapV2Router02
12345678910111213141516pragma solidity ^0.6.6;/*** @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to* be specified by overriding the virtual {_implementation} function.** Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a* different contract through the {_delegate} function.** The success and return data of the delegated call will be returned back to the caller of the proxy.*/abstract contract Proxy {/*** @dev Delegates the current call to `implementation`.*
File 2 of 12: UniswapV2Pair
12345678910111213141516// File: contracts/interfaces/IUniswapV2Pair.solpragma solidity >=0.5.0;interface IUniswapV2Pair {event Approval(address indexed owner, address indexed spender, uint value);event Transfer(address indexed from, address indexed to, uint value);function name() external pure returns (string memory);function symbol() external pure returns (string memory);function decimals() external pure returns (uint8);function totalSupply() external view returns (uint);function balanceOf(address owner) external view returns (uint);function allowance(address owner, address spender) external view returns (uint);function approve(address spender, uint value) external returns (bool);
File 3 of 12: UniswapV2Pair
12345678910111213141516// File: contracts/interfaces/IUniswapV2Pair.solpragma solidity >=0.5.0;interface IUniswapV2Pair {event Approval(address indexed owner, address indexed spender, uint value);event Transfer(address indexed from, address indexed to, uint value);function name() external pure returns (string memory);function symbol() external pure returns (string memory);function decimals() external pure returns (uint8);function totalSupply() external view returns (uint);function balanceOf(address owner) external view returns (uint);function allowance(address owner, address spender) external view returns (uint);function approve(address spender, uint value) external returns (bool);
File 4 of 12: WETH9
12345678910111213141516// Copyright (C) 2015, 2016, 2017 Dapphub// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.pragma solidity ^0.4.18;
File 5 of 12: Proxy
12345678910111213141516pragma solidity ^0.5.3;/// @title Proxy - Generic proxy contract allows to execute all transactions applying the code of a master contract./// @author Stefan George - <stefan@gnosis.io>/// @author Richard Meissner - <richard@gnosis.io>contract Proxy {// masterCopy always needs to be first declared variable, to ensure that it is at the same location in the contracts to which calls are delegated.// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`address internal masterCopy;/// @dev Constructor function sets address of master copy contract./// @param _masterCopy Master copy address.constructor(address _masterCopy)public{
File 6 of 12: MuseToken
123456789101112131415pragma solidity ^0.6.0;import "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";import "@openzeppelin/contracts/math/SafeMath.sol";// import "@openzeppelin/contracts/utils/Address.sol";import "@openzeppelin/contracts/utils/EnumerableSet.sol";// import "@openzeppelin/contracts/GSN/Context.sol";import "@openzeppelin/contracts/access/Ownable.sol";// ******************// this is for staking lp tokens and getting back $pet tokens// We can use this "MasterChef.sol" conract introduced by SuhiSwap, they do exactly what we need and the code is already used by many smartcontracts and battle tested with $100s of millions staked in sushiswap// *******************// @TODO maybe lets add the roles library to this also to have more then one wallet being able to run this/*** @dev Contract module that allows children to implement role-based access
File 7 of 12: TheAlienBoy
1{"Address.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the addresstype\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It isunsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n* Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n* - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but wasdestroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies onextcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructorexecution.\n\n uint256 size;\n // solhint-disable-next-line no-inline-assembly\n assembly { size := extcodesize(account) }\nreturn size \u003e 0;\n }\n\n /**\n * @dev Replacement for Solidity\u0027s `transfer`: sends `amount` wei to\n * `recipient`,forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n* of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive fundsvia\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not createreentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(addresspayable recipient, uint256 amount) internal {\n require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n// solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n (bool success, ) = recipient.call{ value: amount }(\"\");\nrequire(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function callusing a low level `call`. A\n * plain`call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If`target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returnsthe raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be acontract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallbackrevert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data,string memory errorMessage) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n/**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n*\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity functionmust be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with`errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n functionfunctionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\nrequire(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call tonon-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.call{value: value }(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n functionfunctionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data,\"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(addresstarget, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n require(isContract(target), \"Address:static call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) =target.staticcall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\nfunction functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target,data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n require(isContract(target), \"Address:delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) =target.delegatecall(data);\n return _verifyCallResult(success, returndata, errorMessage);\n }\n\n function _verifyCallResult(boolsuccess, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n if (success) {\n returnreturndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length \u003e 0) {\n// The easiest way to bubble the revert reason is using memory via assembly\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"},"Context.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/*\n * @dev Provides information about the currentexecution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data,they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for executionmay not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-likecontracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n}\n\n function _msgData() internal view virtual returns (bytes calldata) {\n this; // silence state mutability warning without generatingbytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n"},"EnumerableMap.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./EnumerableSet.sol\";\n\n/**\n * @dev Library for managing an enumerable variantof Solidity\u0027s\n * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]\n * type.\n *\n * Maps have the followingproperties:\n *\n * - Entries are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Entries are enumerated in O(n). Noguarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableMap forEnumerableMap.UintToAddressMap;\n *\n * // Declare a set state variable\n * EnumerableMap.UintToAddressMap private myMap;\n * }\n * ```\n*\n * As of v3.0.0, only maps of type `uint256 -\u003e address` (`UintToAddressMap`) are\n * supported.\n */\nlibrary EnumerableMap {\n usingEnumerableSet for EnumerableSet.Bytes32Set;\n\n // To implement this library for multiple types with as little code\n // repetition aspossible, we write it in terms of a generic Map type with\n // bytes32 keys and values.\n // The Map implementation uses private functions,and user-facing\n // implementations (such as Uint256ToAddressMap) are just wrappers around\n // the underlying Map.\n // This means thatwe can only create new EnumerableMaps for types that fit\n // in bytes32.\n\n struct Map {\n // Storage of keys\n EnumerableSet.Bytes32Set _keys;\n\n mapping (bytes32 =\u003e bytes32) _values;\n }\n\n /**\n * @dev Adds a key-value pair to a map, or updatesthe value for an existing\n * key. O(1).\n *\n * Returns true if the key was added to the map, that is if it was not\n * alreadypresent.\n */\n function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {\n map._values[key] = value;\nreturn map._keys.add(key);\n }\n\n /**\n * @dev Removes a key-value pair from a map. O(1).\n *\n * Returns true if the keywas removed from the map, that is if it was present.\n */\n function _remove(Map storage map, bytes32 key) private returns (bool) {\ndelete map._values[key];\n return map._keys.remove(key);\n }\n\n /**\n * @dev Returns true if the key is in the map. O(1).\n*/\n function _contains(Map storage map, bytes32 key) private view returns (bool) {\n return map._keys.contains(key);\n }\n\n /**\n* @dev Returns the number of key-value pairs in the map. O(1).\n */\n function _length(Map storage map) private view returns (uint256){\n return map._keys.length();\n }\n\n /**\n * @dev Returns the key-value pair stored at position `index` in the map. O(1).\n *\n* Note that there are no guarantees on the ordering of entries inside the\n * array, and it may change when more entries are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {\n bytes32 key = map._keys.at(index);\n return (key, map._values[key]);\n }\n\n/**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n */\nfunction _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {\n bytes32 value = map._values[key];\n if (value== bytes32(0)) {\n return (_contains(map, key), bytes32(0));\n } else {\n return (true, value);\n }\n }\n\n/**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n*/\n function _get(Map storage map, bytes32 key) private view returns (bytes32) {\n bytes32 value = map._values[key];\n require(value != 0 || _contains(map, key), \"EnumerableMap: nonexistent key\");\n return value;\n }\n\n /**\n * @dev Same as {_get}, witha custom error message when `key` is not in the map.\n *\n * CAUTION: This function is deprecated because it requires allocating memory forthe error\n * message unnecessarily. For custom revert reasons use {_tryGet}.\n */\n function _get(Map storage map, bytes32 key, stringmemory errorMessage) private view returns (bytes32) {\n bytes32 value = map._values[key];\n require(value != 0 || _contains(map, key), errorMessage);\n return value;\n }\n\n // UintToAddressMap\n\n struct UintToAddressMap {\n Map _inner;\n }\n\n/**\n * @dev Adds a key-value pair to a map, or updates the value for an existing\n * key. O(1).\n *\n * Returns true if the keywas added to the map, that is if it was not\n * already present.\n */\n function set(UintToAddressMap storage map, uint256 key, addressvalue) internal returns (bool) {\n return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));\n }\n\n /**\n * @devRemoves a value from a set. O(1).\n *\n * Returns true if the key was removed from the map, that is if it was present.\n */\nfunction remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {\n return _remove(map._inner, bytes32(key));\n }\n\n/**\n * @dev Returns true if the key is in the map. O(1).\n */\n function contains(UintToAddressMap storage map, uint256 key)internal view returns (bool) {\n return _contains(map._inner, bytes32(key));\n }\n\n /**\n * @dev Returns the number of elementsin the map. O(1).\n */\n function length(UintToAddressMap storage map) internal view returns (uint256) {\n return _length(map._inner);\n }\n\n /**\n * @dev Returns the element stored at position `index` in the set. O(1).\n * Note that there are no guarantees on theordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * -`index` must be strictly less than {length}.\n */\n function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256,address) {\n (bytes32 key, bytes32 value) = _at(map._inner, index);\n return (uint256(key), address(uint160(uint256(value))));\n}\n\n /**\n * @dev Tries to returns the value associated with `key`. O(1).\n * Does not revert if `key` is not in the map.\n *\n* _Available since v3.4._\n */\n function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {\n(bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));\n return (success, address(uint160(uint256(value))));\n }\n\n/**\n * @dev Returns the value associated with `key`. O(1).\n *\n * Requirements:\n *\n * - `key` must be in the map.\n*/\n function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {\n return address(uint160(uint256(_get(map._inner, bytes32(key)))));\n }\n\n /**\n * @dev Same as {get}, with a custom error message when `key` is not in the map.\n *\n *CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasonsuse {tryGet}.\n */\n function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {\nreturn address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));\n }\n}\n"},"EnumerableSet.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence inconstant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *// Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n *EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and`uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n //repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses privatefunctions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This meansthat we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\nbytes32[] _values;\n\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\nmapping (bytes32 =\u003e uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if thevalue was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) privatereturns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, butwe add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n returntrue;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n *Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32value) private returns (bool) {\n // We read and store the value\u0027s index to prevent multiple reads from the same storage slot\nuint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) { // Equivalent to contains(set, value)\n // To delete anelement from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the lastelement (sometimes called as \u0027swap and pop\u0027).\n // This modifies the order of the array, as noted in {at}.\n\nuint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n // When the value to delete is thelast one, the swap operation is unnecessary. However, since this occurs\n // so rarely, we still do the swap anyway to avoid the gascost of adding an \u0027if\u0027 statement.\n\n bytes32 lastvalue = set._values[lastIndex];\n\n // Move the last value to theindex where the value to delete is\n set._values[toDeleteIndex] = lastvalue;\n // Update the index for the moved value\nset._indexes[lastvalue] = valueIndex; // Replace lastvalue\u0027s index to valueIndex\n\n // Delete the slot where the movedvalue was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value isin the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` inthe set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when morevalues are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Setstorage set, uint256 index) private view returns (bytes32) {\n require(set._values.length \u003e index, \"EnumerableSet: index out ofbounds\");\n return set._values[index];\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n* @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n*/\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n/**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n *present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values inthe set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n}\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on theordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * -`index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\nreturn _at(set._inner, index);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Adda value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\nfunction add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that isif it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\nfunction contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storageset) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position`index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change whenmore values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n}\n\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n *Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set,uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from aset. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @devReturns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\nreturn _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\nfunction length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returnsthe value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n *array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than{length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner,index));\n }\n}\n"},"ERC1155.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155.sol\";\nimport\"./IERC1155Receiver.sol\";\nimport \"./IERC1155MetadataURI.sol\";\nimport \"./Address.sol\";\nimport \"./Context.sol\";\nimport \"./ERC165.sol\";\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code byEnjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI{\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping (uint256 =\u003e mapping(address =\u003e uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping (address =\u003e mapping(address =\u003e bool)) private_operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\nstring private _uri;\n\n /**\n * @dev See {_setURI}.\n */\n constructor (string memory uri_) {\n _setURI(uri_);\n }\n\n/**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165,IERC165) returns (bool) {\n return interfaceId == type(IERC1155).interfaceId\n || interfaceId == type(IERC1155MetadataURI).interfaceId\n || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n *This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring withthe\n * actual token type ID.\n */\n function uri(uint256) public view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n*/\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: balance query for the zero address\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n functionbalanceOfBatch(\n address[] memory accounts,\n uint256[] memory ids\n )\n public\n view\n virtual\noverride\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i \u003c accounts.length; ++i) {\nbatchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See{IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(_msgSender() != operator, \"ERC1155: setting approval status for self\");\n\n _operatorApprovals[_msgSender()][operator] = approved;\nemit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n functionisApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return_operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\naddress from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n public\nvirtual\n override\n {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n require(\n from== _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not owner nor approved\"\n );\n\n addressoperator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\nuint256 fromBalance = _balances[id][from];\n require(fromBalance \u003e= amount, \"ERC1155: insufficient balance for transfer\");\n_balances[id][from] = fromBalance - amount;\n _balances[id][to] += amount;\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\nuint256[] memory amounts,\n bytes memory data\n )\n public\n virtual\n override\n {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zeroaddress\");\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: transfer caller isnot owner nor approved\"\n );\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts,data);\n\n for (uint256 i = 0; i \u003c ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\nuint256 fromBalance = _balances[id][from];\n require(fromBalance \u003e= amount, \"ERC1155: insufficient balance fortransfer\");\n _balances[id][from] = fromBalance - amount;\n _balances[id][to] += amount;\n }\n\n emitTransferBatch(operator, from, to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n/**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in eitherthe\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * Forexample, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n* Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, andassigns them to `account`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `account` cannot be thezero address.\n * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n *acceptance magic value.\n */\n function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual {\nrequire(account != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][account] += amount;\n emitTransferSingle(operator, address(0), account, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount,data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n *\n * Requirements:\n *\n* - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _mintBatch(address to, uint256[] memory ids,uint256[] memory amounts, bytes memory data) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\nrequire(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint i = 0; i \u003c ids.length; i++) {\n_balances[ids[i]][to] += amounts[i];\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n_doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of tokentype `id` from `account`\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have atleast `amount` tokens of token type `id`.\n */\n function _burn(address account, uint256 id, uint256 amount) internal virtual {\nrequire(account != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n\n_beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n uint256 accountBalance =_balances[id][account];\n require(accountBalance \u003e= amount, \"ERC1155: burn amount exceeds balance\");\n _balances[id][account]= accountBalance - amount;\n\n emit TransferSingle(operator, account, address(0), id, amount);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the samelength.\n */\n function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual {\n require(account != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts lengthmismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, account, address(0), ids, amounts, \"\");\n\nfor (uint i = 0; i \u003c ids.length; i++) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\nuint256 accountBalance = _balances[id][account];\n require(accountBalance \u003e= amount, \"ERC1155: burn amount exceeds balance\");\n_balances[id][account] = accountBalance - amount;\n }\n\n emit TransferBatch(operator, account, address(0), ids, amounts);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batchedvariants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and`amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are bothnon-zero, `amount` of ``from``\u0027s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount`tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``\u0027s tokens of token type `id`\n* will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * Tolearn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\naddress operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytesmemory data\n )\n internal\n virtual\n { }\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\naddress from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n )\n private\n {\nif (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\nif (response != IERC1155Receiver(to).onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejectedtokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\nrevert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function_doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\nuint256[] memory amounts,\n bytes memory data\n )\n private\n {\n if (to.isContract()) {\n tryIERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) {\n if (response !=IERC1155Receiver(to).onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n}\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155:transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private purereturns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n}\n}\n"},"ERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @devImplementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override{supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * functionsupportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId ||super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensiveimplementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n functionsupportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n}\n}\n"},"ERC721.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./IERC721Metadata.sol\";\nimport \"./Address.sol\";\nimport \"./Context.sol\";\nimport \"./Strings.sol\";\nimport \"./ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard,including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n*/\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Tokenname\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 =\u003e address) private _owners;\n\n // Mapping owner address to token count\n mapping (address =\u003e uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping (uint256 =\u003e address) private _tokenApprovals;\n\n // Mapping from ownerto operator approvals\n mapping (address =\u003e mapping (address =\u003e bool)) private _operatorApprovals;\n\n /**\n * @dev Initializesthe contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor (string memory name_, string memory symbol_) {\n_name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n functionsupportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return interfaceId == type(IERC721).interfaceId\n || interfaceId == type(IERC721Metadata).interfaceId\n || super.supportsInterface(interfaceId);\n }\n\n/**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\nrequire(owner != address(0), \"ERC721: balance query for the zero address\");\n return _balances[owner];\n }\n\n /**\n * @dev See{IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner =_owners[tokenId];\n require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n return owner;\n }\n\n /**\n* @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory){\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) publicview virtual override returns (string memory) {\n require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\nstring memory baseURI = _baseURI();\n return bytes(baseURI).length \u003e 0\n ? string(abi.encodePacked(baseURI, tokenId.toString()))\n : \u0027\u0027;\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden\n* in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n/**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n addressowner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(_msgSender() == owner ||isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtualoverride returns (address) {\n require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n return_tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n require(operator != _msgSender(), \"ERC721: approve to caller\");\n\n_operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n *@dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns(bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n functiontransferFrom(address from, address to, uint256 tokenId) public virtual override {\n //solhint-disable-next-line max-line-length\nrequire(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n*/\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n _safeTransfer(from, to, tokenId, _data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are awareof the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `_data` is additional data, it has no specified format and itis sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implementalternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be thezero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to asmart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer}event.\n */\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n}\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via{approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they areburned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _owners[tokenId] !=address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n *- `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\nrequire(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return(spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId`and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract,it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\nfunction _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as{xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {\n_mint(to, tokenId);\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \"ERC721: transfer to non ERC721Receiverimplementer\");\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method isdiscouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot bethe zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\nrequire(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n_beforeTokenTransfer(address(0), to, tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0),to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n *Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId)internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n //Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emitTransfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId`token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\");\n require(to !=address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from theprevious owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits a{Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\nemit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received}on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing theprevious owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the tokento be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned theexpected magic value\n */\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\n privatereturns (bool)\n {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data)returns (bytes4 retval) {\n return retval == IERC721Receiver(to).onERC721Received.selector;\n } catch (bytes memoryreason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n} else {\n // solhint-disable-next-line no-inline-assembly\n assembly {\nrevert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n}\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n *Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``\u0027s `tokenId` will be\n * transferred to `to`.\n* - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``\u0027s `tokenId` will be burned.\n * - `from`cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual {}\n}\n"},"ERC721Enumerable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ERC721.sol\";\nimport \"./IERC721Enumerable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of allthe token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721Enumerable is ERC721,IERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address =\u003e mapping(uint256 =\u003e uint256)) private_ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 =\u003e uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in theallTokens array\n mapping(uint256 =\u003e uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\nfunction supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\n return interfaceId ==type(IERC721Enumerable).interfaceId\n || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\nrequire(index \u003c ERC721.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns(uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n functiontokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index \u003c ERC721Enumerable.totalSupply(),\"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Hook that is called before anytoken transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``\u0027s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * -When `to` is zero, ``from``\u0027s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function_beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n_removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @devPrivate function to add a token to this extension\u0027s ownership-tracking data structures.\n * @param to address representing the new ownerof the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function_addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721.balanceOf(to);\n_ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token tothis extension\u0027s token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\nfunction _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension\u0027s ownership-tracking data structures. Notethat\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gasoptimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order ofthe _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of thetoken to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from\u0027s tokens array, we store the last token in the index of the token to delete, and\n //then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n uint256 tokenIndex =_ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex !=lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] =lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update themoved token\u0027s index\n }\n\n // This also deletes the contents at the last position of the array\n delete_ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a tokenfrom this extension\u0027s token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n* @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n //then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex =_allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occursso\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an\u0027if\u0027 statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex;// Update the moved token\u0027s index\n\n // This also deletes the contents at the last position of the array\n delete_allTokensIndex[tokenId];\n _allTokens.pop();\n }\n}\n"},"IERC1155.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens oftoken type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexedfrom, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`,`from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(address indexed operator, address indexed from, addressindexed to, uint256[] ids, uint256[] values);\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfertheir tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an{URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` willequal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @devReturns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zeroaddress.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the samelength.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);\n\n/**\n * @dev Grants or revokes permission to `operator` to transfer the caller\u0027s tokens, according to `approved`,\n *\n * Emitsan {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n functionsetApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer``account``\u0027s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator)external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a{TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, itmust be have been approved to spend ``from``\u0027s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` ofat least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n *acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch}event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract,it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n functionsafeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;\n}\n"},"IERC1155MetadataURI.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155.sol\";\n\n/**\n * @devInterface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for tokentype `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n"},"IERC1155Receiver.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiveris IERC165 {\n\n /**\n @dev Handles the receipt of a single ERC1155 token type. This function is\n called at the end of a`safeTransferFrom` after the balance has been updated.\n To accept the transfer, this must return\n `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n (i.e. 0xf23a6e61, or its own function selector).\n @param operatorThe address which initiated the transfer (i.e. msg.sender)\n @param from The address which previously owned the token\n @param id TheID of the token being transferred\n @param value The amount of tokens being transferred\n @param data Additional data with nospecified format\n @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n*/\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytescalldata data\n )\n external\n returns(bytes4);\n\n /**\n @dev Handles the receipt of a multiple ERC1155 token types.This function\n is called at the end of a `safeBatchTransferFrom` after the balances have\n been updated. To accept the transfer(s),this must return\n `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n (i.e. 0xbc197c81, orits own function selector).\n @param operator The address which initiated the batch transfer (i.e. msg.sender)\n @param from Theaddress which previously owned the token\n @param ids An array containing ids of each token being transferred (order and length must matchvalues array)\n @param values An array containing amounts of each token being transferred (order and length must match ids array)\n@param data Additional data with no specified format\n @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\nuint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n )\n external\n returns(bytes4);\n}\n"},"IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, asdefined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can thenbe\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returnstrue if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must useless than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},"IERC721.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliantcontract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\nevent Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved`to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(addressindexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``\u0027s account.\n*/\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns(address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * areaware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zeroaddress.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not`from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract,it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\nfunction safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to`to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n*\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a{Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permissionto `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only asingle account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * -The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\nfunction approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n *Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or{safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n*\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n *@dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n functionisApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from`from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token byeither {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, whichis called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to,uint256 tokenId, bytes calldata data) external;\n}\n"},"IERC721Enumerable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n\n /**\n * @dev Returns the total amount of tokens stored by thecontract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at agiven `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``\u0027s tokens.\n */\n functiontokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n /**\n * @dev Returns a token ID at a given`index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n"},"IERC721Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n\n /**\n * @dev Returns the token collection name.\n */\nfunction name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol()external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\nfunction tokenURI(uint256 tokenId) external view returns (string memory);\n}\n"},"IERC721Receiver.sol":{"content":"// SPDX-License-Identifier:MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to supportsafeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token istransferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It mustreturn its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by therecipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n*/\n function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);\n}\n"},"Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./Context.sol\";\n/**\n * @dev Contract module whichprovides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n *This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restricttheir use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(addressindexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n*/\n constructor () {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0),msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns(address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifieronlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leavesthe contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n*\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available tothe owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n_owner = address(0);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be calledby the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n"},"SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only beused with Solidity 0.8 or later,\n// because it relies on the compiler\u0027s built in overflow checks.\n\n/**\n * @dev Wrappers overSolidity\u0027s arithmetic operations.\n *\n * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler\n * now has built inoverflow checking.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n* _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\nuint256 c = a + b;\n if (c \u003c a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @devReturns the substraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b \u003e a) return (false, 0);\nreturn (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n*\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked{\n // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero, but the\n // benefit is lost if\u0027b\u0027 is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return(true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n/**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\nfunction tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\nreturn (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a divisionby zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\nunchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returnsthe addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `+` operator.\n *\n *Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\nreturn a + b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result isnegative).\n *\n * Counterpart to Solidity\u0027s `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returnsthe multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity\u0027s `*` operator.\n *\n* Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns(uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n *division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity\u0027s `/` operator.\n *\n * Requirements:\n*\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a /b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting whendividing by zero.\n *\n * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (which leaves remaininggas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n *- The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n/**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result isnegative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily.For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity\u0027s `-` operator.\n *\n * Requirements:\n *\n *- Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\nunchecked {\n require(b \u003c= a, errorMessage);\n return a - b;\n }\n }\n\n /**\n * @dev Returns theinteger division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n* Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) whileSolidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Counterpart to Solidity\u0027s `/` operator. Note:this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert(consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a,uint256 b, string memory errorMessage) internal pure returns (uint256) {\n unchecked {\n require(b \u003e 0, errorMessage);\nreturn a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocatingmemory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity\u0027s `%`operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode torevert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n unchecked {\n require(b \u003e 0,errorMessage);\n return a % b;\n }\n }\n}\n"},"Strings.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant alphabet = \"0123456789abcdef\";\n\n /**\n *@dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns(string memory) {\n // Inspired by OraclizeAPI\u0027s implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\nuint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\nbytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 +uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` toits ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\nif (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0){\n length++;\n temp \u003e\u003e= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @devConverts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\nbuffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i \u003e 1; --i) {\n buffer[i] = alphabet[value \u0026 0xf];\nvalue \u003e\u003e= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n}\n\n}\n"},"TheAlienBoy.sol":{"content":"//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721\n// SPDX-License-Identifier:MIT\npragma solidity ^0.8.0;\n\nimport \"./ERC721.sol\";\nimport \"./Ownable.sol\";\nimport \"./SafeMath.sol\";\nimport \"./EnumerableMap.sol\";\nimport \"./ERC721Enumerable.sol\";\nimport \"./ERC1155.sol\";\n\t\t \n// ,(((((((((((((((((((((((((, \n// #####((((((((((((((((((((((((((((((.\n// ,#######((((((((((((((((((((((((((((((((((/ \n// .##########((((((((((((((((((((((((((((((((((((( \n// ..#########(##((((((((((((((///***,,,,,....,,,##%%(%#% \n//....############(((##%(*,,.....,,,/(////#/#(#,*,*%#(/*/*(% \n// ....###########(/%(,,,(/#/##%%*\u0026#**,/,(((#\u0026/%(\u0026#%##((%(*///# \n// .....#######(/*,(**#(*##\u0026#\u0026@%%%\u0026/%*/*%(*%,(,,./(/.#*#,%#(%%.,## \n// \u0026%.....###\u0026%%#**(*/*(((,/%*/%((\u0026%\u0026(#((((((((((((((((((((((((((((, \n// #(##,,#(**(\u0026*#/%%#%((((((((((((((((((((((((((((((((((((((((((((/\n// ..##/###\u0026##########(((((((((((((((((((((((((((((((((((((((((((((/ \n// /(/,,/\u0026,#############((((((((((((((((((((((((((((((((((((((((((((* \n//....,,,###@\u0026\u0026\u0026\u0026@\u0026@@@\u0026\u0026\u0026%%#\u0026@@@@@@@@@@@@@@@@@%(((((((((#\u0026@@@@@@@\u0026 \n//....,,,##@###########(#\u0026@@@@@@@(\u0026@@@@@@@\u0026%##(#@@@@@\u0026(((((@@\u0026%#(@\u0026\u0026 \n// .....,,,#############(#(((((%@((@@@@@@@@\u0026%##%\u0026%@@\u0026@(((%@@@@\u0026%//,\u0026 \n// .....,,,,################((((@((#@@@@@@@\u0026%#%\u0026\u0026@\u0026(#@(#@@@@@@(// \u0026, \n// .....,,,,#################((#@(((#@@@@\u0026%##%\u0026@@(((#@@@@@@(((/ @ \n//.....,,,,,###################@(((((##%%#((@%((((((@(((((( @\u0026 \n// ....,,,,,,##################%@@@\u0026\u0026\u0026@@@\u0026(((((((((((#\u0026\u0026\u0026\u0026% \n// .......,,,,,####################################/ \n//......,,,,,,,,%%##########%%%%%%%%%%%%%%/. \n// .........,,,,,,,%@@@@@@@@@@*///*@@@@,\n// .........,@@@@*@@@@@#@#(..@\u0026\u0026/@( \n//.....@@@@@@@@@@@@@@\u0026\u0026\u0026%\u0026%\u0026@\u0026@@ \n//....@@@@@@@@@@@@@@@@@@\u0026\u0026@@@@@@@ \n//....@\u0026@\u0026\u0026@\u0026@@@\u0026\u0026@\u0026\u0026\u0026\u0026\u0026\u0026@@\u0026/@@@@@@ \n//....\u0026\u0026\u0026\u0026\u0026\u0026\u0026\u0026\u0026@@@\u0026\u0026\u0026#\u0026\u0026\u0026\u0026\u0026\u0026\u0026%\u0026\u0026\u0026\u0026@@@ \n//....\u0026\u0026\u0026\u0026\u0026%\u0026\u0026\u0026\u0026@\u0026\u0026%%\u0026%%%%%\u0026\u0026%\u0026\u0026\u0026\u0026\u0026@@\u0026\u0026\n// ....%%%%%%%%\u0026\u0026\u0026\u0026\u0026\u0026%%%%%%%%%%\u0026%%\u0026\u0026\u0026\u0026@\u0026\u0026*\n//\n//\n// F#ck you nerd. You found me!\n// Join #IFoundTheAlienBoyContract at https://discord.gg/4TCeBSDbSh\n\n\ncontract TheAlienBoy isERC721Enumerable, Ownable {\n\n using SafeMath for uint256;\n\n // Token detail\n struct AlienDetail {\n uint256 first_encounter;\n }\n\n // Events\n event TokenMinted(uint256 tokenId, address owner, uint256 first_encounter);\n\n // Token Detail\n mapping(uint256 =\u003e AlienDetail) private _alienDetails;\n\n // Provenance number\n string public PROVENANCE = \"\";\n\n // Starting index\nuint256 public STARTING_INDEX;\n\n // Max amount of token to purchase per account each time\n uint public MAX_PURCHASE = 50;\n\n //Maximum amount of tokens to supply.\n uint256 public MAX_TOKENS = 10000;\n\n // Current price.\n uint256 public CURRENT_PRICE =80000000000000000;\n\n // Define if sale is active\n bool public saleIsActive = true;\n\n // Base URI\n string private baseURI;\n\n/**\n * Contract constructor\n */\n constructor(string memory name, string memory symbol, string memory baseURIp, uint256 startingIndex)ERC721(name, symbol) {\n setBaseURI(baseURIp);\n STARTING_INDEX = startingIndex;\n }\n\n /**\n * Withdraw\n */\nfunction withdraw() public onlyOwner {\n uint balance = address(this).balance;\n payable(msg.sender).transfer(balance);\n }\n\n/**\n * Reserve tokens\n */\n function reserveTokens() public onlyOwner {\n uint i;\n uint tokenId;\n uint256first_encounter = block.timestamp;\n\n for (i = 1; i \u003c= 50; i++) {\n tokenId = totalSupply().add(1);\n if(tokenId \u003c= MAX_TOKENS) {\n _safeMint(msg.sender, tokenId);\n _alienDetails[tokenId] = AlienDetail(first_encounter);\n emit TokenMinted(tokenId, msg.sender, first_encounter);\n }\n }\n }\n\n /**\n *Mint a specific token. \n */\n function mintTokenId(uint tokenId) public onlyOwner {\n require(!_exists(tokenId), \"Token wasminted\");\n uint256 first_encounter = block.timestamp;\n \n _safeMint(msg.sender, tokenId);\n _alienDetails[tokenId] =AlienDetail(first_encounter);\n emit TokenMinted(tokenId, msg.sender, first_encounter);\n }\n\n /* \n * Set provenance onceit\u0027s calculated\n */\n function setProvenanceHash(string memory provenanceHash) public onlyOwner {\n PROVENANCE = provenanceHash;\n }\n\n /* \n * Set max tokens\n */\n function setMaxTokens(uint256 maxTokens) public onlyOwner {\n MAX_TOKENS =maxTokens;\n }\n\n /*\n * Pause sale if active, make active if paused\n */\n function setSaleState(bool newState) public onlyOwner{\n saleIsActive = newState;\n }\n\n /**\n * Mint Alien\n */\n function mintAlien(uint numberOfTokens) public payable {\nrequire(saleIsActive, \"Mint is not available right now\");\n require(numberOfTokens \u003c= MAX_PURCHASE, \"Can only mint 50 tokens ata time\");\n require(totalSupply().add(numberOfTokens) \u003c= MAX_TOKENS, \"Purchase would exceed max supply of Aliens\");\n require(CURRENT_PRICE.mul(numberOfTokens) \u003c= msg.value, \"Value sent is not correct\");\n uint256 first_encounter = block.timestamp;\nuint tokenId;\n \n for(uint i = 1; i \u003c= numberOfTokens; i++) {\n tokenId = totalSupply().add(1);\n if(tokenId \u003c= MAX_TOKENS) {\n _safeMint(msg.sender, tokenId);\n _alienDetails[tokenId] = AlienDetail(first_encounter);\n \n emit TokenMinted(tokenId, msg.sender, first_encounter);\n }\n }\n }\n\n/**\n * Set the starting index for the collection\n */\n function setStartingIndex(uint256 startingIndex) public onlyOwner {\nSTARTING_INDEX = startingIndex;\n }\n\n /**\n * @dev Changes the base URI if we want to move things in the future (Callable by owner only)\n */\n function setBaseURI(string memory BaseURI) public onlyOwner {\n baseURI = BaseURI;\n }\n\n /**\n * @dev Base URIfor computing {tokenURI}. Empty by default, can be overriden\n * in child contracts.\n */\n function _baseURI() internal view virtualoverride returns (string memory) {\n return baseURI;\n }\n\n /**\n * Set the current token price\n */\n functionsetCurrentPrice(uint256 currentPrice) public onlyOwner {\n CURRENT_PRICE = currentPrice;\n }\n\n /**\n * Get the token detail\n*/\n function getAlienDetail(uint256 tokenId) public view returns(AlienDetail memory detail) {\n require(_exists(tokenId), \"Token wasnot minted\");\n\n return _alienDetails[tokenId];\n }\n}\n"}}
File 8 of 12: UpgradeableBeacon
12345678910111213141516// SPDX-License-Identifier: MITpragma solidity >=0.6.0 <0.8.0;import "@openzeppelin/contracts/proxy/IBeacon.sol";import "@openzeppelin/contracts/access/Ownable.sol";import "@openzeppelin/contracts/utils/Address.sol";/*** @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their* implementation contract, which is where they will delegate all function calls.** An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.a*/contract UpgradeableBeacon is IBeacon, Ownable {address private _implementation;/*** @dev Emitted when the implementation returned by the beacon is changed.*/
File 9 of 12: NFT20Pair
12345678910111213141516pragma solidity ^0.6.0;// ERC721import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";import "@openzeppelin/contracts/token/ERC721/IERC721.sol";// ERC1155import "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol";import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";import "./ERC20.sol";import "@openzeppelin/contracts/utils/EnumerableSet.sol";interface IFactory {function fee() external view returns (uint256);function sellTokens() external;function flashLoansEnabled() external view returns (bool);}interface IFlashLoanReceiver {function executeOperation(
File 10 of 12: AdminUpgradeabilityProxy
12345678910111213141516// SPDX-License-Identifier: MITpragma solidity ^0.6.0;import "./UpgradeabilityProxy.sol";/*** @title AdminUpgradeabilityProxy* @dev This contract combines an upgradeability proxy with an authorization* mechanism for administrative tasks.* All external functions in this contract must be guarded by the* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity* feature proposal that would enable this to be done automatically.*/contract AdminUpgradeabilityProxy is UpgradeabilityProxy {/*** Contract constructor.* @param _logic address of the initial implementation.* @param _admin Address of the proxy administrator.
File 11 of 12: NFT20FactoryV6
12345678910111213141516pragma solidity ^0.6.0;import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";import "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";import "../interfaces/INFT20Pair.sol";import "@openzeppelin/contracts/proxy/BeaconProxy.sol";interface Uni {function swapExactTokensForTokens(uint256,uint256,address[] calldata,address,uint256) external returns (uint256[] memory amounts);
File 12 of 12: UniswapV2Router02
12345678910111213141516pragma solidity =0.6.6;interface IUniswapV2Factory {event PairCreated(address indexed token0, address indexed token1, address pair, uint);function feeTo() external view returns (address);function feeToSetter() external view returns (address);function getPair(address tokenA, address tokenB) external view returns (address pair);function allPairs(uint) external view returns (address pair);function allPairsLength() external view returns (uint);function createPair(address tokenA, address tokenB) external returns (address pair);function setFeeTo(address) external;function setFeeToSetter(address) external;