ERC-1155
Overview
Max Total Supply
1,417 ffcmc
Holders
346
Total Transfers
-
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CMCNFT
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import "./ERC1155Factory.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CMCNFT is ERC1155Factory { using Strings for uint256; /// @notice Address of the wallet used to sign the buy message address public secret; /// @notice Payment details struct struct Payment { uint256 amount; address token; } /// @notice Max supply for each token ID mapping(uint256 => uint256) public maxSupply; /// @notice Mint limit per wallet for each token ID mapping(uint256 => uint256) public mintLimitPerWallet; /// @notice Minted supply for each token ID mapping(uint256 => uint256) public mintedSupply; /// @notice Amount of tokens minted per wallet for each token ID mapping(uint256 => mapping(address => uint256)) public mintedPerWallet; /// @notice Amount of tokens available for each payment token for each token ID mapping(uint256 => mapping(address => uint256)) public paymentSupply; /// @notice Max supply for each payment token for each token ID mapping(uint256 => mapping(address => uint256)) public paymentMaxSupply; /// @notice Mapping for admins that can change the contract state mapping(address => bool) public admins; /// @notice Emit event when tokens are minted event Minted( address to, uint256[] ids, uint256[] values, Payment[] payments ); /// @notice Emit event when a sheet is set event SheetSet( uint256 maxSupply, uint256 mintLimitPerWallet, uint256[] ids, uint256[] paymentSupplies, address[] paymentTokens ); /// @notice Emit event when the secret wallet is set event SecretSet(address secret); /// @notice Emit event when an admin is added event AdminAdded(address admin, bool status); /// @notice Emit event when ETH is withdrawn event WithdrawETH(address to, uint256 amount); /// @notice Emit event when ERC20 tokens are withdrawn event WithdrawERC20(address to, address[] tokenAddresses); /// @notice Deploys the contract /// @param _name NFT name /// @param _symbol NFT symbol /// @param _uri Base uri /// @dev Create ERC1155 token constructor( string memory _name, string memory _symbol, string memory _uri ) ERC1155(_uri) Ownable(msg.sender) { name_ = _name; symbol_ = _symbol; } modifier onlyAdmin() { require( admins[msg.sender] || msg.sender == owner(), "onlyAdmin: unauthorized" ); _; } /// @notice Mint NFTs /// @param ids Array of NFT IDs to mint /// @param values Array of NFT amounts to mint /// @param paymentTokens Array of payment tokens addresses /// @param payments Array of payment tokens amounts /// @param signature Signature of the buy message function buy( uint256[] memory ids, uint256[] memory values, address[] memory paymentTokens, Payment[] memory payments, bytes memory signature ) public payable { require( ids.length == values.length, "buy: ids and values length mismatch" ); require( ids.length == paymentTokens.length, "buy: ids and paymentTokens length mismatch" ); bytes32 freshHash = keccak256( abi.encode( ids, values, paymentTokens, payments, msg.value, msg.sender ) ); require( _verifyHashSignature(freshHash, signature), "buy: invalid signature" ); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 value = values[i]; address token = paymentTokens[i]; require(value > 0, "buy: invalid value"); require( mintedSupply[id] + value <= maxSupply[id], "buy: max supply reached" ); require( mintedPerWallet[id][msg.sender] + value <= mintLimitPerWallet[id], "buy: max mint per wallet reached" ); require( paymentSupply[id][token] + value <= paymentMaxSupply[id][token], "buy: max supply for token reached" ); mintedSupply[id] += value; mintedPerWallet[id][msg.sender] += value; paymentSupply[id][token] += value; } // ETH payments are verified by the signature (msg.value) for (uint256 i = 0; i < payments.length; i++) { Payment memory payment = payments[i]; address token = payment.token; uint256 amount = payment.amount; IERC20(token).transferFrom(msg.sender, address(this), amount); } _mintBatch(msg.sender, ids, values, ""); emit Minted(msg.sender, ids, values, payments); } /// @notice Set Sheet mint details /// @param _maxSupply Max supply for the sheet /// @param _mintLimitPerWallet Mint limit per wallet for the sheet /// @param _ids Sheet IDs /// @param _paymentSupplies Array of payment tokens max supply /// @param _paymentTokens Array of payment tokens addresses function setSheet( uint256 _maxSupply, uint256 _mintLimitPerWallet, uint256[] memory _ids, uint256[] memory _paymentSupplies, address[] memory _paymentTokens ) public onlyAdmin { for (uint256 i = 0; i < _ids.length; i++) { uint256 _id = _ids[i]; require( _maxSupply > mintedSupply[_id], "setSheet: invalid maxSupply" ); maxSupply[_id] = _maxSupply; mintLimitPerWallet[_id] = _mintLimitPerWallet; for (uint256 j = 0; j < _paymentTokens.length; j++) { address token = _paymentTokens[j]; paymentMaxSupply[_id][token] = _paymentSupplies[j]; } } emit SheetSet( _maxSupply, _mintLimitPerWallet, _ids, _paymentSupplies, _paymentTokens ); } /// @notice Set the wallet used to sign the buy message function setSecret(address _secret) public onlyAdmin { secret = _secret; emit SecretSet(_secret); } function setURI(string memory baseURI) external onlyOwner { _setURI(baseURI); } /** * @notice returns the metadata uri for a given id * * @param _id the card id to return metadata for */ function uri(uint256 _id) public view override returns (string memory) { return string(abi.encodePacked(super.uri(_id), _id.toString())); } /// @notice Add or remove an admin /// @param _admin Address of the admin /// @param _status Status of the admin function setAdmin(address _admin, bool _status) public onlyOwner { admins[_admin] = _status; emit AdminAdded(_admin, _status); } /// @notice Send ETH to specific address /// @param to Address to send the funds /// @param amount ETH amount to be sent /// @dev Can only be called by the contract owner function withdrawETH(address to, uint256 amount) public onlyOwner { require(amount <= address(this).balance, "Insufficient funds"); (bool success, ) = to.call{value: amount}(""); require(success, "withdrawETH: ETH transfer failed"); emit WithdrawETH(to, amount); } /// @notice Send ERC20 tokens to specific address /// @param to Address to send the funds /// @param tokenAddresses Addresses of the tokens to be sent /// @dev Can only be called by the contract owner function withdrawERC20( address to, address[] memory tokenAddresses ) public onlyOwner { for (uint256 i = 0; i < tokenAddresses.length; i++) { IERC20 token = IERC20(tokenAddresses[i]); uint256 tokenBalance = token.balanceOf(address(this)); if (tokenBalance > 0) { token.transfer(to, tokenBalance); } } emit WithdrawERC20(to, tokenAddresses); } /// @notice Verify that message is signed by secret wallet function _verifyHashSignature( bytes32 freshHash, bytes memory signature ) internal view returns (bool) { bytes32 hash = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", freshHash) ); bytes32 r; bytes32 s; uint8 v; if (signature.length != 65) { return false; } assembly { r := mload(add(signature, 32)) s := mload(add(signature, 64)) v := byte(0, mload(add(signature, 96))) } if (v < 27) { v += 27; } address signer = address(0); if (v == 27 || v == 28) { // solium-disable-next-line arg-overflow signer = ecrecover(hash, v, r, s); } return secret == signer; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; abstract contract ERC1155Factory is ERC1155, Ownable { string name_; string symbol_; function name() public view returns (string memory) { return name_; } function symbol() public view returns (string memory) { return symbol_; } function burn(address account, uint256 id, uint256 value) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner or approved" ); _burn(account, id, value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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 towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (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 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 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. uint256 twos = denominator & (0 - denominator); 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 (unsignedRoundsUp(rounding) && 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 * towards zero. * * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * 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 256, 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @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), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @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) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } 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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; import {Math} from "./math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { using StorageSlot for bytes32; /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { uint256 low = 0; uint256 high = array.length; if (high == 0) { return 0; } while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds towards zero (it does integer division with truncation). if (unsafeAccess(array, mid).value > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && unsafeAccess(array, low - 1).value == element) { return low - 1; } else { return low; } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getAddressSlot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getBytes32Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getUint256Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Interface that must be implemented by smart contracts in order to receive * ERC-1155 token transfers. */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` amount of tokens of 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 value 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 a `value` amount of tokens of type `id` from `from` to `to`. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155Received} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * 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 `value` 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 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * * - `ids` and `values` 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 values, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.20; import {IERC1155} from "./IERC1155.sol"; import {IERC1155Receiver} from "./IERC1155Receiver.sol"; import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol"; import {Context} from "../../utils/Context.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {Arrays} from "../../utils/Arrays.sol"; import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @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 */ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors { using Arrays for uint256[]; using Arrays for address[]; mapping(uint256 id => mapping(address account => uint256)) private _balances; mapping(address account => mapping(address operator => 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 /* id */) public view virtual returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. */ function balanceOf(address account, uint256 id) public view virtual returns (uint256) { 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 returns (uint256[] memory) { if (accounts.length != ids.length) { revert ERC1155InvalidArrayLength(ids.length, accounts.length); } uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i)); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeTransferFrom(from, to, id, value, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeBatchTransferFrom(from, to, ids, values, data); } /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` * (or `to`) is the zero address. * * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. * * Requirements: * * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} * or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. * - `ids` and `values` must have the same length. * * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead. */ function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual { if (ids.length != values.length) { revert ERC1155InvalidArrayLength(ids.length, values.length); } address operator = _msgSender(); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids.unsafeMemoryAccess(i); uint256 value = values.unsafeMemoryAccess(i); if (from != address(0)) { uint256 fromBalance = _balances[id][from]; if (fromBalance < value) { revert ERC1155InsufficientBalance(from, fromBalance, value, id); } unchecked { // Overflow not possible: value <= fromBalance _balances[id][from] = fromBalance - value; } } if (to != address(0)) { _balances[id][to] += value; } } if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); emit TransferSingle(operator, from, to, id, value); } else { emit TransferBatch(operator, from, to, ids, values); } } /** * @dev Version of {_update} that performs the token acceptance check by calling * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it * contains code (eg. is a smart contract at the moment of execution). * * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any * update to the contract state after this function would break the check-effect-interaction pattern. Consider * overriding {_update} instead. */ function _updateWithAcceptanceCheck( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { _update(from, to, ids, values); if (to != address(0)) { address operator = _msgSender(); if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data); } else { _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data); } } } /** * @dev Transfers a `value` 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 `value` 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 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, to, ids, values, 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. * - `ids` and `values` must have the same length. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, to, ids, values, 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 values 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 a `value` amount of tokens of 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 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `values` must have the same length. * - `to` cannot be the zero address. * - 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 values, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev Destroys a `value` amount of tokens of type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. */ function _burn(address from, uint256 id, uint256 value) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. * - `ids` and `values` must have the same length. */ function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the zero address. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC1155InvalidOperator(address(0)); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address * if it contains code at the moment of execution. */ function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address * if it contains code at the moment of execution. */ function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Creates an array in memory with only one value for each of the elements provided. */ function _asSingletonArrays( uint256 element1, uint256 element2 ) private pure returns (uint256[] memory array1, uint256[] memory array2) { /// @solidity memory-safe-assembly assembly { // Load the free memory pointer array1 := mload(0x40) // Set array length to 1 mstore(array1, 1) // Store the single element at the next word after the length (where content starts) mstore(add(array1, 0x20), element1) // Repeat for next array locating it right after the first array array2 := add(array1, 0x40) mstore(array2, 1) mstore(add(array2, 0x20), element2) // Update the free memory pointer by pointing after the second array mstore(0x40, add(array2, 0x40)) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "shanghai", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"AdminAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"indexed":false,"internalType":"struct CMCNFT.Payment[]","name":"payments","type":"tuple[]"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"secret","type":"address"}],"name":"SecretSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintLimitPerWallet","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"paymentSupplies","type":"uint256[]"},{"indexed":false,"internalType":"address[]","name":"paymentTokens","type":"address[]"}],"name":"SheetSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address[]","name":"tokenAddresses","type":"address[]"}],"name":"WithdrawERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawETH","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"admins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"address[]","name":"paymentTokens","type":"address[]"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct CMCNFT.Payment[]","name":"payments","type":"tuple[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintLimitPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"mintedPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"paymentMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"paymentSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secret","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_secret","type":"address"}],"name":"setSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_mintLimitPerWallet","type":"uint256"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_paymentSupplies","type":"uint256[]"},{"internalType":"address[]","name":"_paymentTokens","type":"address[]"}],"name":"setSheet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address[]","name":"tokenAddresses","type":"address[]"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801562000010575f80fd5b5060405162002ee338038062002ee38339810160408190526200003391620001c3565b33816200004081620000a2565b506001600160a01b0381166200006f57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6200007a81620000b4565b506004620000898482620002da565b506005620000988382620002da565b50505050620003a2565b6002620000b08282620002da565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011262000129575f80fd5b81516001600160401b038082111562000146576200014662000105565b604051601f8301601f19908116603f0116810190828211818310171562000171576200017162000105565b816040528381526020925086838588010111156200018d575f80fd5b5f91505b83821015620001b0578582018301518183018401529082019062000191565b5f93810190920192909252949350505050565b5f805f60608486031215620001d6575f80fd5b83516001600160401b0380821115620001ed575f80fd5b620001fb8783880162000119565b9450602086015191508082111562000211575f80fd5b6200021f8783880162000119565b9350604086015191508082111562000235575f80fd5b50620002448682870162000119565b9150509250925092565b600181811c908216806200026357607f821691505b6020821081036200028257634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115620002d5575f81815260208120601f850160051c81016020861015620002b05750805b601f850160051c820191505b81811015620002d157828155600101620002bc565b5050505b505050565b81516001600160401b03811115620002f657620002f662000105565b6200030e816200030784546200024e565b8462000288565b602080601f83116001811462000344575f84156200032c5750858301515b5f19600386901b1c1916600185901b178555620002d1565b5f85815260208120601f198616915b82811015620003745788860151825594840194600190910190840162000353565b50858210156200039257878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b612b3380620003b05f395ff3fe6080604052600436106101b9575f3560e01c80637ada0301116100f2578063a22cb46511610092578063e9a7484c11610062578063e9a7484c14610560578063f242432a1461057f578063f2fde38b1461059e578063f5298aca146105bd575f80fd5b8063a22cb465146104e4578063cc76c0cc14610503578063d1efd30d14610522578063e985e9c514610541575f80fd5b8063919956ef116100cd578063919956ef1461045b57806395d89b41146104865780639cc1c3491461049a5780639d2dcde7146104c5575f80fd5b80637ada0301146103ec578063869f7594146103ff5780638da5cb5b1461042a575f80fd5b806335fcee801161015d5780634782f779116101385780634782f7791461036e5780634b0bddd21461038d5780634e1273f4146103ac578063715018a6146103d8575f80fd5b806335fcee80146102d4578063373dc0231461030a578063429b62e514610340575f80fd5b806306fdde031161019857806306fdde031461023f5780630e89341c146102605780632b5412371461027f5780632eb2c2d6146102b5575f80fd5b8062fdd58e146101bd57806301ffc9a7146101ef57806302fe53051461021e575b5f80fd5b3480156101c8575f80fd5b506101dc6101d7366004611f25565b6105dc565b6040519081526020015b60405180910390f35b3480156101fa575f80fd5b5061020e610209366004611f62565b610603565b60405190151581526020016101e6565b348015610229575f80fd5b5061023d610238366004612044565b610652565b005b34801561024a575f80fd5b50610253610666565b6040516101e691906120dd565b34801561026b575f80fd5b5061025361027a3660046120ef565b6106f6565b34801561028a575f80fd5b506101dc610299366004612106565b600a60209081525f928352604080842090915290825290205481565b3480156102c0575f80fd5b5061023d6102cf3660046121d8565b610731565b3480156102df575f80fd5b506101dc6102ee366004612106565b600c60209081525f928352604080842090915290825290205481565b348015610315575f80fd5b506101dc610324366004612106565b600b60209081525f928352604080842090915290825290205481565b34801561034b575f80fd5b5061020e61035a36600461227a565b600d6020525f908152604090205460ff1681565b348015610379575f80fd5b5061023d610388366004611f25565b61079d565b348015610398575f80fd5b5061023d6103a73660046122a0565b6108d0565b3480156103b7575f80fd5b506103cb6103c6366004612334565b61093b565b6040516101e691906123cc565b3480156103e3575f80fd5b5061023d610a0d565b61023d6103fa366004612460565b610a20565b34801561040a575f80fd5b506101dc6104193660046120ef565b60076020525f908152604090205481565b348015610435575f80fd5b506003546001600160a01b03165b6040516001600160a01b0390911681526020016101e6565b348015610466575f80fd5b506101dc6104753660046120ef565b60096020525f908152604090205481565b348015610491575f80fd5b50610253610f50565b3480156104a5575f80fd5b506101dc6104b43660046120ef565b60086020525f908152604090205481565b3480156104d0575f80fd5b5061023d6104df3660046124f9565b610f5f565b3480156104ef575f80fd5b5061023d6104fe3660046122a0565b6110bc565b34801561050e575f80fd5b5061023d61051d366004612539565b6110cb565b34801561052d575f80fd5b50600654610443906001600160a01b031681565b34801561054c575f80fd5b5061020e61055b3660046125c0565b6112b2565b34801561056b575f80fd5b5061023d61057a36600461227a565b6112df565b34801561058a575f80fd5b5061023d6105993660046125e8565b6113a0565b3480156105a9575f80fd5b5061023d6105b836600461227a565b6113ff565b3480156105c8575f80fd5b5061023d6105d7366004612647565b611439565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6001600160e01b03198216636cdb3d1360e11b148061063357506001600160e01b031982166303a24d0760e21b145b806105fd57506301ffc9a760e01b6001600160e01b03198316146105fd565b61065a6114c8565b610663816114f5565b50565b60606004805461067590612677565b80601f01602080910402602001604051908101604052809291908181526020018280546106a190612677565b80156106ec5780601f106106c3576101008083540402835291602001916106ec565b820191905f5260205f20905b8154815290600101906020018083116106cf57829003601f168201915b5050505050905090565b606061070182611501565b61070a83611593565b60405160200161071b9291906126af565b6040516020818303038152906040529050919050565b336001600160a01b0386168114801590610752575061075086826112b2565b155b156107885760405163711bec9160e11b81526001600160a01b038083166004830152871660248201526044015b60405180910390fd5b6107958686868686611622565b505050505050565b6107a56114c8565b478111156107ea5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015260640161077f565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114610833576040519150601f19603f3d011682016040523d82523d5f602084013e610838565b606091505b50509050806108895760405162461bcd60e51b815260206004820181905260248201527f77697468647261774554483a20455448207472616e73666572206661696c6564604482015260640161077f565b604080516001600160a01b0385168152602081018490527f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b79910160405180910390a1505050565b6108d86114c8565b6001600160a01b0382165f818152600d6020908152604091829020805460ff19168515159081179091558251938452908301527f8a7039f4ea6f86a6a98d9c1efb0ea9d190f6b3fa37c32627cf48f767f51e36d591015b60405180910390a15050565b6060815183511461096c5781518351604051635b05999160e01b81526004810192909252602482015260440161077f565b5f83516001600160401b0381111561098657610986611f84565b6040519080825280602002602001820160405280156109af578160200160208202803683370190505b5090505f5b8451811015610a05576020808202860101516109d8906020808402870101516105dc565b8282815181106109ea576109ea6126dd565b60209081029190910101526109fe81612705565b90506109b4565b509392505050565b610a156114c8565b610a1e5f611687565b565b8351855114610a7d5760405162461bcd60e51b815260206004820152602360248201527f6275793a2069647320616e642076616c756573206c656e677468206d69736d616044820152620e8c6d60eb1b606482015260840161077f565b8251855114610ae15760405162461bcd60e51b815260206004820152602a60248201527f6275793a2069647320616e64207061796d656e74546f6b656e73206c656e67746044820152690d040dad2e6dac2e8c6d60b31b606482015260840161077f565b5f858585853433604051602001610afd96959493929190612796565b604051602081830303815290604052805190602001209050610b1f81836116d8565b610b645760405162461bcd60e51b81526020600482015260166024820152756275793a20696e76616c6964207369676e617475726560501b604482015260640161077f565b5f5b8651811015610e2f575f878281518110610b8257610b826126dd565b602002602001015190505f878381518110610b9f57610b9f6126dd565b602002602001015190505f878481518110610bbc57610bbc6126dd565b602002602001015190505f8211610c0a5760405162461bcd60e51b81526020600482015260126024820152716275793a20696e76616c69642076616c756560701b604482015260640161077f565b5f83815260076020908152604080832054600990925290912054610c2f908490612806565b1115610c7d5760405162461bcd60e51b815260206004820152601760248201527f6275793a206d617820737570706c792072656163686564000000000000000000604482015260640161077f565b5f83815260086020908152604080832054600a835281842033855290925290912054610caa908490612806565b1115610cf85760405162461bcd60e51b815260206004820181905260248201527f6275793a206d6178206d696e74207065722077616c6c65742072656163686564604482015260640161077f565b5f838152600c602090815260408083206001600160a01b03851680855290835281842054878552600b8452828520918552925290912054610d3a908490612806565b1115610d925760405162461bcd60e51b815260206004820152602160248201527f6275793a206d617820737570706c7920666f7220746f6b656e207265616368656044820152601960fa1b606482015260840161077f565b5f8381526009602052604081208054849290610daf908490612806565b90915550505f838152600a6020908152604080832033845290915281208054849290610ddc908490612806565b90915550505f838152600b602090815260408083206001600160a01b038516845290915281208054849290610e12908490612806565b925050819055505050508080610e2790612705565b915050610b66565b505f5b8351811015610ef0575f848281518110610e4e57610e4e6126dd565b6020908102919091018101519081015181516040516323b872dd60e01b81523360048201523060248201526044810182905292935090916001600160a01b038316906323b872dd906064016020604051808303815f875af1158015610eb5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ed99190612819565b505050508080610ee890612705565b915050610e32565b50610f0b33878760405180602001604052805f8152506117fe565b7f131ddb851b97a850dc74d93e90e629af9c3f7138e3bdaa83e4b20f7f02ab64bc33878786604051610f409493929190612834565b60405180910390a1505050505050565b60606005805461067590612677565b610f676114c8565b5f5b815181101561108a575f828281518110610f8557610f856126dd565b60209081029190910101516040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb9190612888565b905080156110755760405163a9059cbb60e01b81526001600160a01b0386811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af115801561104f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110739190612819565b505b5050808061108290612705565b915050610f69565b507fc2fd49a1b477deeeef9b518b77110ebf5da776815fba9e140cb2d0674e38c2b9828260405161092f92919061289f565b6110c733838361183a565b5050565b335f908152600d602052604090205460ff16806110f257506003546001600160a01b031633145b6111385760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e50591b5a5b8e881d5b985d5d1a1bdc9a5e9959604a1b604482015260640161077f565b5f5b835181101561126b575f848281518110611156576111566126dd565b6020026020010151905060095f8281526020019081526020015f205487116111c05760405162461bcd60e51b815260206004820152601b60248201527f73657453686565743a20696e76616c6964206d6178537570706c790000000000604482015260640161077f565b5f8181526007602090815260408083208a9055600890915281208790555b8351811015611256575f8482815181106111fa576111fa6126dd565b60200260200101519050858281518110611216576112166126dd565b6020908102919091018101515f858152600c835260408082206001600160a01b03909516825293909252919020558061124e81612705565b9150506111de565b5050808061126390612705565b91505061113a565b507fcb770254722e83e358a284c9843b94d549efca2226c75ae9292bf778ba73ac5785858585856040516112a39594939291906128c2565b60405180910390a15050505050565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b335f908152600d602052604090205460ff168061130657506003546001600160a01b031633145b61134c5760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e50591b5a5b8e881d5b985d5d1a1bdc9a5e9959604a1b604482015260640161077f565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527fa1bf2b98071fd2754919c95e1b3f2211168baccab7e811579129a46cbe8e65319060200160405180910390a150565b336001600160a01b03861681148015906113c157506113bf86826112b2565b155b156113f25760405163711bec9160e11b81526001600160a01b0380831660048301528716602482015260440161077f565b61079586868686866118ce565b6114076114c8565b6001600160a01b03811661143057604051631e4fbdf760e01b81525f600482015260240161077f565b61066381611687565b6001600160a01b038316331480611455575061145583336112b2565b6114b85760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b606482015260840161077f565b6114c383838361195a565b505050565b6003546001600160a01b03163314610a1e5760405163118cdaa760e01b815233600482015260240161077f565b60026110c78282612957565b60606002805461151090612677565b80601f016020809104026020016040519081016040528092919081815260200182805461153c90612677565b80156115875780601f1061155e57610100808354040283529160200191611587565b820191905f5260205f20905b81548152906001019060200180831161156a57829003601f168201915b50505050509050919050565b60605f61159f836119c0565b60010190505f816001600160401b038111156115bd576115bd611f84565b6040519080825280601f01601f1916602001820160405280156115e7576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115f157509392505050565b6001600160a01b03841661164b57604051632bfa23e760e11b81525f600482015260240161077f565b6001600160a01b03851661167357604051626a0d4560e21b81525f600482015260240161077f565b6116808585858585611a97565b5050505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390525f908190605c016040516020818303038152906040528051906020012090505f805f855160411461173f575f9450505050506105fd565b5050506020830151604084015160608501515f1a601b81101561176a57611767601b82612a12565b90505b5f8160ff16601b148061178057508160ff16601c145b156117e257604080515f81526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa1580156117d5573d5f803e3d5ffd5b5050506020604051035190505b6006546001600160a01b03918216911614979650505050505050565b6001600160a01b03841661182757604051632bfa23e760e11b81525f600482015260240161077f565b6118345f85858585611a97565b50505050565b6001600160a01b0382166118625760405162ced3e160e81b81525f600482015260240161077f565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166118f757604051632bfa23e760e11b81525f600482015260240161077f565b6001600160a01b03851661191f57604051626a0d4560e21b81525f600482015260240161077f565b604080516001808252602082018690528183019081526060820185905260808201909252906119518787848487611a97565b50505050505050565b6001600160a01b03831661198257604051626a0d4560e21b81525f600482015260240161077f565b604080516001808252602082018590528183019081526060820184905260a082019092525f6080820181815291929161168091879185908590611a97565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106119fe5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a2a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a4857662386f26fc10000830492506010015b6305f5e1008310611a60576305f5e100830492506008015b6127108310611a7457612710830492506004015b60648310611a86576064830492506002015b600a83106105fd5760010192915050565b611aa385858585611aea565b6001600160a01b038416156116805782513390600103611adc5760208481015190840151611ad5838989858589611d02565b5050610795565b610795818787878787611e23565b8051825114611b195781518151604051635b05999160e01b81526004810192909252602482015260440161077f565b335f5b8351811015611c24576020818102858101820151908501909101516001600160a01b03881615611bcd575f828152602081815260408083206001600160a01b038c16845290915290205481811015611ba7576040516303dee4c560e01b81526001600160a01b038a16600482015260248101829052604481018390526064810184905260840161077f565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b03871615611c11575f828152602081815260408083206001600160a01b038b16845290915281208054839290611c0b908490612806565b90915550505b505080611c1d90612705565b9050611b1c565b508251600103611ca45760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611c95929190918252602082015260400190565b60405180910390a45050611680565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611cf3929190612a2b565b60405180910390a45050505050565b6001600160a01b0384163b156107955760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611d469089908990889088908890600401612a58565b6020604051808303815f875af1925050508015611d80575060408051601f3d908101601f19168201909252611d7d91810190612a91565b60015b611de7573d808015611dad576040519150601f19603f3d011682016040523d82523d5f602084013e611db2565b606091505b5080515f03611ddf57604051632bfa23e760e11b81526001600160a01b038616600482015260240161077f565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461195157604051632bfa23e760e11b81526001600160a01b038616600482015260240161077f565b6001600160a01b0384163b156107955760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611e679089908990889088908890600401612aac565b6020604051808303815f875af1925050508015611ea1575060408051601f3d908101601f19168201909252611e9e91810190612a91565b60015b611ece573d808015611dad576040519150601f19603f3d011682016040523d82523d5f602084013e611db2565b6001600160e01b0319811663bc197c8160e01b1461195157604051632bfa23e760e11b81526001600160a01b038616600482015260240161077f565b80356001600160a01b0381168114611f20575f80fd5b919050565b5f8060408385031215611f36575f80fd5b611f3f83611f0a565b946020939093013593505050565b6001600160e01b031981168114610663575f80fd5b5f60208284031215611f72575f80fd5b8135611f7d81611f4d565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611fba57611fba611f84565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611fe857611fe8611f84565b604052919050565b5f6001600160401b0383111561200857612008611f84565b61201b601f8401601f1916602001611fc0565b905082815283838301111561202e575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215612054575f80fd5b81356001600160401b03811115612069575f80fd5b8201601f81018413612079575f80fd5b61208884823560208401611ff0565b949350505050565b5f5b838110156120aa578181015183820152602001612092565b50505f910152565b5f81518084526120c9816020860160208601612090565b601f01601f19169290920160200192915050565b602081525f611f7d60208301846120b2565b5f602082840312156120ff575f80fd5b5035919050565b5f8060408385031215612117575f80fd5b8235915061212760208401611f0a565b90509250929050565b5f6001600160401b0382111561214857612148611f84565b5060051b60200190565b5f82601f830112612161575f80fd5b8135602061217661217183612130565b611fc0565b82815260059290921b84018101918181019086841115612194575f80fd5b8286015b848110156121af5780358352918301918301612198565b509695505050505050565b5f82601f8301126121c9575f80fd5b611f7d83833560208501611ff0565b5f805f805f60a086880312156121ec575f80fd5b6121f586611f0a565b945061220360208701611f0a565b935060408601356001600160401b038082111561221e575f80fd5b61222a89838a01612152565b9450606088013591508082111561223f575f80fd5b61224b89838a01612152565b93506080880135915080821115612260575f80fd5b5061226d888289016121ba565b9150509295509295909350565b5f6020828403121561228a575f80fd5b611f7d82611f0a565b8015158114610663575f80fd5b5f80604083850312156122b1575f80fd5b6122ba83611f0a565b915060208301356122ca81612293565b809150509250929050565b5f82601f8301126122e4575f80fd5b813560206122f461217183612130565b82815260059290921b84018101918181019086841115612312575f80fd5b8286015b848110156121af5761232781611f0a565b8352918301918301612316565b5f8060408385031215612345575f80fd5b82356001600160401b038082111561235b575f80fd5b612367868387016122d5565b9350602085013591508082111561237c575f80fd5b5061238985828601612152565b9150509250929050565b5f8151808452602080850194508084015f5b838110156123c1578151875295820195908201906001016123a5565b509495945050505050565b602081525f611f7d6020830184612393565b5f82601f8301126123ed575f80fd5b813560206123fd61217183612130565b82815260069290921b8401810191818101908684111561241b575f80fd5b8286015b848110156121af5760408189031215612437575f8081fd5b61243f611f98565b8135815261244e858301611f0a565b8186015283529183019160400161241f565b5f805f805f60a08688031215612474575f80fd5b85356001600160401b038082111561248a575f80fd5b61249689838a01612152565b965060208801359150808211156124ab575f80fd5b6124b789838a01612152565b955060408801359150808211156124cc575f80fd5b6124d889838a016122d5565b945060608801359150808211156124ed575f80fd5b61224b89838a016123de565b5f806040838503121561250a575f80fd5b61251383611f0a565b915060208301356001600160401b0381111561252d575f80fd5b612389858286016122d5565b5f805f805f60a0868803121561254d575f80fd5b853594506020860135935060408601356001600160401b0380821115612571575f80fd5b61257d89838a01612152565b94506060880135915080821115612592575f80fd5b61259e89838a01612152565b935060808801359150808211156125b3575f80fd5b5061226d888289016122d5565b5f80604083850312156125d1575f80fd5b6125da83611f0a565b915061212760208401611f0a565b5f805f805f60a086880312156125fc575f80fd5b61260586611f0a565b945061261360208701611f0a565b9350604086013592506060860135915060808601356001600160401b0381111561263b575f80fd5b61226d888289016121ba565b5f805f60608486031215612659575f80fd5b61266284611f0a565b95602085013595506040909401359392505050565b600181811c9082168061268b57607f821691505b6020821081036126a957634e487b7160e01b5f52602260045260245ffd5b50919050565b5f83516126c0818460208801612090565b8351908301906126d4818360208801612090565b01949350505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201612716576127166126f1565b5060010190565b5f8151808452602080850194508084015f5b838110156123c15781516001600160a01b03168752958201959082019060010161272f565b5f8151808452602080850194508084015f5b838110156123c1578151805188528301516001600160a01b03168388015260409096019590820190600101612766565b60c081525f6127a860c0830189612393565b82810360208401526127ba8189612393565b905082810360408401526127ce818861271d565b905082810360608401526127e28187612754565b608084019590955250506001600160a01b039190911660a090910152949350505050565b808201808211156105fd576105fd6126f1565b5f60208284031215612829575f80fd5b8151611f7d81612293565b6001600160a01b03851681526080602082018190525f9061285790830186612393565b82810360408401526128698186612393565b9050828103606084015261287d8185612754565b979650505050505050565b5f60208284031215612898575f80fd5b5051919050565b6001600160a01b03831681526040602082018190525f906120889083018461271d565b85815284602082015260a060408201525f6128e060a0830186612393565b82810360608401526128f28186612393565b90508281036080840152612906818561271d565b98975050505050505050565b601f8211156114c3575f81815260208120601f850160051c810160208610156129385750805b601f850160051c820191505b8181101561079557828155600101612944565b81516001600160401b0381111561297057612970611f84565b6129848161297e8454612677565b84612912565b602080601f8311600181146129b7575f84156129a05750858301515b5f19600386901b1c1916600185901b178555610795565b5f85815260208120601f198616915b828110156129e5578886015182559484019460019091019084016129c6565b5085821015612a0257878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b60ff81811683821601908111156105fd576105fd6126f1565b604081525f612a3d6040830185612393565b8281036020840152612a4f8185612393565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f9061287d908301846120b2565b5f60208284031215612aa1575f80fd5b8151611f7d81611f4d565b6001600160a01b0386811682528516602082015260a0604082018190525f90612ad790830186612393565b8281036060840152612ae98186612393565b9050828103608084015261290681856120b256fea2646970667358221220dddafddfef88b9a22976ca8fec83ab51d51d2e0f7077811e0b765316fc1997c364736f6c63430008140033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000009464947485466636d63000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056666636d630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101b9575f3560e01c80637ada0301116100f2578063a22cb46511610092578063e9a7484c11610062578063e9a7484c14610560578063f242432a1461057f578063f2fde38b1461059e578063f5298aca146105bd575f80fd5b8063a22cb465146104e4578063cc76c0cc14610503578063d1efd30d14610522578063e985e9c514610541575f80fd5b8063919956ef116100cd578063919956ef1461045b57806395d89b41146104865780639cc1c3491461049a5780639d2dcde7146104c5575f80fd5b80637ada0301146103ec578063869f7594146103ff5780638da5cb5b1461042a575f80fd5b806335fcee801161015d5780634782f779116101385780634782f7791461036e5780634b0bddd21461038d5780634e1273f4146103ac578063715018a6146103d8575f80fd5b806335fcee80146102d4578063373dc0231461030a578063429b62e514610340575f80fd5b806306fdde031161019857806306fdde031461023f5780630e89341c146102605780632b5412371461027f5780632eb2c2d6146102b5575f80fd5b8062fdd58e146101bd57806301ffc9a7146101ef57806302fe53051461021e575b5f80fd5b3480156101c8575f80fd5b506101dc6101d7366004611f25565b6105dc565b6040519081526020015b60405180910390f35b3480156101fa575f80fd5b5061020e610209366004611f62565b610603565b60405190151581526020016101e6565b348015610229575f80fd5b5061023d610238366004612044565b610652565b005b34801561024a575f80fd5b50610253610666565b6040516101e691906120dd565b34801561026b575f80fd5b5061025361027a3660046120ef565b6106f6565b34801561028a575f80fd5b506101dc610299366004612106565b600a60209081525f928352604080842090915290825290205481565b3480156102c0575f80fd5b5061023d6102cf3660046121d8565b610731565b3480156102df575f80fd5b506101dc6102ee366004612106565b600c60209081525f928352604080842090915290825290205481565b348015610315575f80fd5b506101dc610324366004612106565b600b60209081525f928352604080842090915290825290205481565b34801561034b575f80fd5b5061020e61035a36600461227a565b600d6020525f908152604090205460ff1681565b348015610379575f80fd5b5061023d610388366004611f25565b61079d565b348015610398575f80fd5b5061023d6103a73660046122a0565b6108d0565b3480156103b7575f80fd5b506103cb6103c6366004612334565b61093b565b6040516101e691906123cc565b3480156103e3575f80fd5b5061023d610a0d565b61023d6103fa366004612460565b610a20565b34801561040a575f80fd5b506101dc6104193660046120ef565b60076020525f908152604090205481565b348015610435575f80fd5b506003546001600160a01b03165b6040516001600160a01b0390911681526020016101e6565b348015610466575f80fd5b506101dc6104753660046120ef565b60096020525f908152604090205481565b348015610491575f80fd5b50610253610f50565b3480156104a5575f80fd5b506101dc6104b43660046120ef565b60086020525f908152604090205481565b3480156104d0575f80fd5b5061023d6104df3660046124f9565b610f5f565b3480156104ef575f80fd5b5061023d6104fe3660046122a0565b6110bc565b34801561050e575f80fd5b5061023d61051d366004612539565b6110cb565b34801561052d575f80fd5b50600654610443906001600160a01b031681565b34801561054c575f80fd5b5061020e61055b3660046125c0565b6112b2565b34801561056b575f80fd5b5061023d61057a36600461227a565b6112df565b34801561058a575f80fd5b5061023d6105993660046125e8565b6113a0565b3480156105a9575f80fd5b5061023d6105b836600461227a565b6113ff565b3480156105c8575f80fd5b5061023d6105d7366004612647565b611439565b5f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6001600160e01b03198216636cdb3d1360e11b148061063357506001600160e01b031982166303a24d0760e21b145b806105fd57506301ffc9a760e01b6001600160e01b03198316146105fd565b61065a6114c8565b610663816114f5565b50565b60606004805461067590612677565b80601f01602080910402602001604051908101604052809291908181526020018280546106a190612677565b80156106ec5780601f106106c3576101008083540402835291602001916106ec565b820191905f5260205f20905b8154815290600101906020018083116106cf57829003601f168201915b5050505050905090565b606061070182611501565b61070a83611593565b60405160200161071b9291906126af565b6040516020818303038152906040529050919050565b336001600160a01b0386168114801590610752575061075086826112b2565b155b156107885760405163711bec9160e11b81526001600160a01b038083166004830152871660248201526044015b60405180910390fd5b6107958686868686611622565b505050505050565b6107a56114c8565b478111156107ea5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015260640161077f565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114610833576040519150601f19603f3d011682016040523d82523d5f602084013e610838565b606091505b50509050806108895760405162461bcd60e51b815260206004820181905260248201527f77697468647261774554483a20455448207472616e73666572206661696c6564604482015260640161077f565b604080516001600160a01b0385168152602081018490527f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b79910160405180910390a1505050565b6108d86114c8565b6001600160a01b0382165f818152600d6020908152604091829020805460ff19168515159081179091558251938452908301527f8a7039f4ea6f86a6a98d9c1efb0ea9d190f6b3fa37c32627cf48f767f51e36d591015b60405180910390a15050565b6060815183511461096c5781518351604051635b05999160e01b81526004810192909252602482015260440161077f565b5f83516001600160401b0381111561098657610986611f84565b6040519080825280602002602001820160405280156109af578160200160208202803683370190505b5090505f5b8451811015610a05576020808202860101516109d8906020808402870101516105dc565b8282815181106109ea576109ea6126dd565b60209081029190910101526109fe81612705565b90506109b4565b509392505050565b610a156114c8565b610a1e5f611687565b565b8351855114610a7d5760405162461bcd60e51b815260206004820152602360248201527f6275793a2069647320616e642076616c756573206c656e677468206d69736d616044820152620e8c6d60eb1b606482015260840161077f565b8251855114610ae15760405162461bcd60e51b815260206004820152602a60248201527f6275793a2069647320616e64207061796d656e74546f6b656e73206c656e67746044820152690d040dad2e6dac2e8c6d60b31b606482015260840161077f565b5f858585853433604051602001610afd96959493929190612796565b604051602081830303815290604052805190602001209050610b1f81836116d8565b610b645760405162461bcd60e51b81526020600482015260166024820152756275793a20696e76616c6964207369676e617475726560501b604482015260640161077f565b5f5b8651811015610e2f575f878281518110610b8257610b826126dd565b602002602001015190505f878381518110610b9f57610b9f6126dd565b602002602001015190505f878481518110610bbc57610bbc6126dd565b602002602001015190505f8211610c0a5760405162461bcd60e51b81526020600482015260126024820152716275793a20696e76616c69642076616c756560701b604482015260640161077f565b5f83815260076020908152604080832054600990925290912054610c2f908490612806565b1115610c7d5760405162461bcd60e51b815260206004820152601760248201527f6275793a206d617820737570706c792072656163686564000000000000000000604482015260640161077f565b5f83815260086020908152604080832054600a835281842033855290925290912054610caa908490612806565b1115610cf85760405162461bcd60e51b815260206004820181905260248201527f6275793a206d6178206d696e74207065722077616c6c65742072656163686564604482015260640161077f565b5f838152600c602090815260408083206001600160a01b03851680855290835281842054878552600b8452828520918552925290912054610d3a908490612806565b1115610d925760405162461bcd60e51b815260206004820152602160248201527f6275793a206d617820737570706c7920666f7220746f6b656e207265616368656044820152601960fa1b606482015260840161077f565b5f8381526009602052604081208054849290610daf908490612806565b90915550505f838152600a6020908152604080832033845290915281208054849290610ddc908490612806565b90915550505f838152600b602090815260408083206001600160a01b038516845290915281208054849290610e12908490612806565b925050819055505050508080610e2790612705565b915050610b66565b505f5b8351811015610ef0575f848281518110610e4e57610e4e6126dd565b6020908102919091018101519081015181516040516323b872dd60e01b81523360048201523060248201526044810182905292935090916001600160a01b038316906323b872dd906064016020604051808303815f875af1158015610eb5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ed99190612819565b505050508080610ee890612705565b915050610e32565b50610f0b33878760405180602001604052805f8152506117fe565b7f131ddb851b97a850dc74d93e90e629af9c3f7138e3bdaa83e4b20f7f02ab64bc33878786604051610f409493929190612834565b60405180910390a1505050505050565b60606005805461067590612677565b610f676114c8565b5f5b815181101561108a575f828281518110610f8557610f856126dd565b60209081029190910101516040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb9190612888565b905080156110755760405163a9059cbb60e01b81526001600160a01b0386811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af115801561104f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110739190612819565b505b5050808061108290612705565b915050610f69565b507fc2fd49a1b477deeeef9b518b77110ebf5da776815fba9e140cb2d0674e38c2b9828260405161092f92919061289f565b6110c733838361183a565b5050565b335f908152600d602052604090205460ff16806110f257506003546001600160a01b031633145b6111385760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e50591b5a5b8e881d5b985d5d1a1bdc9a5e9959604a1b604482015260640161077f565b5f5b835181101561126b575f848281518110611156576111566126dd565b6020026020010151905060095f8281526020019081526020015f205487116111c05760405162461bcd60e51b815260206004820152601b60248201527f73657453686565743a20696e76616c6964206d6178537570706c790000000000604482015260640161077f565b5f8181526007602090815260408083208a9055600890915281208790555b8351811015611256575f8482815181106111fa576111fa6126dd565b60200260200101519050858281518110611216576112166126dd565b6020908102919091018101515f858152600c835260408082206001600160a01b03909516825293909252919020558061124e81612705565b9150506111de565b5050808061126390612705565b91505061113a565b507fcb770254722e83e358a284c9843b94d549efca2226c75ae9292bf778ba73ac5785858585856040516112a39594939291906128c2565b60405180910390a15050505050565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205460ff1690565b335f908152600d602052604090205460ff168061130657506003546001600160a01b031633145b61134c5760405162461bcd60e51b81526020600482015260176024820152761bdb9b1e50591b5a5b8e881d5b985d5d1a1bdc9a5e9959604a1b604482015260640161077f565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527fa1bf2b98071fd2754919c95e1b3f2211168baccab7e811579129a46cbe8e65319060200160405180910390a150565b336001600160a01b03861681148015906113c157506113bf86826112b2565b155b156113f25760405163711bec9160e11b81526001600160a01b0380831660048301528716602482015260440161077f565b61079586868686866118ce565b6114076114c8565b6001600160a01b03811661143057604051631e4fbdf760e01b81525f600482015260240161077f565b61066381611687565b6001600160a01b038316331480611455575061145583336112b2565b6114b85760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b606482015260840161077f565b6114c383838361195a565b505050565b6003546001600160a01b03163314610a1e5760405163118cdaa760e01b815233600482015260240161077f565b60026110c78282612957565b60606002805461151090612677565b80601f016020809104026020016040519081016040528092919081815260200182805461153c90612677565b80156115875780601f1061155e57610100808354040283529160200191611587565b820191905f5260205f20905b81548152906001019060200180831161156a57829003601f168201915b50505050509050919050565b60605f61159f836119c0565b60010190505f816001600160401b038111156115bd576115bd611f84565b6040519080825280601f01601f1916602001820160405280156115e7576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846115f157509392505050565b6001600160a01b03841661164b57604051632bfa23e760e11b81525f600482015260240161077f565b6001600160a01b03851661167357604051626a0d4560e21b81525f600482015260240161077f565b6116808585858585611a97565b5050505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390525f908190605c016040516020818303038152906040528051906020012090505f805f855160411461173f575f9450505050506105fd565b5050506020830151604084015160608501515f1a601b81101561176a57611767601b82612a12565b90505b5f8160ff16601b148061178057508160ff16601c145b156117e257604080515f81526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa1580156117d5573d5f803e3d5ffd5b5050506020604051035190505b6006546001600160a01b03918216911614979650505050505050565b6001600160a01b03841661182757604051632bfa23e760e11b81525f600482015260240161077f565b6118345f85858585611a97565b50505050565b6001600160a01b0382166118625760405162ced3e160e81b81525f600482015260240161077f565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166118f757604051632bfa23e760e11b81525f600482015260240161077f565b6001600160a01b03851661191f57604051626a0d4560e21b81525f600482015260240161077f565b604080516001808252602082018690528183019081526060820185905260808201909252906119518787848487611a97565b50505050505050565b6001600160a01b03831661198257604051626a0d4560e21b81525f600482015260240161077f565b604080516001808252602082018590528183019081526060820184905260a082019092525f6080820181815291929161168091879185908590611a97565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106119fe5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a2a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a4857662386f26fc10000830492506010015b6305f5e1008310611a60576305f5e100830492506008015b6127108310611a7457612710830492506004015b60648310611a86576064830492506002015b600a83106105fd5760010192915050565b611aa385858585611aea565b6001600160a01b038416156116805782513390600103611adc5760208481015190840151611ad5838989858589611d02565b5050610795565b610795818787878787611e23565b8051825114611b195781518151604051635b05999160e01b81526004810192909252602482015260440161077f565b335f5b8351811015611c24576020818102858101820151908501909101516001600160a01b03881615611bcd575f828152602081815260408083206001600160a01b038c16845290915290205481811015611ba7576040516303dee4c560e01b81526001600160a01b038a16600482015260248101829052604481018390526064810184905260840161077f565b5f838152602081815260408083206001600160a01b038d16845290915290209082900390555b6001600160a01b03871615611c11575f828152602081815260408083206001600160a01b038b16845290915281208054839290611c0b908490612806565b90915550505b505080611c1d90612705565b9050611b1c565b508251600103611ca45760208301515f906020840151909150856001600160a01b0316876001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611c95929190918252602082015260400190565b60405180910390a45050611680565b836001600160a01b0316856001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611cf3929190612a2b565b60405180910390a45050505050565b6001600160a01b0384163b156107955760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611d469089908990889088908890600401612a58565b6020604051808303815f875af1925050508015611d80575060408051601f3d908101601f19168201909252611d7d91810190612a91565b60015b611de7573d808015611dad576040519150601f19603f3d011682016040523d82523d5f602084013e611db2565b606091505b5080515f03611ddf57604051632bfa23e760e11b81526001600160a01b038616600482015260240161077f565b805181602001fd5b6001600160e01b0319811663f23a6e6160e01b1461195157604051632bfa23e760e11b81526001600160a01b038616600482015260240161077f565b6001600160a01b0384163b156107955760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611e679089908990889088908890600401612aac565b6020604051808303815f875af1925050508015611ea1575060408051601f3d908101601f19168201909252611e9e91810190612a91565b60015b611ece573d808015611dad576040519150601f19603f3d011682016040523d82523d5f602084013e611db2565b6001600160e01b0319811663bc197c8160e01b1461195157604051632bfa23e760e11b81526001600160a01b038616600482015260240161077f565b80356001600160a01b0381168114611f20575f80fd5b919050565b5f8060408385031215611f36575f80fd5b611f3f83611f0a565b946020939093013593505050565b6001600160e01b031981168114610663575f80fd5b5f60208284031215611f72575f80fd5b8135611f7d81611f4d565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b604080519081016001600160401b0381118282101715611fba57611fba611f84565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611fe857611fe8611f84565b604052919050565b5f6001600160401b0383111561200857612008611f84565b61201b601f8401601f1916602001611fc0565b905082815283838301111561202e575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215612054575f80fd5b81356001600160401b03811115612069575f80fd5b8201601f81018413612079575f80fd5b61208884823560208401611ff0565b949350505050565b5f5b838110156120aa578181015183820152602001612092565b50505f910152565b5f81518084526120c9816020860160208601612090565b601f01601f19169290920160200192915050565b602081525f611f7d60208301846120b2565b5f602082840312156120ff575f80fd5b5035919050565b5f8060408385031215612117575f80fd5b8235915061212760208401611f0a565b90509250929050565b5f6001600160401b0382111561214857612148611f84565b5060051b60200190565b5f82601f830112612161575f80fd5b8135602061217661217183612130565b611fc0565b82815260059290921b84018101918181019086841115612194575f80fd5b8286015b848110156121af5780358352918301918301612198565b509695505050505050565b5f82601f8301126121c9575f80fd5b611f7d83833560208501611ff0565b5f805f805f60a086880312156121ec575f80fd5b6121f586611f0a565b945061220360208701611f0a565b935060408601356001600160401b038082111561221e575f80fd5b61222a89838a01612152565b9450606088013591508082111561223f575f80fd5b61224b89838a01612152565b93506080880135915080821115612260575f80fd5b5061226d888289016121ba565b9150509295509295909350565b5f6020828403121561228a575f80fd5b611f7d82611f0a565b8015158114610663575f80fd5b5f80604083850312156122b1575f80fd5b6122ba83611f0a565b915060208301356122ca81612293565b809150509250929050565b5f82601f8301126122e4575f80fd5b813560206122f461217183612130565b82815260059290921b84018101918181019086841115612312575f80fd5b8286015b848110156121af5761232781611f0a565b8352918301918301612316565b5f8060408385031215612345575f80fd5b82356001600160401b038082111561235b575f80fd5b612367868387016122d5565b9350602085013591508082111561237c575f80fd5b5061238985828601612152565b9150509250929050565b5f8151808452602080850194508084015f5b838110156123c1578151875295820195908201906001016123a5565b509495945050505050565b602081525f611f7d6020830184612393565b5f82601f8301126123ed575f80fd5b813560206123fd61217183612130565b82815260069290921b8401810191818101908684111561241b575f80fd5b8286015b848110156121af5760408189031215612437575f8081fd5b61243f611f98565b8135815261244e858301611f0a565b8186015283529183019160400161241f565b5f805f805f60a08688031215612474575f80fd5b85356001600160401b038082111561248a575f80fd5b61249689838a01612152565b965060208801359150808211156124ab575f80fd5b6124b789838a01612152565b955060408801359150808211156124cc575f80fd5b6124d889838a016122d5565b945060608801359150808211156124ed575f80fd5b61224b89838a016123de565b5f806040838503121561250a575f80fd5b61251383611f0a565b915060208301356001600160401b0381111561252d575f80fd5b612389858286016122d5565b5f805f805f60a0868803121561254d575f80fd5b853594506020860135935060408601356001600160401b0380821115612571575f80fd5b61257d89838a01612152565b94506060880135915080821115612592575f80fd5b61259e89838a01612152565b935060808801359150808211156125b3575f80fd5b5061226d888289016122d5565b5f80604083850312156125d1575f80fd5b6125da83611f0a565b915061212760208401611f0a565b5f805f805f60a086880312156125fc575f80fd5b61260586611f0a565b945061261360208701611f0a565b9350604086013592506060860135915060808601356001600160401b0381111561263b575f80fd5b61226d888289016121ba565b5f805f60608486031215612659575f80fd5b61266284611f0a565b95602085013595506040909401359392505050565b600181811c9082168061268b57607f821691505b6020821081036126a957634e487b7160e01b5f52602260045260245ffd5b50919050565b5f83516126c0818460208801612090565b8351908301906126d4818360208801612090565b01949350505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201612716576127166126f1565b5060010190565b5f8151808452602080850194508084015f5b838110156123c15781516001600160a01b03168752958201959082019060010161272f565b5f8151808452602080850194508084015f5b838110156123c1578151805188528301516001600160a01b03168388015260409096019590820190600101612766565b60c081525f6127a860c0830189612393565b82810360208401526127ba8189612393565b905082810360408401526127ce818861271d565b905082810360608401526127e28187612754565b608084019590955250506001600160a01b039190911660a090910152949350505050565b808201808211156105fd576105fd6126f1565b5f60208284031215612829575f80fd5b8151611f7d81612293565b6001600160a01b03851681526080602082018190525f9061285790830186612393565b82810360408401526128698186612393565b9050828103606084015261287d8185612754565b979650505050505050565b5f60208284031215612898575f80fd5b5051919050565b6001600160a01b03831681526040602082018190525f906120889083018461271d565b85815284602082015260a060408201525f6128e060a0830186612393565b82810360608401526128f28186612393565b90508281036080840152612906818561271d565b98975050505050505050565b601f8211156114c3575f81815260208120601f850160051c810160208610156129385750805b601f850160051c820191505b8181101561079557828155600101612944565b81516001600160401b0381111561297057612970611f84565b6129848161297e8454612677565b84612912565b602080601f8311600181146129b7575f84156129a05750858301515b5f19600386901b1c1916600185901b178555610795565b5f85815260208120601f198616915b828110156129e5578886015182559484019460019091019084016129c6565b5085821015612a0257878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b60ff81811683821601908111156105fd576105fd6126f1565b604081525f612a3d6040830185612393565b8281036020840152612a4f8185612393565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f9061287d908301846120b2565b5f60208284031215612aa1575f80fd5b8151611f7d81611f4d565b6001600160a01b0386811682528516602082015260a0604082018190525f90612ad790830186612393565b8281036060840152612ae98186612393565b9050828103608084015261290681856120b256fea2646970667358221220dddafddfef88b9a22976ca8fec83ab51d51d2e0f7077811e0b765316fc1997c364736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000009464947485466636d63000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056666636d630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): FIGHTfcmc
Arg [1] : _symbol (string): ffcmc
Arg [2] : _uri (string):
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [4] : 464947485466636d630000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 6666636d63000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.