Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- MXAlliance
- Optimization enabled
- true
- Compiler version
- v0.8.9+commit.e5eed63a
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2022-11-25T04:12:19.027856Z
Contract source code
// Sources flattened with hardhat v2.12.2 https://hardhat.org // File @openzeppelin/contracts/utils/Context.sol@v4.8.0 // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File @openzeppelin/contracts/access/Ownable.sol@v4.8.0 // 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/math/Math.sol@v4.8.0 // 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/Strings.sol@v4.8.0 // 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/utils/Address.sol@v4.8.0 // 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/IERC165.sol@v4.8.0 // 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/IERC1155Receiver.sol@v4.8.0 // 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/token/ERC1155/IERC1155.sol@v4.8.0 // 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/utils/introspection/ERC165.sol@v4.8.0 // 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/extensions/IERC1155MetadataURI.sol@v4.8.0 // 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/ERC1155.sol@v4.8.0 // 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/ERC1155URIStorage.sol@v4.8.0 // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) pragma solidity ^0.8.0; /** * @dev ERC1155 token with storage based token URI management. * Inspired by the ERC721URIStorage extension * * _Available since v4.6._ */ abstract contract ERC1155URIStorage is ERC1155 { using Strings for uint256; // Optional base URI string private _baseURI = ""; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the concatenation of the `_baseURI` * and the token-specific uri if the latter is set * * This enables the following behaviors: * * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation * of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` * is empty per default); * * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` * which in most cases will contain `ERC1155._uri`; * * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a * uri value set, then the result is empty. */ function uri(uint256 tokenId) public view virtual override returns (string memory) { string memory tokenURI = _tokenURIs[tokenId]; // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); } /** * @dev Sets `tokenURI` as the tokenURI of `tokenId`. */ function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { _tokenURIs[tokenId] = tokenURI; emit URI(uri(tokenId), tokenId); } /** * @dev Sets `baseURI` as the `_baseURI` for all tokens */ function _setBaseURI(string memory baseURI) internal virtual { _baseURI = baseURI; } } // File @openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol@v4.8.0 // 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 contracts/MXAlliance.sol pragma solidity ^0.8.9; contract MXAlliance is Ownable, ERC1155URIStorage, ERC1155Supply { string public constant name = "MarginX MXAlliance"; string public constant symbol = "MXA"; constructor() ERC1155("") { _setBaseURI("https://gateway.pinata.cloud/ipfs/QmPULwtwuYVhJKtnVxuWtFrep7h1Wt5NPgaW2mq324PSfw/"); } function uri(uint256 tokenId) public view override(ERC1155, ERC1155URIStorage) returns (string memory) { return ERC1155URIStorage.uri(tokenId); } function mint(address account, uint256 id, uint256 amount, bytes memory data) public onlyOwner { _mint(account, id, amount, data); } function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyOwner { _mintBatch(to, ids, amounts, data); } function setURI(uint256 tokenId, string memory tokenURI) public onlyOwner { _setURI(tokenId, tokenURI); } function setBaseURI(string memory baseUri) public onlyOwner { _setBaseURI(baseUri); } function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal override(ERC1155, ERC1155Supply) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TransferBatch","inputs":[{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256[]","name":"ids","internalType":"uint256[]","indexed":false},{"type":"uint256[]","name":"values","internalType":"uint256[]","indexed":false}],"anonymous":false},{"type":"event","name":"TransferSingle","inputs":[{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"id","internalType":"uint256","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"URI","inputs":[{"type":"string","name":"value","internalType":"string","indexed":false},{"type":"uint256","name":"id","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"balanceOfBatch","inputs":[{"type":"address[]","name":"accounts","internalType":"address[]"},{"type":"uint256[]","name":"ids","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"exists","inputs":[{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mint","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mintBatch","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256[]","name":"ids","internalType":"uint256[]"},{"type":"uint256[]","name":"amounts","internalType":"uint256[]"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeBatchTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256[]","name":"ids","internalType":"uint256[]"},{"type":"uint256[]","name":"amounts","internalType":"uint256[]"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBaseURI","inputs":[{"type":"string","name":"baseUri","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"string","name":"tokenURI","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"uri","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]}]
Contract Creation Code
0x60a06040819052600060808190526200001b91600491620000f3565b503480156200002957600080fd5b5060408051602081019091526000815262000044336200007a565b6200004f81620000ca565b50620000746040518060800160405280605181526020016200213360519139620000e3565b620001d6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8051620000df906003906020840190620000f3565b5050565b8051620000df9060049060208401905b828054620001019062000199565b90600052602060002090601f01602090048101928262000125576000855562000170565b82601f106200014057805160ff191683800117855562000170565b8280016001018555821562000170579182015b828111156200017057825182559160200191906001019062000153565b506200017e92915062000182565b5090565b5b808211156200017e576000815560010162000183565b600181811c90821680620001ae57607f821691505b60208210811415620001d057634e487b7160e01b600052602260045260246000fd5b50919050565b611f4d80620001e66000396000f3fe608060405234801561001057600080fd5b50600436106101205760003560e01c8063715018a6116100ad578063a22cb46511610071578063a22cb465146102a7578063bd85b039146102ba578063e985e9c5146102da578063f242432a14610316578063f2fde38b1461032957600080fd5b8063715018a61461023c578063731133e914610244578063862440e2146102575780638da5cb5b1461026a57806395d89b411461028557600080fd5b80631f7fdffa116100f45780631f7fdffa146101bf5780632eb2c2d6146101d45780634e1273f4146101e75780634f558e791461020757806355f804b31461022957600080fd5b8062fdd58e1461012557806301ffc9a71461014b57806306fdde031461016e5780630e89341c146101ac575b600080fd5b61013861013336600461143a565b61033c565b6040519081526020015b60405180910390f35b61015e61015936600461147a565b6103d4565b6040519015158152602001610142565b61019f604051806040016040528060128152602001714d617267696e58204d58416c6c69616e636560701b81525081565b60405161014291906114ef565b61019f6101ba366004611502565b610426565b6101d26101cd366004611667565b610431565b005b6101d26101e2366004611700565b61044b565b6101fa6101f53660046117aa565b610497565b60405161014291906118b0565b61015e610215366004611502565b600090815260066020526040902054151590565b6101d26102373660046118c3565b6105c1565b6101d26105d5565b6101d2610252366004611900565b6105e9565b6101d2610265366004611955565b6105fd565b6000546040516001600160a01b039091168152602001610142565b61019f604051806040016040528060038152602001624d584160e81b81525081565b6101d26102b5366004611992565b610613565b6101386102c8366004611502565b60009081526006602052604090205490565b61015e6102e83660046119ce565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b6101d2610324366004611a01565b61061e565b6101d2610337366004611a66565b610663565b60006001600160a01b0383166103ac5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060009081526001602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061040557506001600160e01b031982166303a24d0760e21b145b8061042057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060610420826106d9565b6104396107b9565b61044584848484610813565b50505050565b6001600160a01b038516331480610467575061046785336102e8565b6104835760405162461bcd60e51b81526004016103a390611a81565b610490858585858561096e565b5050505050565b606081518351146104fc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016103a3565b6000835167ffffffffffffffff8111156105185761051861151b565b604051908082528060200260200182016040528015610541578160200160208202803683370190505b50905060005b84518110156105b95761058c85828151811061056557610565611acf565b602002602001015185838151811061057f5761057f611acf565b602002602001015161033c565b82828151811061059e5761059e611acf565b60209081029190910101526105b281611afb565b9050610547565b509392505050565b6105c96107b9565b6105d281610b1b565b50565b6105dd6107b9565b6105e76000610b2e565b565b6105f16107b9565b61044584848484610b7e565b6106056107b9565b61060f8282610c69565b5050565b61060f338383610ccd565b6001600160a01b03851633148061063a575061063a85336102e8565b6106565760405162461bcd60e51b81526004016103a390611a81565b6104908585858585610dae565b61066b6107b9565b6001600160a01b0381166106d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103a3565b6105d281610b2e565b6000818152600560205260408120805460609291906106f790611b16565b80601f016020809104026020016040519081016040528092919081815260200182805461072390611b16565b80156107705780601f1061074557610100808354040283529160200191610770565b820191906000526020600020905b81548152906001019060200180831161075357829003601f168201915b50505050509050600081511161078e5761078983610eea565b6107b2565b6004816040516020016107a2929190611b6d565b6040516020818303038152906040525b9392505050565b6000546001600160a01b031633146105e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a3565b6001600160a01b0384166108395760405162461bcd60e51b81526004016103a390611c14565b815183511461085a5760405162461bcd60e51b81526004016103a390611c55565b3361086a81600087878787610f7e565b60005b84518110156109065783818151811061088857610888611acf565b6020026020010151600160008784815181106108a6576108a6611acf565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546108ee9190611c9d565b909155508190506108fe81611afb565b91505061086d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610957929190611cb5565b60405180910390a461049081600087878787610f8c565b815183511461098f5760405162461bcd60e51b81526004016103a390611c55565b6001600160a01b0384166109b55760405162461bcd60e51b81526004016103a390611cda565b336109c4818787878787610f7e565b60005b8451811015610aad5760008582815181106109e4576109e4611acf565b602002602001015190506000858381518110610a0257610a02611acf565b60209081029190910181015160008481526001835260408082206001600160a01b038e168352909352919091205490915081811015610a535760405162461bcd60e51b81526004016103a390611d1f565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610a92908490611c9d565b9250508190555050505080610aa690611afb565b90506109c7565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610afd929190611cb5565b60405180910390a4610b13818787878787610f8c565b505050505050565b805161060f906004906020840190611385565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038416610ba45760405162461bcd60e51b81526004016103a390611c14565b336000610bb0856110f7565b90506000610bbd856110f7565b9050610bce83600089858589610f7e565b60008681526001602090815260408083206001600160a01b038b16845290915281208054879290610c00908490611c9d565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610c6083600089898989611142565b50505050505050565b60008281526005602090815260409091208251610c8892840190611385565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b610cb484610426565b604051610cc191906114ef565b60405180910390a25050565b816001600160a01b0316836001600160a01b03161415610d415760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016103a3565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610dd45760405162461bcd60e51b81526004016103a390611cda565b336000610de0856110f7565b90506000610ded856110f7565b9050610dfd838989858589610f7e565b60008681526001602090815260408083206001600160a01b038c16845290915290205485811015610e405760405162461bcd60e51b81526004016103a390611d1f565b60008781526001602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610e7f908490611c9d565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610edf848a8a8a8a8a611142565b505050505050505050565b606060038054610ef990611b16565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2590611b16565b8015610f725780601f10610f4757610100808354040283529160200191610f72565b820191906000526020600020905b815481529060010190602001808311610f5557829003601f168201915b50505050509050919050565b610b1386868686868661120c565b6001600160a01b0384163b15610b135760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610fd09089908990889088908890600401611d69565b602060405180830381600087803b158015610fea57600080fd5b505af192505050801561101a575060408051601f3d908101601f1916820190925261101791810190611dc7565b60015b6110c757611026611de4565b806308c379a01415611060575061103b611e00565b806110465750611062565b8060405162461bcd60e51b81526004016103a391906114ef565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016103a3565b6001600160e01b0319811663bc197c8160e01b14610c605760405162461bcd60e51b81526004016103a390611e8a565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061113157611131611acf565b602090810291909101015292915050565b6001600160a01b0384163b15610b135760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906111869089908990889088908890600401611ed2565b602060405180830381600087803b1580156111a057600080fd5b505af19250505080156111d0575060408051601f3d908101601f191682019092526111cd91810190611dc7565b60015b6111dc57611026611de4565b6001600160e01b0319811663f23a6e6160e01b14610c605760405162461bcd60e51b81526004016103a390611e8a565b6001600160a01b0385166112935760005b83518110156112915782818151811061123857611238611acf565b60200260200101516006600086848151811061125657611256611acf565b60200260200101518152602001908152602001600020600082825461127b9190611c9d565b9091555061128a905081611afb565b905061121d565b505b6001600160a01b038416610b135760005b8351811015610c605760008482815181106112c1576112c1611acf565b6020026020010151905060008483815181106112df576112df611acf565b60200260200101519050600060066000848152602001908152602001600020549050818110156113625760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016103a3565b6000928352600660205260409092209103905561137e81611afb565b90506112a4565b82805461139190611b16565b90600052602060002090601f0160209004810192826113b357600085556113f9565b82601f106113cc57805160ff19168380011785556113f9565b828001600101855582156113f9579182015b828111156113f95782518255916020019190600101906113de565b50611405929150611409565b5090565b5b80821115611405576000815560010161140a565b80356001600160a01b038116811461143557600080fd5b919050565b6000806040838503121561144d57600080fd5b6114568361141e565b946020939093013593505050565b6001600160e01b0319811681146105d257600080fd5b60006020828403121561148c57600080fd5b81356107b281611464565b60005b838110156114b257818101518382015260200161149a565b838111156104455750506000910152565b600081518084526114db816020860160208601611497565b601f01601f19169290920160200192915050565b6020815260006107b260208301846114c3565b60006020828403121561151457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156115575761155761151b565b6040525050565b600067ffffffffffffffff8211156115785761157861151b565b5060051b60200190565b600082601f83011261159357600080fd5b813560206115a08261155e565b6040516115ad8282611531565b83815260059390931b85018201928281019150868411156115cd57600080fd5b8286015b848110156115e857803583529183019183016115d1565b509695505050505050565b600082601f83011261160457600080fd5b813567ffffffffffffffff81111561161e5761161e61151b565b604051611635601f8301601f191660200182611531565b81815284602083860101111561164a57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561167d57600080fd5b6116868561141e565b9350602085013567ffffffffffffffff808211156116a357600080fd5b6116af88838901611582565b945060408701359150808211156116c557600080fd5b6116d188838901611582565b935060608701359150808211156116e757600080fd5b506116f4878288016115f3565b91505092959194509250565b600080600080600060a0868803121561171857600080fd5b6117218661141e565b945061172f6020870161141e565b9350604086013567ffffffffffffffff8082111561174c57600080fd5b61175889838a01611582565b9450606088013591508082111561176e57600080fd5b61177a89838a01611582565b9350608088013591508082111561179057600080fd5b5061179d888289016115f3565b9150509295509295909350565b600080604083850312156117bd57600080fd5b823567ffffffffffffffff808211156117d557600080fd5b818501915085601f8301126117e957600080fd5b813560206117f68261155e565b6040516118038282611531565b83815260059390931b850182019282810191508984111561182357600080fd5b948201945b83861015611848576118398661141e565b82529482019490820190611828565b9650508601359250508082111561185e57600080fd5b5061186b85828601611582565b9150509250929050565b600081518084526020808501945080840160005b838110156118a557815187529582019590820190600101611889565b509495945050505050565b6020815260006107b26020830184611875565b6000602082840312156118d557600080fd5b813567ffffffffffffffff8111156118ec57600080fd5b6118f8848285016115f3565b949350505050565b6000806000806080858703121561191657600080fd5b61191f8561141e565b93506020850135925060408501359150606085013567ffffffffffffffff81111561194957600080fd5b6116f4878288016115f3565b6000806040838503121561196857600080fd5b82359150602083013567ffffffffffffffff81111561198657600080fd5b61186b858286016115f3565b600080604083850312156119a557600080fd5b6119ae8361141e565b9150602083013580151581146119c357600080fd5b809150509250929050565b600080604083850312156119e157600080fd5b6119ea8361141e565b91506119f86020840161141e565b90509250929050565b600080600080600060a08688031215611a1957600080fd5b611a228661141e565b9450611a306020870161141e565b93506040860135925060608601359150608086013567ffffffffffffffff811115611a5a57600080fd5b61179d888289016115f3565b600060208284031215611a7857600080fd5b6107b28261141e565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611b0f57611b0f611ae5565b5060010190565b600181811c90821680611b2a57607f821691505b60208210811415611b4b57634e487b7160e01b600052602260045260246000fd5b50919050565b60008151611b63818560208601611497565b9290920192915050565b600080845481600182811c915080831680611b8957607f831692505b6020808410821415611ba957634e487b7160e01b86526022600452602486fd5b818015611bbd5760018114611bce57611bfb565b60ff19861689528489019650611bfb565b60008b81526020902060005b86811015611bf35781548b820152908501908301611bda565b505084890196505b505050505050611c0b8185611b51565b95945050505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60008219821115611cb057611cb0611ae5565b500190565b604081526000611cc86040830185611875565b8281036020840152611c0b8185611875565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b0386811682528516602082015260a060408201819052600090611d9590830186611875565b8281036060840152611da78186611875565b90508281036080840152611dbb81856114c3565b98975050505050505050565b600060208284031215611dd957600080fd5b81516107b281611464565b600060033d1115611dfd5760046000803e5060005160e01c5b90565b600060443d1015611e0e5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611e3e57505050505090565b8285019150815181811115611e565750505050505090565b843d8701016020828501011115611e705750505050505090565b611e7f60208286010187611531565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611f0c908301846114c3565b97965050505050505056fea26469706673582212205d501e3524e476e455918c635de0fddd2c28e4002d67f67a095bb685ee67024a64736f6c6343000809003368747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d50554c777477755956684a4b746e5678755774467265703768315774354e50676157326d71333234505366772f
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101205760003560e01c8063715018a6116100ad578063a22cb46511610071578063a22cb465146102a7578063bd85b039146102ba578063e985e9c5146102da578063f242432a14610316578063f2fde38b1461032957600080fd5b8063715018a61461023c578063731133e914610244578063862440e2146102575780638da5cb5b1461026a57806395d89b411461028557600080fd5b80631f7fdffa116100f45780631f7fdffa146101bf5780632eb2c2d6146101d45780634e1273f4146101e75780634f558e791461020757806355f804b31461022957600080fd5b8062fdd58e1461012557806301ffc9a71461014b57806306fdde031461016e5780630e89341c146101ac575b600080fd5b61013861013336600461143a565b61033c565b6040519081526020015b60405180910390f35b61015e61015936600461147a565b6103d4565b6040519015158152602001610142565b61019f604051806040016040528060128152602001714d617267696e58204d58416c6c69616e636560701b81525081565b60405161014291906114ef565b61019f6101ba366004611502565b610426565b6101d26101cd366004611667565b610431565b005b6101d26101e2366004611700565b61044b565b6101fa6101f53660046117aa565b610497565b60405161014291906118b0565b61015e610215366004611502565b600090815260066020526040902054151590565b6101d26102373660046118c3565b6105c1565b6101d26105d5565b6101d2610252366004611900565b6105e9565b6101d2610265366004611955565b6105fd565b6000546040516001600160a01b039091168152602001610142565b61019f604051806040016040528060038152602001624d584160e81b81525081565b6101d26102b5366004611992565b610613565b6101386102c8366004611502565b60009081526006602052604090205490565b61015e6102e83660046119ce565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b6101d2610324366004611a01565b61061e565b6101d2610337366004611a66565b610663565b60006001600160a01b0383166103ac5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060009081526001602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061040557506001600160e01b031982166303a24d0760e21b145b8061042057506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060610420826106d9565b6104396107b9565b61044584848484610813565b50505050565b6001600160a01b038516331480610467575061046785336102e8565b6104835760405162461bcd60e51b81526004016103a390611a81565b610490858585858561096e565b5050505050565b606081518351146104fc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016103a3565b6000835167ffffffffffffffff8111156105185761051861151b565b604051908082528060200260200182016040528015610541578160200160208202803683370190505b50905060005b84518110156105b95761058c85828151811061056557610565611acf565b602002602001015185838151811061057f5761057f611acf565b602002602001015161033c565b82828151811061059e5761059e611acf565b60209081029190910101526105b281611afb565b9050610547565b509392505050565b6105c96107b9565b6105d281610b1b565b50565b6105dd6107b9565b6105e76000610b2e565b565b6105f16107b9565b61044584848484610b7e565b6106056107b9565b61060f8282610c69565b5050565b61060f338383610ccd565b6001600160a01b03851633148061063a575061063a85336102e8565b6106565760405162461bcd60e51b81526004016103a390611a81565b6104908585858585610dae565b61066b6107b9565b6001600160a01b0381166106d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103a3565b6105d281610b2e565b6000818152600560205260408120805460609291906106f790611b16565b80601f016020809104026020016040519081016040528092919081815260200182805461072390611b16565b80156107705780601f1061074557610100808354040283529160200191610770565b820191906000526020600020905b81548152906001019060200180831161075357829003601f168201915b50505050509050600081511161078e5761078983610eea565b6107b2565b6004816040516020016107a2929190611b6d565b6040516020818303038152906040525b9392505050565b6000546001600160a01b031633146105e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103a3565b6001600160a01b0384166108395760405162461bcd60e51b81526004016103a390611c14565b815183511461085a5760405162461bcd60e51b81526004016103a390611c55565b3361086a81600087878787610f7e565b60005b84518110156109065783818151811061088857610888611acf565b6020026020010151600160008784815181106108a6576108a6611acf565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546108ee9190611c9d565b909155508190506108fe81611afb565b91505061086d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610957929190611cb5565b60405180910390a461049081600087878787610f8c565b815183511461098f5760405162461bcd60e51b81526004016103a390611c55565b6001600160a01b0384166109b55760405162461bcd60e51b81526004016103a390611cda565b336109c4818787878787610f7e565b60005b8451811015610aad5760008582815181106109e4576109e4611acf565b602002602001015190506000858381518110610a0257610a02611acf565b60209081029190910181015160008481526001835260408082206001600160a01b038e168352909352919091205490915081811015610a535760405162461bcd60e51b81526004016103a390611d1f565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610a92908490611c9d565b9250508190555050505080610aa690611afb565b90506109c7565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610afd929190611cb5565b60405180910390a4610b13818787878787610f8c565b505050505050565b805161060f906004906020840190611385565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038416610ba45760405162461bcd60e51b81526004016103a390611c14565b336000610bb0856110f7565b90506000610bbd856110f7565b9050610bce83600089858589610f7e565b60008681526001602090815260408083206001600160a01b038b16845290915281208054879290610c00908490611c9d565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610c6083600089898989611142565b50505050505050565b60008281526005602090815260409091208251610c8892840190611385565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b610cb484610426565b604051610cc191906114ef565b60405180910390a25050565b816001600160a01b0316836001600160a01b03161415610d415760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016103a3565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610dd45760405162461bcd60e51b81526004016103a390611cda565b336000610de0856110f7565b90506000610ded856110f7565b9050610dfd838989858589610f7e565b60008681526001602090815260408083206001600160a01b038c16845290915290205485811015610e405760405162461bcd60e51b81526004016103a390611d1f565b60008781526001602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610e7f908490611c9d565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610edf848a8a8a8a8a611142565b505050505050505050565b606060038054610ef990611b16565b80601f0160208091040260200160405190810160405280929190818152602001828054610f2590611b16565b8015610f725780601f10610f4757610100808354040283529160200191610f72565b820191906000526020600020905b815481529060010190602001808311610f5557829003601f168201915b50505050509050919050565b610b1386868686868661120c565b6001600160a01b0384163b15610b135760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610fd09089908990889088908890600401611d69565b602060405180830381600087803b158015610fea57600080fd5b505af192505050801561101a575060408051601f3d908101601f1916820190925261101791810190611dc7565b60015b6110c757611026611de4565b806308c379a01415611060575061103b611e00565b806110465750611062565b8060405162461bcd60e51b81526004016103a391906114ef565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016103a3565b6001600160e01b0319811663bc197c8160e01b14610c605760405162461bcd60e51b81526004016103a390611e8a565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061113157611131611acf565b602090810291909101015292915050565b6001600160a01b0384163b15610b135760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906111869089908990889088908890600401611ed2565b602060405180830381600087803b1580156111a057600080fd5b505af19250505080156111d0575060408051601f3d908101601f191682019092526111cd91810190611dc7565b60015b6111dc57611026611de4565b6001600160e01b0319811663f23a6e6160e01b14610c605760405162461bcd60e51b81526004016103a390611e8a565b6001600160a01b0385166112935760005b83518110156112915782818151811061123857611238611acf565b60200260200101516006600086848151811061125657611256611acf565b60200260200101518152602001908152602001600020600082825461127b9190611c9d565b9091555061128a905081611afb565b905061121d565b505b6001600160a01b038416610b135760005b8351811015610c605760008482815181106112c1576112c1611acf565b6020026020010151905060008483815181106112df576112df611acf565b60200260200101519050600060066000848152602001908152602001600020549050818110156113625760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016103a3565b6000928352600660205260409092209103905561137e81611afb565b90506112a4565b82805461139190611b16565b90600052602060002090601f0160209004810192826113b357600085556113f9565b82601f106113cc57805160ff19168380011785556113f9565b828001600101855582156113f9579182015b828111156113f95782518255916020019190600101906113de565b50611405929150611409565b5090565b5b80821115611405576000815560010161140a565b80356001600160a01b038116811461143557600080fd5b919050565b6000806040838503121561144d57600080fd5b6114568361141e565b946020939093013593505050565b6001600160e01b0319811681146105d257600080fd5b60006020828403121561148c57600080fd5b81356107b281611464565b60005b838110156114b257818101518382015260200161149a565b838111156104455750506000910152565b600081518084526114db816020860160208601611497565b601f01601f19169290920160200192915050565b6020815260006107b260208301846114c3565b60006020828403121561151457600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156115575761155761151b565b6040525050565b600067ffffffffffffffff8211156115785761157861151b565b5060051b60200190565b600082601f83011261159357600080fd5b813560206115a08261155e565b6040516115ad8282611531565b83815260059390931b85018201928281019150868411156115cd57600080fd5b8286015b848110156115e857803583529183019183016115d1565b509695505050505050565b600082601f83011261160457600080fd5b813567ffffffffffffffff81111561161e5761161e61151b565b604051611635601f8301601f191660200182611531565b81815284602083860101111561164a57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561167d57600080fd5b6116868561141e565b9350602085013567ffffffffffffffff808211156116a357600080fd5b6116af88838901611582565b945060408701359150808211156116c557600080fd5b6116d188838901611582565b935060608701359150808211156116e757600080fd5b506116f4878288016115f3565b91505092959194509250565b600080600080600060a0868803121561171857600080fd5b6117218661141e565b945061172f6020870161141e565b9350604086013567ffffffffffffffff8082111561174c57600080fd5b61175889838a01611582565b9450606088013591508082111561176e57600080fd5b61177a89838a01611582565b9350608088013591508082111561179057600080fd5b5061179d888289016115f3565b9150509295509295909350565b600080604083850312156117bd57600080fd5b823567ffffffffffffffff808211156117d557600080fd5b818501915085601f8301126117e957600080fd5b813560206117f68261155e565b6040516118038282611531565b83815260059390931b850182019282810191508984111561182357600080fd5b948201945b83861015611848576118398661141e565b82529482019490820190611828565b9650508601359250508082111561185e57600080fd5b5061186b85828601611582565b9150509250929050565b600081518084526020808501945080840160005b838110156118a557815187529582019590820190600101611889565b509495945050505050565b6020815260006107b26020830184611875565b6000602082840312156118d557600080fd5b813567ffffffffffffffff8111156118ec57600080fd5b6118f8848285016115f3565b949350505050565b6000806000806080858703121561191657600080fd5b61191f8561141e565b93506020850135925060408501359150606085013567ffffffffffffffff81111561194957600080fd5b6116f4878288016115f3565b6000806040838503121561196857600080fd5b82359150602083013567ffffffffffffffff81111561198657600080fd5b61186b858286016115f3565b600080604083850312156119a557600080fd5b6119ae8361141e565b9150602083013580151581146119c357600080fd5b809150509250929050565b600080604083850312156119e157600080fd5b6119ea8361141e565b91506119f86020840161141e565b90509250929050565b600080600080600060a08688031215611a1957600080fd5b611a228661141e565b9450611a306020870161141e565b93506040860135925060608601359150608086013567ffffffffffffffff811115611a5a57600080fd5b61179d888289016115f3565b600060208284031215611a7857600080fd5b6107b28261141e565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611b0f57611b0f611ae5565b5060010190565b600181811c90821680611b2a57607f821691505b60208210811415611b4b57634e487b7160e01b600052602260045260246000fd5b50919050565b60008151611b63818560208601611497565b9290920192915050565b600080845481600182811c915080831680611b8957607f831692505b6020808410821415611ba957634e487b7160e01b86526022600452602486fd5b818015611bbd5760018114611bce57611bfb565b60ff19861689528489019650611bfb565b60008b81526020902060005b86811015611bf35781548b820152908501908301611bda565b505084890196505b505050505050611c0b8185611b51565b95945050505050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60008219821115611cb057611cb0611ae5565b500190565b604081526000611cc86040830185611875565b8281036020840152611c0b8185611875565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b0386811682528516602082015260a060408201819052600090611d9590830186611875565b8281036060840152611da78186611875565b90508281036080840152611dbb81856114c3565b98975050505050505050565b600060208284031215611dd957600080fd5b81516107b281611464565b600060033d1115611dfd5760046000803e5060005160e01c5b90565b600060443d1015611e0e5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611e3e57505050505090565b8285019150815181811115611e565750505050505090565b843d8701016020828501011115611e705750505050505090565b611e7f60208286010187611531565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611f0c908301846114c3565b97965050505050505056fea26469706673582212205d501e3524e476e455918c635de0fddd2c28e4002d67f67a095bb685ee67024a64736f6c63430008090033