Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 110 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Contract Liv... | 18073042 | 495 days ago | IN | 0 ETH | 0.00080451 | ||||
Claim88C | 18015880 | 503 days ago | IN | 0 ETH | 0.01389501 | ||||
Claim88C | 18015341 | 503 days ago | IN | 0 ETH | 0.00807572 | ||||
Claim88C | 18015290 | 503 days ago | IN | 0 ETH | 0.01331601 | ||||
Claim88C | 18010224 | 504 days ago | IN | 0 ETH | 0.00262391 | ||||
Claim88C | 18009723 | 504 days ago | IN | 0 ETH | 0.00177084 | ||||
Claim88C | 18009675 | 504 days ago | IN | 0 ETH | 0.0051379 | ||||
Claim88C | 18007653 | 504 days ago | IN | 0 ETH | 0.00287058 | ||||
Claim88C | 18007210 | 504 days ago | IN | 0 ETH | 0.00401528 | ||||
Claim88C | 18007202 | 504 days ago | IN | 0 ETH | 0.00428713 | ||||
Claim88C | 18006858 | 504 days ago | IN | 0 ETH | 0.00285157 | ||||
Claim88C | 17995014 | 506 days ago | IN | 0 ETH | 0.0021708 | ||||
Claim88C | 17994475 | 506 days ago | IN | 0 ETH | 0.00255888 | ||||
Claim88C | 17988174 | 507 days ago | IN | 0 ETH | 0.00236781 | ||||
Claim88C | 17985590 | 507 days ago | IN | 0 ETH | 0.00377749 | ||||
Claim88C | 17985348 | 507 days ago | IN | 0 ETH | 0.00735872 | ||||
Claim88C | 17981925 | 508 days ago | IN | 0 ETH | 0.00219012 | ||||
Claim88C | 17981911 | 508 days ago | IN | 0 ETH | 0.00066024 | ||||
Claim88C | 17981117 | 508 days ago | IN | 0 ETH | 0.00520346 | ||||
Claim88C | 17978815 | 508 days ago | IN | 0 ETH | 0.00781452 | ||||
Claim88C | 17972306 | 509 days ago | IN | 0 ETH | 0.00531592 | ||||
Claim88C | 17967727 | 510 days ago | IN | 0 ETH | 0.00209174 | ||||
Claim88C | 17967693 | 510 days ago | IN | 0 ETH | 0.00220998 | ||||
Claim88C | 17966415 | 510 days ago | IN | 0 ETH | 0.00446615 | ||||
Claim88C | 17959976 | 511 days ago | IN | 0 ETH | 0.00204154 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Aliens88CMinter
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2023-07-28 */ // SPDX-License-Identifier: MIT // Sources flattened with hardhat v2.13.0 https://hardhat.org // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File @openzeppelin/contracts/utils/introspection/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File @openzeppelin/contracts/token/ERC1155/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; } // File @openzeppelin/contracts/token/ERC1155/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); } // File @openzeppelin/contracts/token/ERC1155/[email protected] // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } // File @openzeppelin/contracts/utils/introspection/[email protected] // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File @openzeppelin/contracts/token/ERC1155/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } } // File @openzeppelin/contracts/token/ERC1155/extensions/[email protected] // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 supply = _totalSupply[id]; require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); unchecked { _totalSupply[id] = supply - amount; } } } } } // File @openzeppelin/contracts/token/ERC721/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); } // File @openzeppelin/contracts/token/ERC721/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // File @openzeppelin/contracts/token/ERC721/[email protected] // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File @openzeppelin/contracts/utils/math/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } } // File @openzeppelin/contracts/token/ERC721/[email protected] // OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } } // File @openzeppelin/contracts/token/ERC721/extensions/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _burn(tokenId); } } // File @openzeppelin/contracts/utils/cryptography/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } } // File contracts/Aliens88CERC1155.sol pragma solidity ^0.8.13; contract Aliens88CERC1155 is Ownable, ERC1155 { string public name; string public symbol; mapping (address => bool) _minters; mapping (uint256 => string) uris; modifier onlyMinter() { require(_minters[msg.sender], "Sender is not authorized Minter."); _; } constructor ( string memory name_, string memory symbol_ ) ERC1155('') { name = name_; symbol = symbol_; } function mint(address to, uint256 tokenId_, uint256 amount) onlyMinter public { _mint(to, tokenId_, amount, ''); } function mintBatch(address to, uint256[] memory tokenIds_, uint256[] memory amounts) onlyMinter public { _mintBatch(to, tokenIds_, amounts, ''); } function setURI(uint256 tokenId_, string memory uri_) public onlyOwner { uris[tokenId_] = uri_; } function setMinter(address contract_) public onlyOwner { _minters[contract_] = true; } function releaseMinter(address contract_) public onlyOwner { _minters[contract_] = false; } function uri(uint256 tokenId_) public view override (ERC1155) returns (string memory) { return uris[tokenId_]; } } // File contracts/Aliens88CMinter.sol pragma solidity ^0.8.13; contract Aliens88CMinter is Ownable { // claimId => snapshotOrBurn(1||2) => id mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) usedToClaim; error SnapshotIdUsed(); error BurnIdUsed(); error InvalidBurnId(); error InvalidSnapshotProof(); error NotBurnOwner(); error BurnIsNotBurnProof(); error RequestingTooMany(); error ClaimClosed(); address public ALIEN_88C_CONTRACT; address public CONTRACT_8LIENS; address public GNOSIS_SAFE = 0xe7826EBb0d2035134e8Aed6ddb310fF6Fa3745DC; address _signer; uint256 public constant MAX_SUPPLY = 888; uint256 public TOTAL_SUPPLY = 0; bool public IS_LIVE = false; struct Claim { uint256 snapshotId; uint256 burnId; bytes proofOfSnapshot; bytes proofToSaveBurnId; } function setSigner(address signer) external onlyOwner { _signer = signer; } function setAliensContract(address _aliens) external onlyOwner { CONTRACT_8LIENS = _aliens; } function set88CContract(address _88c) external onlyOwner { ALIEN_88C_CONTRACT = _88c; } function setGnosisSafe(address _safe) external onlyOwner { GNOSIS_SAFE = _safe; } function setContractLive(bool _state) external onlyOwner { IS_LIVE = _state; } function claimRemaining(uint256 tokenId) external onlyOwner { TOTAL_SUPPLY = MAX_SUPPLY; Aliens88CERC1155(ALIEN_88C_CONTRACT).mint( GNOSIS_SAFE, tokenId, MAX_SUPPLY - TOTAL_SUPPLY ); } function claim88C(uint256 claimId, Claim[] calldata claims) external { if (!IS_LIVE) { revert ClaimClosed(); } uint256 length = claims.length; if (TOTAL_SUPPLY + length > MAX_SUPPLY) { revert RequestingTooMany(); } for (uint256 i; i < length; i++) { // this will revert if any claim is not good _claim(claimId, claims[i]); } TOTAL_SUPPLY += length; Aliens88CERC1155(ALIEN_88C_CONTRACT).mint( msg.sender, claimId, length ); } function _claim(uint256 claimId, Claim calldata claim) internal { if (usedToClaim[claimId][1][claim.snapshotId]) { revert SnapshotIdUsed(); } if (usedToClaim[claimId][2][claim.burnId]) { revert BurnIdUsed(); } // make sure the user doesn't try to burn the id they use for claim if (claim.snapshotId == claim.burnId) { revert InvalidBurnId(); } // make sure we have a signature that proved msg.sender was holding claim.snapshotId at time of snaphsot // 1 in the signature means "token to hold to be able to claim claimId" bytes32 message = keccak256( abi.encode(msg.sender, claim.snapshotId, uint256(1), claimId) ); if ( ECDSA.recover( ECDSA.toEthSignedMessageHash(message), claim.proofOfSnapshot ) != _signer ) { revert InvalidSnapshotProof(); } // make sure user is the owner of claim.burnId if (msg.sender != ERC721(CONTRACT_8LIENS).ownerOf(claim.burnId)) { revert NotBurnOwner(); } // if there is any signatures passed for the second ID this means the user is trying to claim without burning if (claim.proofToSaveBurnId.length != 0) { // 2 in the signature means "burn proof for this claimId" bytes32 burnMessage = keccak256( abi.encode(claim.burnId, uint256(2), claimId) ); if ( ECDSA.recover( ECDSA.toEthSignedMessageHash(burnMessage), claim.proofToSaveBurnId ) != _signer ) { revert BurnIsNotBurnProof(); } } else { ERC721Burnable(CONTRACT_8LIENS).burn(claim.burnId); } usedToClaim[claimId][1][claim.snapshotId] = true; usedToClaim[claimId][2][claim.burnId] = true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"BurnIdUsed","type":"error"},{"inputs":[],"name":"BurnIsNotBurnProof","type":"error"},{"inputs":[],"name":"ClaimClosed","type":"error"},{"inputs":[],"name":"InvalidBurnId","type":"error"},{"inputs":[],"name":"InvalidSnapshotProof","type":"error"},{"inputs":[],"name":"NotBurnOwner","type":"error"},{"inputs":[],"name":"RequestingTooMany","type":"error"},{"inputs":[],"name":"SnapshotIdUsed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"ALIEN_88C_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONTRACT_8LIENS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GNOSIS_SAFE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IS_LIVE","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"claimId","type":"uint256"},{"components":[{"internalType":"uint256","name":"snapshotId","type":"uint256"},{"internalType":"uint256","name":"burnId","type":"uint256"},{"internalType":"bytes","name":"proofOfSnapshot","type":"bytes"},{"internalType":"bytes","name":"proofToSaveBurnId","type":"bytes"}],"internalType":"struct Aliens88CMinter.Claim[]","name":"claims","type":"tuple[]"}],"name":"claim88C","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimRemaining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_88c","type":"address"}],"name":"set88CContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_aliens","type":"address"}],"name":"setAliensContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setContractLive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_safe","type":"address"}],"name":"setGnosisSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405273e7826ebb0d2035134e8aed6ddb310ff6fa3745dc600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006006556000600760006101000a81548160ff02191690831515021790555034801561008557600080fd5b506100a26100976100a760201b60201c565b6100af60201b60201c565b610173565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611b19806101826000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80637d20a41d116100975780639d5dd2c0116100665780639d5dd2c01461024f578063c3085a3e1461026d578063c9d8571214610289578063f2fde38b146102a557610100565b80637d20a41d146101d95780638da5cb5b146101f75780638eb3821114610215578063902d55a51461023157610100565b806369f347c9116100d357806369f347c9146101795780636c19e783146101955780636c3d2e40146101b1578063715018a6146101cf57610100565b80630f404b301461010557806311f028181461012157806332cb6b0c1461013d5780634aad07a81461015b575b600080fd5b61011f600480360381019061011a9190611226565b6102c1565b005b61013b600480360381019061013691906112b8565b610397565b005b61014561052b565b6040516101529190611327565b60405180910390f35b610163610531565b6040516101709190611383565b60405180910390f35b610193600480360381019061018e91906113ca565b610557565b005b6101af60048036038101906101aa91906113ca565b6105a3565b005b6101b96105ef565b6040516101c69190611383565b60405180910390f35b6101d7610615565b005b6101e1610629565b6040516101ee9190611412565b60405180910390f35b6101ff61063c565b60405161020c9190611383565b60405180910390f35b61022f600480360381019061022a91906113ca565b610665565b005b6102396106b1565b6040516102469190611327565b60405180910390f35b6102576106b7565b6040516102649190611383565b60405180910390f35b610287600480360381019061028291906113ca565b6106dd565b005b6102a3600480360381019061029e9190611459565b610729565b005b6102bf60048036038101906102ba91906113ca565b61074e565b005b6102c96107d1565b610378600681905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663156e29f6600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360065461037861034491906114b5565b6040518463ffffffff1660e01b8152600401610362939291906114e9565b600060405180830381600087803b15801561037c57600080fd5b505af1158015610390573d6000803e3d6000fd5b5050505050565b600760009054906101000a900460ff166103dd576040517ff6e8504100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828290509050610378816006546103f69190611520565b111561042e576040517f9e0456c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561047a57610467858585848181106104505761044f611554565b5b90506020028101906104629190611592565b61084f565b8080610472906115ba565b915050610431565b50806006600082825461048d9190611520565b92505081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663156e29f63386846040518463ffffffff1660e01b81526004016104f3939291906114e9565b600060405180830381600087803b15801561050d57600080fd5b505af1158015610521573d6000803e3d6000fd5b5050505050505050565b61037881565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61055f6107d1565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6105ab6107d1565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61061d6107d1565b6106276000610e2a565b565b600760009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61066d6107d1565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106e56107d1565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6107316107d1565b80600760006101000a81548160ff02191690831515021790555050565b6107566107d1565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bc90611685565b60405180910390fd5b6107ce81610e2a565b50565b6107d9610eee565b73ffffffffffffffffffffffffffffffffffffffff166107f761063c565b73ffffffffffffffffffffffffffffffffffffffff161461084d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610844906116f1565b60405180910390fd5b565b6001600083815260200190815260200160002060006001815260200190815260200160002060008260000135815260200190815260200160002060009054906101000a900460ff16156108ce576040517fe4cdaa2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600083815260200190815260200160002060006002815260200190815260200160002060008260200135815260200190815260200160002060009054906101000a900460ff161561094d576040517f3f32b8e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020013581600001350361098e576040517f9c22d98500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003382600001356001856040516020016109ac9493929190611711565b604051602081830303815290604052805190602001209050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a61610a0983610ef6565b848060400190610a199190611756565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610f26565b73ffffffffffffffffffffffffffffffffffffffff1614610aae576040517fa4513f6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e83602001356040518263ffffffff1660e01b8152600401610b0d9190611327565b602060405180830381865afa158015610b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4e91906117ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb2576040517fe078f84400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828060600190610bc49190611756565b905014610cef5760008260200135600285604051602001610be7939291906117fb565b604051602081830303815290604052805190602001209050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c9c610c4483610ef6565b858060600190610c549190611756565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610f26565b73ffffffffffffffffffffffffffffffffffffffff1614610ce9576040517fb7c0b97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50610d81565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c6883602001356040518263ffffffff1660e01b8152600401610d4e9190611327565b600060405180830381600087803b158015610d6857600080fd5b505af1158015610d7c573d6000803e3d6000fd5b505050505b600180600085815260200190815260200160002060006001815260200190815260200160002060008460000135815260200190815260200160002060006101000a81548160ff021916908315150217905550600180600085815260200190815260200160002060006002815260200190815260200160002060008460200135815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600081604051602001610f0991906118b4565b604051602081830303815290604052805190602001209050919050565b6000806000610f358585610f4d565b91509150610f4281610f9e565b819250505092915050565b6000806041835103610f8e5760008060006020860151925060408601519150606086015160001a9050610f8287828585611104565b94509450505050610f97565b60006002915091505b9250929050565b60006004811115610fb257610fb16118da565b5b816004811115610fc557610fc46118da565b5b03156111015760016004811115610fdf57610fde6118da565b5b816004811115610ff257610ff16118da565b5b03611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102990611955565b60405180910390fd5b60026004811115611046576110456118da565b5b816004811115611059576110586118da565b5b03611099576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611090906119c1565b60405180910390fd5b600360048111156110ad576110ac6118da565b5b8160048111156110c0576110bf6118da565b5b03611100576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f790611a53565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c111561113f5760006003915091506111dd565b6000600187878787604051600081526020016040526040516111649493929190611a9e565b6020604051602081039080840390855afa158015611186573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111d4576000600192509250506111dd565b80600092509250505b94509492505050565b600080fd5b600080fd5b6000819050919050565b611203816111f0565b811461120e57600080fd5b50565b600081359050611220816111fa565b92915050565b60006020828403121561123c5761123b6111e6565b5b600061124a84828501611211565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261127857611277611253565b5b8235905067ffffffffffffffff81111561129557611294611258565b5b6020830191508360208202830111156112b1576112b061125d565b5b9250929050565b6000806000604084860312156112d1576112d06111e6565b5b60006112df86828701611211565b935050602084013567ffffffffffffffff811115611300576112ff6111eb565b5b61130c86828701611262565b92509250509250925092565b611321816111f0565b82525050565b600060208201905061133c6000830184611318565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061136d82611342565b9050919050565b61137d81611362565b82525050565b60006020820190506113986000830184611374565b92915050565b6113a781611362565b81146113b257600080fd5b50565b6000813590506113c48161139e565b92915050565b6000602082840312156113e0576113df6111e6565b5b60006113ee848285016113b5565b91505092915050565b60008115159050919050565b61140c816113f7565b82525050565b60006020820190506114276000830184611403565b92915050565b611436816113f7565b811461144157600080fd5b50565b6000813590506114538161142d565b92915050565b60006020828403121561146f5761146e6111e6565b5b600061147d84828501611444565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006114c0826111f0565b91506114cb836111f0565b92508282039050818111156114e3576114e2611486565b5b92915050565b60006060820190506114fe6000830186611374565b61150b6020830185611318565b6115186040830184611318565b949350505050565b600061152b826111f0565b9150611536836111f0565b925082820190508082111561154e5761154d611486565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b6000823560016080038336030381126115ae576115ad611583565b5b80830191505092915050565b60006115c5826111f0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115f7576115f6611486565b5b600182019050919050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061166f602683611602565b915061167a82611613565b604082019050919050565b6000602082019050818103600083015261169e81611662565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006116db602083611602565b91506116e6826116a5565b602082019050919050565b6000602082019050818103600083015261170a816116ce565b9050919050565b60006080820190506117266000830187611374565b6117336020830186611318565b6117406040830185611318565b61174d6060830184611318565b95945050505050565b6000808335600160200384360303811261177357611772611583565b5b80840192508235915067ffffffffffffffff82111561179557611794611588565b5b6020830192506001820236038313156117b1576117b061158d565b5b509250929050565b6000815190506117c88161139e565b92915050565b6000602082840312156117e4576117e36111e6565b5b60006117f2848285016117b9565b91505092915050565b60006060820190506118106000830186611318565b61181d6020830185611318565b61182a6040830184611318565b949350505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000611873601c83611832565b915061187e8261183d565b601c82019050919050565b6000819050919050565b6000819050919050565b6118ae6118a982611889565b611893565b82525050565b60006118bf82611866565b91506118cb828461189d565b60208201915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061193f601883611602565b915061194a82611909565b602082019050919050565b6000602082019050818103600083015261196e81611932565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b60006119ab601f83611602565b91506119b682611975565b602082019050919050565b600060208201905081810360008301526119da8161199e565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000611a3d602283611602565b9150611a48826119e1565b604082019050919050565b60006020820190508181036000830152611a6c81611a30565b9050919050565b611a7c81611889565b82525050565b600060ff82169050919050565b611a9881611a82565b82525050565b6000608082019050611ab36000830187611a73565b611ac06020830186611a8f565b611acd6040830185611a73565b611ada6060830184611a73565b9594505050505056fea2646970667358221220e20e86db7c7c0efdd7bb687a46056ae5110c4b65aee7f87842f8ff6c12a08bf864736f6c63430008120033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80637d20a41d116100975780639d5dd2c0116100665780639d5dd2c01461024f578063c3085a3e1461026d578063c9d8571214610289578063f2fde38b146102a557610100565b80637d20a41d146101d95780638da5cb5b146101f75780638eb3821114610215578063902d55a51461023157610100565b806369f347c9116100d357806369f347c9146101795780636c19e783146101955780636c3d2e40146101b1578063715018a6146101cf57610100565b80630f404b301461010557806311f028181461012157806332cb6b0c1461013d5780634aad07a81461015b575b600080fd5b61011f600480360381019061011a9190611226565b6102c1565b005b61013b600480360381019061013691906112b8565b610397565b005b61014561052b565b6040516101529190611327565b60405180910390f35b610163610531565b6040516101709190611383565b60405180910390f35b610193600480360381019061018e91906113ca565b610557565b005b6101af60048036038101906101aa91906113ca565b6105a3565b005b6101b96105ef565b6040516101c69190611383565b60405180910390f35b6101d7610615565b005b6101e1610629565b6040516101ee9190611412565b60405180910390f35b6101ff61063c565b60405161020c9190611383565b60405180910390f35b61022f600480360381019061022a91906113ca565b610665565b005b6102396106b1565b6040516102469190611327565b60405180910390f35b6102576106b7565b6040516102649190611383565b60405180910390f35b610287600480360381019061028291906113ca565b6106dd565b005b6102a3600480360381019061029e9190611459565b610729565b005b6102bf60048036038101906102ba91906113ca565b61074e565b005b6102c96107d1565b610378600681905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663156e29f6600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360065461037861034491906114b5565b6040518463ffffffff1660e01b8152600401610362939291906114e9565b600060405180830381600087803b15801561037c57600080fd5b505af1158015610390573d6000803e3d6000fd5b5050505050565b600760009054906101000a900460ff166103dd576040517ff6e8504100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828290509050610378816006546103f69190611520565b111561042e576040517f9e0456c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8181101561047a57610467858585848181106104505761044f611554565b5b90506020028101906104629190611592565b61084f565b8080610472906115ba565b915050610431565b50806006600082825461048d9190611520565b92505081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663156e29f63386846040518463ffffffff1660e01b81526004016104f3939291906114e9565b600060405180830381600087803b15801561050d57600080fd5b505af1158015610521573d6000803e3d6000fd5b5050505050505050565b61037881565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61055f6107d1565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6105ab6107d1565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61061d6107d1565b6106276000610e2a565b565b600760009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61066d6107d1565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106e56107d1565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6107316107d1565b80600760006101000a81548160ff02191690831515021790555050565b6107566107d1565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bc90611685565b60405180910390fd5b6107ce81610e2a565b50565b6107d9610eee565b73ffffffffffffffffffffffffffffffffffffffff166107f761063c565b73ffffffffffffffffffffffffffffffffffffffff161461084d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610844906116f1565b60405180910390fd5b565b6001600083815260200190815260200160002060006001815260200190815260200160002060008260000135815260200190815260200160002060009054906101000a900460ff16156108ce576040517fe4cdaa2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600083815260200190815260200160002060006002815260200190815260200160002060008260200135815260200190815260200160002060009054906101000a900460ff161561094d576040517f3f32b8e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020013581600001350361098e576040517f9c22d98500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003382600001356001856040516020016109ac9493929190611711565b604051602081830303815290604052805190602001209050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a61610a0983610ef6565b848060400190610a199190611756565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610f26565b73ffffffffffffffffffffffffffffffffffffffff1614610aae576040517fa4513f6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e83602001356040518263ffffffff1660e01b8152600401610b0d9190611327565b602060405180830381865afa158015610b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4e91906117ce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb2576040517fe078f84400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828060600190610bc49190611756565b905014610cef5760008260200135600285604051602001610be7939291906117fb565b604051602081830303815290604052805190602001209050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c9c610c4483610ef6565b858060600190610c549190611756565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610f26565b73ffffffffffffffffffffffffffffffffffffffff1614610ce9576040517fb7c0b97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50610d81565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c6883602001356040518263ffffffff1660e01b8152600401610d4e9190611327565b600060405180830381600087803b158015610d6857600080fd5b505af1158015610d7c573d6000803e3d6000fd5b505050505b600180600085815260200190815260200160002060006001815260200190815260200160002060008460000135815260200190815260200160002060006101000a81548160ff021916908315150217905550600180600085815260200190815260200160002060006002815260200190815260200160002060008460200135815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600081604051602001610f0991906118b4565b604051602081830303815290604052805190602001209050919050565b6000806000610f358585610f4d565b91509150610f4281610f9e565b819250505092915050565b6000806041835103610f8e5760008060006020860151925060408601519150606086015160001a9050610f8287828585611104565b94509450505050610f97565b60006002915091505b9250929050565b60006004811115610fb257610fb16118da565b5b816004811115610fc557610fc46118da565b5b03156111015760016004811115610fdf57610fde6118da565b5b816004811115610ff257610ff16118da565b5b03611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102990611955565b60405180910390fd5b60026004811115611046576110456118da565b5b816004811115611059576110586118da565b5b03611099576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611090906119c1565b60405180910390fd5b600360048111156110ad576110ac6118da565b5b8160048111156110c0576110bf6118da565b5b03611100576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f790611a53565b60405180910390fd5b5b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c111561113f5760006003915091506111dd565b6000600187878787604051600081526020016040526040516111649493929190611a9e565b6020604051602081039080840390855afa158015611186573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111d4576000600192509250506111dd565b80600092509250505b94509492505050565b600080fd5b600080fd5b6000819050919050565b611203816111f0565b811461120e57600080fd5b50565b600081359050611220816111fa565b92915050565b60006020828403121561123c5761123b6111e6565b5b600061124a84828501611211565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261127857611277611253565b5b8235905067ffffffffffffffff81111561129557611294611258565b5b6020830191508360208202830111156112b1576112b061125d565b5b9250929050565b6000806000604084860312156112d1576112d06111e6565b5b60006112df86828701611211565b935050602084013567ffffffffffffffff811115611300576112ff6111eb565b5b61130c86828701611262565b92509250509250925092565b611321816111f0565b82525050565b600060208201905061133c6000830184611318565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061136d82611342565b9050919050565b61137d81611362565b82525050565b60006020820190506113986000830184611374565b92915050565b6113a781611362565b81146113b257600080fd5b50565b6000813590506113c48161139e565b92915050565b6000602082840312156113e0576113df6111e6565b5b60006113ee848285016113b5565b91505092915050565b60008115159050919050565b61140c816113f7565b82525050565b60006020820190506114276000830184611403565b92915050565b611436816113f7565b811461144157600080fd5b50565b6000813590506114538161142d565b92915050565b60006020828403121561146f5761146e6111e6565b5b600061147d84828501611444565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006114c0826111f0565b91506114cb836111f0565b92508282039050818111156114e3576114e2611486565b5b92915050565b60006060820190506114fe6000830186611374565b61150b6020830185611318565b6115186040830184611318565b949350505050565b600061152b826111f0565b9150611536836111f0565b925082820190508082111561154e5761154d611486565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b6000823560016080038336030381126115ae576115ad611583565b5b80830191505092915050565b60006115c5826111f0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036115f7576115f6611486565b5b600182019050919050565b600082825260208201905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061166f602683611602565b915061167a82611613565b604082019050919050565b6000602082019050818103600083015261169e81611662565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006116db602083611602565b91506116e6826116a5565b602082019050919050565b6000602082019050818103600083015261170a816116ce565b9050919050565b60006080820190506117266000830187611374565b6117336020830186611318565b6117406040830185611318565b61174d6060830184611318565b95945050505050565b6000808335600160200384360303811261177357611772611583565b5b80840192508235915067ffffffffffffffff82111561179557611794611588565b5b6020830192506001820236038313156117b1576117b061158d565b5b509250929050565b6000815190506117c88161139e565b92915050565b6000602082840312156117e4576117e36111e6565b5b60006117f2848285016117b9565b91505092915050565b60006060820190506118106000830186611318565b61181d6020830185611318565b61182a6040830184611318565b949350505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000611873601c83611832565b915061187e8261183d565b601c82019050919050565b6000819050919050565b6000819050919050565b6118ae6118a982611889565b611893565b82525050565b60006118bf82611866565b91506118cb828461189d565b60208201915081905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061193f601883611602565b915061194a82611909565b602082019050919050565b6000602082019050818103600083015261196e81611932565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b60006119ab601f83611602565b91506119b682611975565b602082019050919050565b600060208201905081810360008301526119da8161199e565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000611a3d602283611602565b9150611a48826119e1565b604082019050919050565b60006020820190508181036000830152611a6c81611a30565b9050919050565b611a7c81611889565b82525050565b600060ff82169050919050565b611a9881611a82565b82525050565b6000608082019050611ab36000830187611a73565b611ac06020830186611a8f565b611acd6040830185611a73565b611ada6060830184611a73565b9594505050505056fea2646970667358221220e20e86db7c7c0efdd7bb687a46056ae5110c4b65aee7f87842f8ff6c12a08bf864736f6c63430008120033
Deployed Bytecode Sourcemap
93065:4270:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;94451:255;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;94714:576;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;93655:40;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;93516:30;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;94024:107;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;93927:89;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;93476:33;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2886:103;;;:::i;:::-;;93742:27;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2238:87;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;94139:101;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;93702:31;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;93553:71;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;94248:95;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;94351:92;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3144:201;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;94451:255;2124:13;:11;:13::i;:::-;93692:3:::1;94522:12;:25;;;;94575:18;;;;;;;;;;;94558:41;;;94614:11;;;;;;;;;;;94640:7;94675:12;;93692:3;94662:25;;;;:::i;:::-;94558:140;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;94451:255:::0;:::o;94714:576::-;94799:7;;;;;;;;;;;94794:39;;94817:13;;;;;;;;;;;;;;94794:39;94845:14;94862:6;;:13;;94845:30;;93692:3;94905:6;94890:12;;:21;;;;:::i;:::-;:34;94886:71;;;94935:19;;;;;;;;;;;;;;94886:71;94974:9;94969:144;94989:6;94985:1;:10;94969:144;;;95075:26;95082:7;95091:6;;95098:1;95091:9;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;:::-;95075:6;:26::i;:::-;94997:3;;;;;:::i;:::-;;;;94969:144;;;;95141:6;95125:12;;:22;;;;;;;:::i;:::-;;;;;;;;95177:18;;;;;;;;;;;95160:41;;;95216:10;95241:7;95263:6;95160:120;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;94783:507;94714:576;;;:::o;93655:40::-;93692:3;93655:40;:::o;93516:30::-;;;;;;;;;;;;;:::o;94024:107::-;2124:13;:11;:13::i;:::-;94116:7:::1;94098:15;;:25;;;;;;;;;;;;;;;;;;94024:107:::0;:::o;93927:89::-;2124:13;:11;:13::i;:::-;94002:6:::1;93992:7;;:16;;;;;;;;;;;;;;;;;;93927:89:::0;:::o;93476:33::-;;;;;;;;;;;;;:::o;2886:103::-;2124:13;:11;:13::i;:::-;2951:30:::1;2978:1;2951:18;:30::i;:::-;2886:103::o:0;93742:27::-;;;;;;;;;;;;;:::o;2238:87::-;2284:7;2311:6;;;;;;;;;;;2304:13;;2238:87;:::o;94139:101::-;2124:13;:11;:13::i;:::-;94228:4:::1;94207:18;;:25;;;;;;;;;;;;;;;;;;94139:101:::0;:::o;93702:31::-;;;;:::o;93553:71::-;;;;;;;;;;;;;:::o;94248:95::-;2124:13;:11;:13::i;:::-;94330:5:::1;94316:11;;:19;;;;;;;;;;;;;;;;;;94248:95:::0;:::o;94351:92::-;2124:13;:11;:13::i;:::-;94429:6:::1;94419:7;;:16;;;;;;;;;;;;;;;;;;94351:92:::0;:::o;3144:201::-;2124:13;:11;:13::i;:::-;3253:1:::1;3233:22;;:8;:22;;::::0;3225:73:::1;;;;;;;;;;;;:::i;:::-;;;;;;;;;3309:28;3328:8;3309:18;:28::i;:::-;3144:201:::0;:::o;2403:132::-;2478:12;:10;:12::i;:::-;2467:23;;:7;:5;:7::i;:::-;:23;;;2459:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;2403:132::o;95298:2034::-;95377:11;:20;95389:7;95377:20;;;;;;;;;;;:23;95398:1;95377:23;;;;;;;;;;;:41;95401:5;:16;;;95377:41;;;;;;;;;;;;;;;;;;;;;95373:97;;;95442:16;;;;;;;;;;;;;;95373:97;95486:11;:20;95498:7;95486:20;;;;;;;;;;;:23;95507:1;95486:23;;;;;;;;;;;:37;95510:5;:12;;;95486:37;;;;;;;;;;;;;;;;;;;;;95482:89;;;95547:12;;;;;;;;;;;;;;95482:89;95684:5;:12;;;95664:5;:16;;;:32;95660:87;;95720:15;;;;;;;;;;;;;;95660:87;95954:15;96007:10;96019:5;:16;;;96045:1;96049:7;95996:61;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;95972:96;;;;;;95954:114;;96225:7;;;;;;;;;;;96097:135;;:124;96129:37;96158:7;96129:28;:37::i;:::-;96185:5;:21;;;;;;;;:::i;:::-;96097:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;:124::i;:::-;:135;;;96079:221;;96266:22;;;;;;;;;;;;;;96079:221;96393:15;;;;;;;;;;;96386:31;;;96418:5;:12;;;96386:45;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;96372:59;;:10;:59;;;96368:113;;96455:14;;;;;;;;;;;;;;96368:113;96650:1;96616:5;:23;;;;;;;;:::i;:::-;:30;;:35;96612:599;;96739:19;96800:5;:12;;;96822:1;96826:7;96789:45;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;96761:88;;;;;;96739:110;;97032:7;;;;;;;;;;;96886:153;;:142;96922:41;96951:11;96922:28;:41::i;:::-;96986:5;:23;;;;;;;;:::i;:::-;96886:142;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:13;:142::i;:::-;:153;;;96864:253;;97081:20;;;;;;;;;;;;;;96864:253;96653:475;96612:599;;;97164:15;;;;;;;;;;;97149:36;;;97186:5;:12;;;97149:50;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;96612:599;97265:4;97221:11;:20;97233:7;97221:20;;;;;;;;;;;:23;97242:1;97221:23;;;;;;;;;;;:41;97245:5;:16;;;97221:41;;;;;;;;;;;;:48;;;;;;;;;;;;;;;;;;97320:4;97280:11;:20;97292:7;97280:20;;;;;;;;;;;:23;97301:1;97280:23;;;;;;;;;;;:37;97304:5;:12;;;97280:37;;;;;;;;;;;;:44;;;;;;;;;;;;;;;;;;95362:1970;95298:2034;;:::o;3505:191::-;3579:16;3598:6;;;;;;;;;;;3579:25;;3624:8;3615:6;;:17;;;;;;;;;;;;;;;;;;3679:8;3648:40;;3669:8;3648:40;;;;;;;;;;;;3568:128;3505:191;:::o;783:98::-;836:7;863:10;856:17;;783:98;:::o;90342:269::-;90411:7;90597:4;90544:58;;;;;;;;:::i;:::-;;;;;;;;;;;;;90534:69;;;;;;90527:76;;90342:269;;;:::o;86645:231::-;86723:7;86744:17;86763:18;86785:27;86796:4;86802:9;86785:10;:27::i;:::-;86743:69;;;;86823:18;86835:5;86823:11;:18::i;:::-;86859:9;86852:16;;;;86645:231;;;;:::o;85096:747::-;85177:7;85186:12;85235:2;85215:9;:16;:22;85211:625;;85254:9;85278;85302:7;85559:4;85548:9;85544:20;85538:27;85533:32;;85609:4;85598:9;85594:20;85588:27;85583:32;;85667:4;85656:9;85652:20;85646:27;85643:1;85638:36;85633:41;;85710:25;85721:4;85727:1;85730;85733;85710:10;:25::i;:::-;85703:32;;;;;;;;;85211:625;85784:1;85788:35;85768:56;;;;85096:747;;;;;;:::o;83489:521::-;83567:20;83558:29;;;;;;;;:::i;:::-;;:5;:29;;;;;;;;:::i;:::-;;;83554:449;83604:7;83554:449;83665:29;83656:38;;;;;;;;:::i;:::-;;:5;:38;;;;;;;;:::i;:::-;;;83652:351;;83711:34;;;;;;;;;;:::i;:::-;;;;;;;;83652:351;83776:35;83767:44;;;;;;;;:::i;:::-;;:5;:44;;;;;;;;:::i;:::-;;;83763:240;;83828:41;;;;;;;;;;:::i;:::-;;;;;;;;83763:240;83900:30;83891:39;;;;;;;;:::i;:::-;;:5;:39;;;;;;;;:::i;:::-;;;83887:116;;83947:44;;;;;;;;;;:::i;:::-;;;;;;;;83887:116;83489:521;;:::o;88097:1527::-;88228:7;88237:12;89169:66;89164:1;89156:10;;:79;89152:163;;;89268:1;89272:30;89252:51;;;;;;89152:163;89412:14;89429:24;89439:4;89445:1;89448;89451;89429:24;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;89412:41;;89486:1;89468:20;;:6;:20;;;89464:103;;89521:1;89525:29;89505:50;;;;;;;89464:103;89587:6;89595:20;89579:37;;;;;88097:1527;;;;;;;;:::o;88:117:1:-;197:1;194;187:12;211:117;320:1;317;310:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:139::-;591:5;629:6;616:20;607:29;;645:33;672:5;645:33;:::i;:::-;545:139;;;;:::o;690:329::-;749:6;798:2;786:9;777:7;773:23;769:32;766:119;;;804:79;;:::i;:::-;766:119;924:1;949:53;994:7;985:6;974:9;970:22;949:53;:::i;:::-;939:63;;895:117;690:329;;;;:::o;1025:117::-;1134:1;1131;1124:12;1148:117;1257:1;1254;1247:12;1271:117;1380:1;1377;1370:12;1432:593;1530:8;1540:6;1590:3;1583:4;1575:6;1571:17;1567:27;1557:122;;1598:79;;:::i;:::-;1557:122;1711:6;1698:20;1688:30;;1741:18;1733:6;1730:30;1727:117;;;1763:79;;:::i;:::-;1727:117;1877:4;1869:6;1865:17;1853:29;;1931:3;1923:4;1915:6;1911:17;1901:8;1897:32;1894:41;1891:128;;;1938:79;;:::i;:::-;1891:128;1432:593;;;;;:::o;2031:754::-;2151:6;2159;2167;2216:2;2204:9;2195:7;2191:23;2187:32;2184:119;;;2222:79;;:::i;:::-;2184:119;2342:1;2367:53;2412:7;2403:6;2392:9;2388:22;2367:53;:::i;:::-;2357:63;;2313:117;2497:2;2486:9;2482:18;2469:32;2528:18;2520:6;2517:30;2514:117;;;2550:79;;:::i;:::-;2514:117;2663:105;2760:7;2751:6;2740:9;2736:22;2663:105;:::i;:::-;2645:123;;;;2440:338;2031:754;;;;;:::o;2791:118::-;2878:24;2896:5;2878:24;:::i;:::-;2873:3;2866:37;2791:118;;:::o;2915:222::-;3008:4;3046:2;3035:9;3031:18;3023:26;;3059:71;3127:1;3116:9;3112:17;3103:6;3059:71;:::i;:::-;2915:222;;;;:::o;3143:126::-;3180:7;3220:42;3213:5;3209:54;3198:65;;3143:126;;;:::o;3275:96::-;3312:7;3341:24;3359:5;3341:24;:::i;:::-;3330:35;;3275:96;;;:::o;3377:118::-;3464:24;3482:5;3464:24;:::i;:::-;3459:3;3452:37;3377:118;;:::o;3501:222::-;3594:4;3632:2;3621:9;3617:18;3609:26;;3645:71;3713:1;3702:9;3698:17;3689:6;3645:71;:::i;:::-;3501:222;;;;:::o;3729:122::-;3802:24;3820:5;3802:24;:::i;:::-;3795:5;3792:35;3782:63;;3841:1;3838;3831:12;3782:63;3729:122;:::o;3857:139::-;3903:5;3941:6;3928:20;3919:29;;3957:33;3984:5;3957:33;:::i;:::-;3857:139;;;;:::o;4002:329::-;4061:6;4110:2;4098:9;4089:7;4085:23;4081:32;4078:119;;;4116:79;;:::i;:::-;4078:119;4236:1;4261:53;4306:7;4297:6;4286:9;4282:22;4261:53;:::i;:::-;4251:63;;4207:117;4002:329;;;;:::o;4337:90::-;4371:7;4414:5;4407:13;4400:21;4389:32;;4337:90;;;:::o;4433:109::-;4514:21;4529:5;4514:21;:::i;:::-;4509:3;4502:34;4433:109;;:::o;4548:210::-;4635:4;4673:2;4662:9;4658:18;4650:26;;4686:65;4748:1;4737:9;4733:17;4724:6;4686:65;:::i;:::-;4548:210;;;;:::o;4764:116::-;4834:21;4849:5;4834:21;:::i;:::-;4827:5;4824:32;4814:60;;4870:1;4867;4860:12;4814:60;4764:116;:::o;4886:133::-;4929:5;4967:6;4954:20;4945:29;;4983:30;5007:5;4983:30;:::i;:::-;4886:133;;;;:::o;5025:323::-;5081:6;5130:2;5118:9;5109:7;5105:23;5101:32;5098:119;;;5136:79;;:::i;:::-;5098:119;5256:1;5281:50;5323:7;5314:6;5303:9;5299:22;5281:50;:::i;:::-;5271:60;;5227:114;5025:323;;;;:::o;5354:180::-;5402:77;5399:1;5392:88;5499:4;5496:1;5489:15;5523:4;5520:1;5513:15;5540:194;5580:4;5600:20;5618:1;5600:20;:::i;:::-;5595:25;;5634:20;5652:1;5634:20;:::i;:::-;5629:25;;5678:1;5675;5671:9;5663:17;;5702:1;5696:4;5693:11;5690:37;;;5707:18;;:::i;:::-;5690:37;5540:194;;;;:::o;5740:442::-;5889:4;5927:2;5916:9;5912:18;5904:26;;5940:71;6008:1;5997:9;5993:17;5984:6;5940:71;:::i;:::-;6021:72;6089:2;6078:9;6074:18;6065:6;6021:72;:::i;:::-;6103;6171:2;6160:9;6156:18;6147:6;6103:72;:::i;:::-;5740:442;;;;;;:::o;6188:191::-;6228:3;6247:20;6265:1;6247:20;:::i;:::-;6242:25;;6281:20;6299:1;6281:20;:::i;:::-;6276:25;;6324:1;6321;6317:9;6310:16;;6345:3;6342:1;6339:10;6336:36;;;6352:18;;:::i;:::-;6336:36;6188:191;;;;:::o;6385:180::-;6433:77;6430:1;6423:88;6530:4;6527:1;6520:15;6554:4;6551:1;6544:15;6571:117;6680:1;6677;6670:12;6694:117;6803:1;6800;6793:12;6817:117;6926:1;6923;6916:12;6940:391;7031:4;7085:11;7072:25;7185:1;7179:4;7175:12;7164:8;7148:14;7144:29;7140:48;7120:18;7116:73;7106:168;;7193:79;;:::i;:::-;7106:168;7305:18;7295:8;7291:33;7283:41;;7036:295;6940:391;;;;:::o;7337:233::-;7376:3;7399:24;7417:5;7399:24;:::i;:::-;7390:33;;7445:66;7438:5;7435:77;7432:103;;7515:18;;:::i;:::-;7432:103;7562:1;7555:5;7551:13;7544:20;;7337:233;;;:::o;7576:169::-;7660:11;7694:6;7689:3;7682:19;7734:4;7729:3;7725:14;7710:29;;7576:169;;;;:::o;7751:225::-;7891:34;7887:1;7879:6;7875:14;7868:58;7960:8;7955:2;7947:6;7943:15;7936:33;7751:225;:::o;7982:366::-;8124:3;8145:67;8209:2;8204:3;8145:67;:::i;:::-;8138:74;;8221:93;8310:3;8221:93;:::i;:::-;8339:2;8334:3;8330:12;8323:19;;7982:366;;;:::o;8354:419::-;8520:4;8558:2;8547:9;8543:18;8535:26;;8607:9;8601:4;8597:20;8593:1;8582:9;8578:17;8571:47;8635:131;8761:4;8635:131;:::i;:::-;8627:139;;8354:419;;;:::o;8779:182::-;8919:34;8915:1;8907:6;8903:14;8896:58;8779:182;:::o;8967:366::-;9109:3;9130:67;9194:2;9189:3;9130:67;:::i;:::-;9123:74;;9206:93;9295:3;9206:93;:::i;:::-;9324:2;9319:3;9315:12;9308:19;;8967:366;;;:::o;9339:419::-;9505:4;9543:2;9532:9;9528:18;9520:26;;9592:9;9586:4;9582:20;9578:1;9567:9;9563:17;9556:47;9620:131;9746:4;9620:131;:::i;:::-;9612:139;;9339:419;;;:::o;9764:553::-;9941:4;9979:3;9968:9;9964:19;9956:27;;9993:71;10061:1;10050:9;10046:17;10037:6;9993:71;:::i;:::-;10074:72;10142:2;10131:9;10127:18;10118:6;10074:72;:::i;:::-;10156;10224:2;10213:9;10209:18;10200:6;10156:72;:::i;:::-;10238;10306:2;10295:9;10291:18;10282:6;10238:72;:::i;:::-;9764:553;;;;;;;:::o;10323:724::-;10400:4;10406:6;10462:11;10449:25;10562:1;10556:4;10552:12;10541:8;10525:14;10521:29;10517:48;10497:18;10493:73;10483:168;;10570:79;;:::i;:::-;10483:168;10682:18;10672:8;10668:33;10660:41;;10734:4;10721:18;10711:28;;10762:18;10754:6;10751:30;10748:117;;;10784:79;;:::i;:::-;10748:117;10892:2;10886:4;10882:13;10874:21;;10949:4;10941:6;10937:17;10921:14;10917:38;10911:4;10907:49;10904:136;;;10959:79;;:::i;:::-;10904:136;10413:634;10323:724;;;;;:::o;11053:143::-;11110:5;11141:6;11135:13;11126:22;;11157:33;11184:5;11157:33;:::i;:::-;11053:143;;;;:::o;11202:351::-;11272:6;11321:2;11309:9;11300:7;11296:23;11292:32;11289:119;;;11327:79;;:::i;:::-;11289:119;11447:1;11472:64;11528:7;11519:6;11508:9;11504:22;11472:64;:::i;:::-;11462:74;;11418:128;11202:351;;;;:::o;11559:442::-;11708:4;11746:2;11735:9;11731:18;11723:26;;11759:71;11827:1;11816:9;11812:17;11803:6;11759:71;:::i;:::-;11840:72;11908:2;11897:9;11893:18;11884:6;11840:72;:::i;:::-;11922;11990:2;11979:9;11975:18;11966:6;11922:72;:::i;:::-;11559:442;;;;;;:::o;12007:148::-;12109:11;12146:3;12131:18;;12007:148;;;;:::o;12161:214::-;12301:66;12297:1;12289:6;12285:14;12278:90;12161:214;:::o;12381:402::-;12541:3;12562:85;12644:2;12639:3;12562:85;:::i;:::-;12555:92;;12656:93;12745:3;12656:93;:::i;:::-;12774:2;12769:3;12765:12;12758:19;;12381:402;;;:::o;12789:77::-;12826:7;12855:5;12844:16;;12789:77;;;:::o;12872:79::-;12911:7;12940:5;12929:16;;12872:79;;;:::o;12957:157::-;13062:45;13082:24;13100:5;13082:24;:::i;:::-;13062:45;:::i;:::-;13057:3;13050:58;12957:157;;:::o;13120:522::-;13333:3;13355:148;13499:3;13355:148;:::i;:::-;13348:155;;13513:75;13584:3;13575:6;13513:75;:::i;:::-;13613:2;13608:3;13604:12;13597:19;;13633:3;13626:10;;13120:522;;;;:::o;13648:180::-;13696:77;13693:1;13686:88;13793:4;13790:1;13783:15;13817:4;13814:1;13807:15;13834:174;13974:26;13970:1;13962:6;13958:14;13951:50;13834:174;:::o;14014:366::-;14156:3;14177:67;14241:2;14236:3;14177:67;:::i;:::-;14170:74;;14253:93;14342:3;14253:93;:::i;:::-;14371:2;14366:3;14362:12;14355:19;;14014:366;;;:::o;14386:419::-;14552:4;14590:2;14579:9;14575:18;14567:26;;14639:9;14633:4;14629:20;14625:1;14614:9;14610:17;14603:47;14667:131;14793:4;14667:131;:::i;:::-;14659:139;;14386:419;;;:::o;14811:181::-;14951:33;14947:1;14939:6;14935:14;14928:57;14811:181;:::o;14998:366::-;15140:3;15161:67;15225:2;15220:3;15161:67;:::i;:::-;15154:74;;15237:93;15326:3;15237:93;:::i;:::-;15355:2;15350:3;15346:12;15339:19;;14998:366;;;:::o;15370:419::-;15536:4;15574:2;15563:9;15559:18;15551:26;;15623:9;15617:4;15613:20;15609:1;15598:9;15594:17;15587:47;15651:131;15777:4;15651:131;:::i;:::-;15643:139;;15370:419;;;:::o;15795:221::-;15935:34;15931:1;15923:6;15919:14;15912:58;16004:4;15999:2;15991:6;15987:15;15980:29;15795:221;:::o;16022:366::-;16164:3;16185:67;16249:2;16244:3;16185:67;:::i;:::-;16178:74;;16261:93;16350:3;16261:93;:::i;:::-;16379:2;16374:3;16370:12;16363:19;;16022:366;;;:::o;16394:419::-;16560:4;16598:2;16587:9;16583:18;16575:26;;16647:9;16641:4;16637:20;16633:1;16622:9;16618:17;16611:47;16675:131;16801:4;16675:131;:::i;:::-;16667:139;;16394:419;;;:::o;16819:118::-;16906:24;16924:5;16906:24;:::i;:::-;16901:3;16894:37;16819:118;;:::o;16943:86::-;16978:7;17018:4;17011:5;17007:16;16996:27;;16943:86;;;:::o;17035:112::-;17118:22;17134:5;17118:22;:::i;:::-;17113:3;17106:35;17035:112;;:::o;17153:545::-;17326:4;17364:3;17353:9;17349:19;17341:27;;17378:71;17446:1;17435:9;17431:17;17422:6;17378:71;:::i;:::-;17459:68;17523:2;17512:9;17508:18;17499:6;17459:68;:::i;:::-;17537:72;17605:2;17594:9;17590:18;17581:6;17537:72;:::i;:::-;17619;17687:2;17676:9;17672:18;17663:6;17619:72;:::i;:::-;17153:545;;;;;;;:::o
Swarm Source
ipfs://e20e86db7c7c0efdd7bb687a46056ae5110c4b65aee7f87842f8ff6c12a08bf8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.