Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
POL Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Loading...
Loading
Contract Name:
ViaNFT
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract ViaNFT is ERC721, ERC2981, Ownable { using Counters for Counters.Counter; event WhitelistAddressAdded(address addr); event WhitelistAddressRemoved(address addr); event FreeDistributionUpdated(bool isFree); event ExpansionPackIdAdded(address addr, uint256 id); event ExpansionPackIdRemoved(address addr, uint256 id); event DeveloperAdded(address addr); event DeveloperRemoved(address addr); event DefaultRoyaltySet(address addr, uint96 feeNum); event DefaultRoyaltyDeleted(); Counters.Counter internal tokenIds; string internal _tokenURIPrefix; bool private _isFree = false; mapping(address => bool) private _whitelist; mapping(address => uint256[]) private _expansionPack; address[] internal _developers; constructor( string memory tokenURIPrefix_, string memory name_, string memory symbol_, address[] memory developers_, address royaltyReceiver_, uint96 royaltyFeeNumerator_ ) ERC721(name_, symbol_) { _tokenURIPrefix = tokenURIPrefix_; _developers = developers_; if (royaltyReceiver_ != address(0) && royaltyFeeNumerator_ != 0) { _setDefaultRoyalty(royaltyReceiver_, royaltyFeeNumerator_); } } modifier onlyOwnerOrDeveloper() { require( _msgSender() == owner() || isDeveloper(_msgSender()), "Caller is neither the owner nor the developer" ); _; } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } function _baseURI() internal view override returns (string memory) { return string( abi.encodePacked( _tokenURIPrefix, toString(address(this)), "/token_id/" ) ); } function toString(address address_) private pure returns (string memory) { return Strings.toHexString(address_); } function mint(address to) public virtual onlyOwnerOrDeveloper { tokenIds.increment(); uint256 tokenId = tokenIds.current(); _mint(to, tokenId); if (tokenId == 1) { _setApprovalForAll(to, owner(), true); for (uint256 i = 0; i < _developers.length; i++) { _setApprovalForAll(to, _developers[i], true); } } } function multipleMint( address to, uint256 tokenNumber ) public onlyOwnerOrDeveloper { for (uint256 i = 0; i < tokenNumber; i++) { mint(to); } } function supervisedTransferFrom( address from, address to, uint256 tokenId ) public onlyOwnerOrDeveloper { safeTransferFrom(from, to, tokenId); _setApprovalForAll(to, owner(), true); _setApprovalForAll(to, _msgSender(), true); } function burn(uint256 tokenId) public onlyOwnerOrDeveloper { _burn(tokenId); } function _isWhitelistAddress(address addr) internal view returns (bool) { return _whitelist[addr]; } function addWhitelistAddress(address addr) public onlyOwnerOrDeveloper { _whitelist[addr] = true; emit WhitelistAddressAdded(addr); } function removeWhitelistAddress(address addr) public onlyOwnerOrDeveloper { delete _whitelist[addr]; emit WhitelistAddressRemoved(addr); } function setFreeDistribution(bool isFree) public onlyOwnerOrDeveloper { _isFree = isFree; emit FreeDistributionUpdated(isFree); } function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwnerOrDeveloper() { _setDefaultRoyalty(receiver, feeNumerator); emit DefaultRoyaltySet(receiver, feeNumerator); } function deleteDefaultRoyalty() public onlyOwnerOrDeveloper() { _deleteDefaultRoyalty(); emit DefaultRoyaltyDeleted(); } function setApprovalForAll( address operator, bool approved ) public override { require( _isFree || _isWhitelistAddress(operator), "operator is not whitelisted" ); super.setApprovalForAll(operator, approved); } function approve(address to, uint256 tokenId) public override { require( _isFree || _isWhitelistAddress(to), "approve to is not whitelisted" ); super.approve(to, tokenId); } function addExpansionPackId( address addr, uint256 id ) public onlyOwnerOrDeveloper { _expansionPack[addr].push(id); emit ExpansionPackIdAdded(addr, id); } function getExpansionPackIds( address addr ) public view returns (uint256[] memory) { return _expansionPack[addr]; } function removeExpansionPackId( address addr, uint256 id ) public onlyOwnerOrDeveloper { for (uint256 i = 0; i < _expansionPack[addr].length; i++) { if (_expansionPack[addr][i] == id) { delete _expansionPack[addr][i]; } } emit ExpansionPackIdRemoved(addr, id); } function updateExpansionPackId( address addr, uint256 removeId, uint256 addId ) public onlyOwnerOrDeveloper { removeExpansionPackId(addr, removeId); addExpansionPackId(addr, addId); } function addDeveloper(address addr) public onlyOwnerOrDeveloper { require(!isDeveloper(addr), "Target address is already the developer"); _developers.push(addr); emit DeveloperAdded(addr); } function removeDeveloper(address addr) public onlyOwnerOrDeveloper { require(isDeveloper(addr), "Target address is not the developer"); uint256 targetIndex; for (uint256 i = 0; i < _developers.length; i++) { if (_developers[i] == addr) { targetIndex = i; } } for (uint256 i = targetIndex; i < _developers.length - 1; i++) { _developers[i] = _developers[i + 1]; } _developers.pop(); emit DeveloperRemoved(addr); } function isDeveloper(address addr) public view returns (bool) { for (uint256 i = 0; i < _developers.length; i++) { if (addr == _developers[i]) { return true; } } return false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @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 v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // 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. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 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 + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(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) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"tokenURIPrefix_","type":"string"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address[]","name":"developers_","type":"address[]"},{"internalType":"address","name":"royaltyReceiver_","type":"address"},{"internalType":"uint96","name":"royaltyFeeNumerator_","type":"uint96"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"DefaultRoyaltyDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNum","type":"uint96"}],"name":"DefaultRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"DeveloperAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"DeveloperRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ExpansionPackIdAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ExpansionPackIdRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isFree","type":"bool"}],"name":"FreeDistributionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"WhitelistAddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"WhitelistAddressRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"addExpansionPackId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addWhitelistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getExpansionPackIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isDeveloper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenNumber","type":"uint256"}],"name":"multipleMint","outputs":[],"stateMutability":"nonpayable","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":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"removeExpansionPackId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeWhitelistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isFree","type":"bool"}],"name":"setFreeDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"supervisedTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"removeId","type":"uint256"},{"internalType":"uint256","name":"addId","type":"uint256"}],"name":"updateExpansionPackId","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600b805460ff191690553480156200001b57600080fd5b5060405162002fa038038062002fa08339810160408190526200003e9162000456565b848460006200004e8382620005c2565b5060016200005d8282620005c2565b5050506200007a62000074620000de60201b60201c565b620000e2565b600a620000888782620005c2565b5082516200009e90600e90602086019062000239565b506001600160a01b03821615801590620000c057506001600160601b03811615155b15620000d257620000d2828262000134565b5050505050506200068e565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620001a85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002005760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200019f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b82805482825590600052602060002090810192821562000291579160200282015b828111156200029157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200025a565b506200029f929150620002a3565b5090565b5b808211156200029f5760008155600101620002a4565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620002fb57620002fb620002ba565b604052919050565b600082601f8301126200031557600080fd5b81516001600160401b03811115620003315762000331620002ba565b602062000347601f8301601f19168201620002d0565b82815285828487010111156200035c57600080fd5b60005b838110156200037c5785810183015182820184015282016200035f565b506000928101909101919091529392505050565b80516001600160a01b0381168114620003a857600080fd5b919050565b600082601f830112620003bf57600080fd5b815160206001600160401b03821115620003dd57620003dd620002ba565b8160051b620003ee828201620002d0565b92835284810182019282810190878511156200040957600080fd5b83870192505b848310156200043357620004238362000390565b825291830191908301906200040f565b979650505050505050565b80516001600160601b0381168114620003a857600080fd5b60008060008060008060c087890312156200047057600080fd5b86516001600160401b03808211156200048857600080fd5b620004968a838b0162000303565b97506020890151915080821115620004ad57600080fd5b620004bb8a838b0162000303565b96506040890151915080821115620004d257600080fd5b620004e08a838b0162000303565b95506060890151915080821115620004f757600080fd5b506200050689828a01620003ad565b935050620005176080880162000390565b91506200052760a088016200043e565b90509295509295509295565b600181811c908216806200054857607f821691505b6020821081036200056957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005bd57600081815260208120601f850160051c81016020861015620005985750805b601f850160051c820191505b81811015620005b957828155600101620005a4565b5050505b505050565b81516001600160401b03811115620005de57620005de620002ba565b620005f681620005ef845462000533565b846200056f565b602080601f8311600181146200062e5760008415620006155750858301515b600019600386901b1c1916600185901b178555620005b9565b600085815260208120601f198616915b828110156200065f578886015182559484019460019091019084016200063e565b50858210156200067e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b612902806200069e6000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c80636a6278421161011a578063aa1b103f116100ad578063d62bb72d1161007c578063d62bb72d1461045c578063e985e9c51461046f578063f2fde38b14610482578063f3ddf2ad14610495578063f63bd38b146104a857600080fd5b8063aa1b103f1461041b578063b7ecbaae14610423578063b88d4fde14610436578063c87b56dd1461044957600080fd5b806394a7ef15116100e957806394a7ef15146103da57806395d89b41146103ed5780639e23c209146103f5578063a22cb4651461040857600080fd5b80636a6278421461038d57806370a08231146103a0578063715018a6146103c15780638da5cb5b146103c957600080fd5b806323b872dd1161019257806342966c681161016157806342966c68146103415780635eca4a701461035457806362700d35146103675780636352211e1461037a57600080fd5b806323b872dd146102c95780632a55205a146102dc5780633f9479db1461030e57806342842e0e1461032e57600080fd5b8063081812fc116101ce578063081812fc14610265578063095ea7b31461029057806319f57e1a146102a357806322fbf1e8146102b657600080fd5b806301ffc9a71461020057806304634d8d14610228578063061deeba1461023d57806306fdde0314610250575b600080fd5b61021361020e36600461219c565b6104bb565b60405190151581526020015b60405180910390f35b61023b6102363660046121d5565b6104cc565b005b61023b61024b366004612218565b610567565b610258610602565b60405161021f9190612292565b6102786102733660046122a5565b610694565b6040516001600160a01b03909116815260200161021f565b61023b61029e366004612218565b6106bb565b61023b6102b1366004612218565b61073e565b61023b6102c43660046122be565b6107a2565b61023b6102d73660046122d9565b6108c6565b6102ef6102ea366004612315565b6108f7565b604080516001600160a01b03909316835260208301919091520161021f565b61032161031c3660046122be565b6109a3565b60405161021f9190612337565b61023b61033c3660046122d9565b610a0f565b61023b61034f3660046122a5565b610a2a565b6102136103623660046122be565b610a6f565b61023b610375366004612218565b610ad3565b6102786103883660046122a5565b610bf4565b61023b61039b3660046122be565b610c54565b6103b36103ae3660046122be565b610d29565b60405190815260200161021f565b61023b610daf565b6008546001600160a01b0316610278565b61023b6103e83660046122be565b610dc3565b610258610e50565b61023b6104033660046122be565b610e5f565b61023b61041636600461238b565b611061565b61023b6110e0565b61023b6104313660046122be565b61114e565b61023b6104443660046123d4565b6111d8565b6102586104573660046122a5565b611210565b61023b61046a3660046122d9565b611277565b61021361047d3660046124b0565b6112db565b61023b6104903660046122be565b611309565b61023b6104a33660046124da565b61137f565b61023b6104b636600461250d565b6113cc565b60006104c682611446565b92915050565b6008546001600160a01b03163314806104e957506104e933610a6f565b61050e5760405162461bcd60e51b815260040161050590612528565b60405180910390fd5b610518828261146b565b604080516001600160a01b03841681526001600160601b03831660208201527f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef91015b60405180910390a15050565b6008546001600160a01b0316331480610584575061058433610a6f565b6105a05760405162461bcd60e51b815260040161050590612528565b6001600160a01b0382166000818152600d60209081526040808320805460018101825590845292829020909201849055815192835282018390527f611562c8cd08173719092faa5f88545353447eab89ed39add8879f649bc33cb1910161055b565b60606000805461061190612575565b80601f016020809104026020016040519081016040528092919081815260200182805461063d90612575565b801561068a5780601f1061065f5761010080835404028352916020019161068a565b820191906000526020600020905b81548152906001019060200180831161066d57829003601f168201915b5050505050905090565b600061069f82611568565b506000908152600460205260409020546001600160a01b031690565b600b5460ff16806106e457506001600160a01b0382166000908152600c602052604090205460ff165b6107305760405162461bcd60e51b815260206004820152601d60248201527f617070726f766520746f206973206e6f742077686974656c69737465640000006044820152606401610505565b61073a82826115c7565b5050565b6008546001600160a01b031633148061075b575061075b33610a6f565b6107775760405162461bcd60e51b815260040161050590612528565b60005b8181101561079d5761078b83610c54565b80610795816125c5565b91505061077a565b505050565b6008546001600160a01b03163314806107bf57506107bf33610a6f565b6107db5760405162461bcd60e51b815260040161050590612528565b6107e481610a6f565b156108415760405162461bcd60e51b815260206004820152602760248201527f546172676574206164647265737320697320616c7265616479207468652064656044820152663b32b637b832b960c91b6064820152608401610505565b600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0383169081179091556040519081527f058fdae480ed8e99b762bceb2d39835a68ee3a4789cd84e5c90cd59722ba0209906020015b60405180910390a150565b6108d033826116d7565b6108ec5760405162461bcd60e51b8152600401610505906125de565b61079d838383611736565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161096c5750604080518082019091526006546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061098b906001600160601b03168761262b565b6109959190612642565b915196919550909350505050565b6001600160a01b0381166000908152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610a0357602002820191906000526020600020905b8154815260200190600101908083116109ef575b50505050509050919050565b61079d838383604051806020016040528060008152506111d8565b6008546001600160a01b0316331480610a475750610a4733610a6f565b610a635760405162461bcd60e51b815260040161050590612528565b610a6c8161189a565b50565b6000805b600e54811015610aca57600e8181548110610a9057610a90612664565b6000918252602090912001546001600160a01b0390811690841603610ab85750600192915050565b80610ac2816125c5565b915050610a73565b50600092915050565b6008546001600160a01b0316331480610af05750610af033610a6f565b610b0c5760405162461bcd60e51b815260040161050590612528565b60005b6001600160a01b0383166000908152600d6020526040902054811015610bb4576001600160a01b0383166000908152600d60205260409020805483919083908110610b5c57610b5c612664565b906000526020600020015403610ba2576001600160a01b0383166000908152600d60205260409020805482908110610b9657610b96612664565b60009182526020822001555b80610bac816125c5565b915050610b0f565b50604080516001600160a01b0384168152602081018390527f14df3135e9f8deff5c78bfcf9b36ddc87b4dfce8f621a0506f5efa36b3d592e8910161055b565b6000818152600260205260408120546001600160a01b0316806104c65760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610505565b6008546001600160a01b0316331480610c715750610c7133610a6f565b610c8d5760405162461bcd60e51b815260040161050590612528565b610c9b600980546001019055565b6000610ca660095490565b9050610cb2828261192f565b8060010361073a57610cd782610cd06008546001600160a01b031690565b6001611aba565b60005b600e5481101561079d57610d1783600e8381548110610cfb57610cfb612664565b6000918252602090912001546001600160a01b03166001611aba565b80610d21816125c5565b915050610cda565b60006001600160a01b038216610d935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610505565b506001600160a01b031660009081526003602052604090205490565b610db7611b88565b610dc16000611be2565b565b6008546001600160a01b0316331480610de05750610de033610a6f565b610dfc5760405162461bcd60e51b815260040161050590612528565b6001600160a01b0381166000818152600c6020908152604091829020805460ff1916600117905590519182527f7e82e36808082f76da270c3c5e72976b35dd02ffdd5e28dc06990b08c959f7c091016108bb565b60606001805461061190612575565b6008546001600160a01b0316331480610e7c5750610e7c33610a6f565b610e985760405162461bcd60e51b815260040161050590612528565b610ea181610a6f565b610ef95760405162461bcd60e51b815260206004820152602360248201527f5461726765742061646472657373206973206e6f742074686520646576656c6f6044820152623832b960e91b6064820152608401610505565b6000805b600e54811015610f5457826001600160a01b0316600e8281548110610f2457610f24612664565b6000918252602090912001546001600160a01b031603610f42578091505b80610f4c816125c5565b915050610efd565b50805b600e54610f669060019061267a565b811015610ff157600e610f7a82600161268d565b81548110610f8a57610f8a612664565b600091825260209091200154600e80546001600160a01b039092169183908110610fb657610fb6612664565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905580610fe9816125c5565b915050610f57565b50600e805480611003576110036126a0565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03841681527f110a48e3e347ae018d4d40446e4e917b416f912dec489da19b4507bb9bb18cd4910161055b565b600b5460ff168061108a57506001600160a01b0382166000908152600c602052604090205460ff165b6110d65760405162461bcd60e51b815260206004820152601b60248201527f6f70657261746f72206973206e6f742077686974656c697374656400000000006044820152606401610505565b61073a8282611c34565b6008546001600160a01b03163314806110fd57506110fd33610a6f565b6111195760405162461bcd60e51b815260040161050590612528565b6111236000600655565b6040517f20126e7e20bc764763e15d3be485c23ca9eb6329c98c1a1c79657a72c1e8089090600090a1565b6008546001600160a01b031633148061116b575061116b33610a6f565b6111875760405162461bcd60e51b815260040161050590612528565b6001600160a01b0381166000818152600c6020908152604091829020805460ff1916905590519182527f45dcd9ab8c61f0629f2904906111e617d542ed4af59ecb4af2586823382a408c91016108bb565b6111e233836116d7565b6111fe5760405162461bcd60e51b8152600401610505906125de565b61120a84848484611c3f565b50505050565b606061121b82611568565b6000611225611c72565b905060008151116112455760405180602001604052806000815250611270565b8061124f84611ca4565b6040516020016112609291906126d2565b6040516020818303038152906040525b9392505050565b6008546001600160a01b0316331480611294575061129433610a6f565b6112b05760405162461bcd60e51b815260040161050590612528565b6112bb838383610a0f565b6112d182610cd06008546001600160a01b031690565b61079d8233610cd0565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611311611b88565b6001600160a01b0381166113765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610505565b610a6c81611be2565b6008546001600160a01b031633148061139c575061139c33610a6f565b6113b85760405162461bcd60e51b815260040161050590612528565b6113c28383610ad3565b61079d8382610567565b6008546001600160a01b03163314806113e957506113e933610a6f565b6114055760405162461bcd60e51b815260040161050590612528565b600b805460ff19168215159081179091556040519081527fcaa8488687f02e90366af4a215169fea22965c9a5fdd4a3a9787c9f0538a9404906020016108bb565b60006001600160e01b0319821663152a902d60e11b14806104c657506104c682611d37565b6127106001600160601b03821611156114d95760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610505565b6001600160a01b03821661152f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610505565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b6000818152600260205260409020546001600160a01b0316610a6c5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610505565b60006115d282610bf4565b9050806001600160a01b0316836001600160a01b03160361163f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610505565b336001600160a01b038216148061165b575061165b81336112db565b6116cd5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610505565b61079d8383611d87565b6000806116e383610bf4565b9050806001600160a01b0316846001600160a01b0316148061170a575061170a81856112db565b8061172e5750836001600160a01b031661172384610694565b6001600160a01b0316145b949350505050565b826001600160a01b031661174982610bf4565b6001600160a01b03161461176f5760405162461bcd60e51b815260040161050590612701565b6001600160a01b0382166117d15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610505565b826001600160a01b03166117e482610bf4565b6001600160a01b03161461180a5760405162461bcd60e51b815260040161050590612701565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006118a582610bf4565b90506118b082610bf4565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166119855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610505565b6000818152600260205260409020546001600160a01b0316156119ea5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610505565b6000818152600260205260409020546001600160a01b031615611a4f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610505565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603611b1b5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610505565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6008546001600160a01b03163314610dc15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610505565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61073a338383611aba565b611c4a848484611736565b611c5684848484611df5565b61120a5760405162461bcd60e51b815260040161050590612746565b6060600a611c7f30611ef6565b604051602001611c90929190612798565b604051602081830303815290604052905090565b60606000611cb183611f01565b600101905060008167ffffffffffffffff811115611cd157611cd16123be565b6040519080825280601f01601f191660200182016040528015611cfb576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611d0557509392505050565b60006001600160e01b031982166380ac58cd60e01b1480611d6857506001600160e01b03198216635b5e139f60e01b145b806104c657506301ffc9a760e01b6001600160e01b03198316146104c6565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611dbc82610bf4565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0384163b15611eeb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e3990339089908890889060040161285b565b6020604051808303816000875af1925050508015611e74575060408051601f3d908101601f19168201909252611e7191810190612898565b60015b611ed1573d808015611ea2576040519150601f19603f3d011682016040523d82523d6000602084013e611ea7565b606091505b508051600003611ec95760405162461bcd60e51b815260040161050590612746565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061172e565b506001949350505050565b60606104c682611fd9565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611f405772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611f6c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611f8a57662386f26fc10000830492506010015b6305f5e1008310611fa2576305f5e100830492506008015b6127108310611fb657612710830492506004015b60648310611fc8576064830492506002015b600a83106104c65760010192915050565b60606104c66001600160a01b038316601460606000611ff983600261262b565b61200490600261268d565b67ffffffffffffffff81111561201c5761201c6123be565b6040519080825280601f01601f191660200182016040528015612046576020820181803683370190505b509050600360fc1b8160008151811061206157612061612664565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061209057612090612664565b60200101906001600160f81b031916908160001a90535060006120b484600261262b565b6120bf90600161268d565b90505b6001811115612137576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120f3576120f3612664565b1a60f81b82828151811061210957612109612664565b60200101906001600160f81b031916908160001a90535060049490941c93612130816128b5565b90506120c2565b5083156112705760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610505565b6001600160e01b031981168114610a6c57600080fd5b6000602082840312156121ae57600080fd5b813561127081612186565b80356001600160a01b03811681146121d057600080fd5b919050565b600080604083850312156121e857600080fd5b6121f1836121b9565b915060208301356001600160601b038116811461220d57600080fd5b809150509250929050565b6000806040838503121561222b57600080fd5b612234836121b9565b946020939093013593505050565b60005b8381101561225d578181015183820152602001612245565b50506000910152565b6000815180845261227e816020860160208601612242565b601f01601f19169290920160200192915050565b6020815260006112706020830184612266565b6000602082840312156122b757600080fd5b5035919050565b6000602082840312156122d057600080fd5b611270826121b9565b6000806000606084860312156122ee57600080fd5b6122f7846121b9565b9250612305602085016121b9565b9150604084013590509250925092565b6000806040838503121561232857600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561236f57835183529284019291840191600101612353565b50909695505050505050565b803580151581146121d057600080fd5b6000806040838503121561239e57600080fd5b6123a7836121b9565b91506123b56020840161237b565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156123ea57600080fd5b6123f3856121b9565b9350612401602086016121b9565b925060408501359150606085013567ffffffffffffffff8082111561242557600080fd5b818701915087601f83011261243957600080fd5b81358181111561244b5761244b6123be565b604051601f8201601f19908116603f01168101908382118183101715612473576124736123be565b816040528281528a602084870101111561248c57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156124c357600080fd5b6124cc836121b9565b91506123b5602084016121b9565b6000806000606084860312156124ef57600080fd5b6124f8846121b9565b95602085013595506040909401359392505050565b60006020828403121561251f57600080fd5b6112708261237b565b6020808252602d908201527f43616c6c6572206973206e65697468657220746865206f776e6572206e6f722060408201526c3a3432903232bb32b637b832b960991b606082015260800190565b600181811c9082168061258957607f821691505b6020821081036125a957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600182016125d7576125d76125af565b5060010190565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b80820281158282048414176104c6576104c66125af565b60008261265f57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156104c6576104c66125af565b808201808211156104c6576104c66125af565b634e487b7160e01b600052603160045260246000fd5b600081516126c8818560208601612242565b9290920192915050565b600083516126e4818460208801612242565b8351908301906126f8818360208801612242565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600080845481600182811c9150808316806127b457607f831692505b602080841082036127d357634e487b7160e01b86526022600452602486fd5b8180156127e757600181146127fc57612829565b60ff1986168952841515850289019650612829565b60008b81526020902060005b868110156128215781548b820152908501908301612808565b505084890196505b50505050505061285261283c82866126b6565b692f746f6b656e5f69642f60b01b8152600a0190565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061288e90830184612266565b9695505050505050565b6000602082840312156128aa57600080fd5b815161127081612186565b6000816128c4576128c46125af565b50600019019056fea2646970667358221220605d8c86aac2875cbfac84def97fce2dcfbf33b2231bcacc069cf46f7976b10464736f6c6343000813003300000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002f68747470733a2f2f6170692d6d6574612e6e66742e7265636f63686f6b752e6a702f76312f636f6e7472616374732f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000556454e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004564e465400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000003aacbe21cc53315671ae913ddb2f2f4a05330505000000000000000000000000a4c426fb97e7eddc3055a2bd41e901db790ebc4b000000000000000000000000f06b25656d3399f3474de417f8b514bc31bcdb0c0000000000000000000000001babd0965530ff49e260875c169fcc514a58836f00000000000000000000000047ef91d7f14eac75821d5428de7972bc5b8217a9000000000000000000000000d9fe3c4bd92c87f1b81814dedb0334277417ef90000000000000000000000000be056b6adbd81109e3c5bb665667cdfc9456dbae0000000000000000000000005e0f53d36f2e85be7e15640e563d69eab15d2b91000000000000000000000000ff12da10cd4c7f39f852a1ea42f5dd3aee7c994e0000000000000000000000007baaf794b2d86955e466009cb1b46b670e3c8633
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80636a6278421161011a578063aa1b103f116100ad578063d62bb72d1161007c578063d62bb72d1461045c578063e985e9c51461046f578063f2fde38b14610482578063f3ddf2ad14610495578063f63bd38b146104a857600080fd5b8063aa1b103f1461041b578063b7ecbaae14610423578063b88d4fde14610436578063c87b56dd1461044957600080fd5b806394a7ef15116100e957806394a7ef15146103da57806395d89b41146103ed5780639e23c209146103f5578063a22cb4651461040857600080fd5b80636a6278421461038d57806370a08231146103a0578063715018a6146103c15780638da5cb5b146103c957600080fd5b806323b872dd1161019257806342966c681161016157806342966c68146103415780635eca4a701461035457806362700d35146103675780636352211e1461037a57600080fd5b806323b872dd146102c95780632a55205a146102dc5780633f9479db1461030e57806342842e0e1461032e57600080fd5b8063081812fc116101ce578063081812fc14610265578063095ea7b31461029057806319f57e1a146102a357806322fbf1e8146102b657600080fd5b806301ffc9a71461020057806304634d8d14610228578063061deeba1461023d57806306fdde0314610250575b600080fd5b61021361020e36600461219c565b6104bb565b60405190151581526020015b60405180910390f35b61023b6102363660046121d5565b6104cc565b005b61023b61024b366004612218565b610567565b610258610602565b60405161021f9190612292565b6102786102733660046122a5565b610694565b6040516001600160a01b03909116815260200161021f565b61023b61029e366004612218565b6106bb565b61023b6102b1366004612218565b61073e565b61023b6102c43660046122be565b6107a2565b61023b6102d73660046122d9565b6108c6565b6102ef6102ea366004612315565b6108f7565b604080516001600160a01b03909316835260208301919091520161021f565b61032161031c3660046122be565b6109a3565b60405161021f9190612337565b61023b61033c3660046122d9565b610a0f565b61023b61034f3660046122a5565b610a2a565b6102136103623660046122be565b610a6f565b61023b610375366004612218565b610ad3565b6102786103883660046122a5565b610bf4565b61023b61039b3660046122be565b610c54565b6103b36103ae3660046122be565b610d29565b60405190815260200161021f565b61023b610daf565b6008546001600160a01b0316610278565b61023b6103e83660046122be565b610dc3565b610258610e50565b61023b6104033660046122be565b610e5f565b61023b61041636600461238b565b611061565b61023b6110e0565b61023b6104313660046122be565b61114e565b61023b6104443660046123d4565b6111d8565b6102586104573660046122a5565b611210565b61023b61046a3660046122d9565b611277565b61021361047d3660046124b0565b6112db565b61023b6104903660046122be565b611309565b61023b6104a33660046124da565b61137f565b61023b6104b636600461250d565b6113cc565b60006104c682611446565b92915050565b6008546001600160a01b03163314806104e957506104e933610a6f565b61050e5760405162461bcd60e51b815260040161050590612528565b60405180910390fd5b610518828261146b565b604080516001600160a01b03841681526001600160601b03831660208201527f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef91015b60405180910390a15050565b6008546001600160a01b0316331480610584575061058433610a6f565b6105a05760405162461bcd60e51b815260040161050590612528565b6001600160a01b0382166000818152600d60209081526040808320805460018101825590845292829020909201849055815192835282018390527f611562c8cd08173719092faa5f88545353447eab89ed39add8879f649bc33cb1910161055b565b60606000805461061190612575565b80601f016020809104026020016040519081016040528092919081815260200182805461063d90612575565b801561068a5780601f1061065f5761010080835404028352916020019161068a565b820191906000526020600020905b81548152906001019060200180831161066d57829003601f168201915b5050505050905090565b600061069f82611568565b506000908152600460205260409020546001600160a01b031690565b600b5460ff16806106e457506001600160a01b0382166000908152600c602052604090205460ff165b6107305760405162461bcd60e51b815260206004820152601d60248201527f617070726f766520746f206973206e6f742077686974656c69737465640000006044820152606401610505565b61073a82826115c7565b5050565b6008546001600160a01b031633148061075b575061075b33610a6f565b6107775760405162461bcd60e51b815260040161050590612528565b60005b8181101561079d5761078b83610c54565b80610795816125c5565b91505061077a565b505050565b6008546001600160a01b03163314806107bf57506107bf33610a6f565b6107db5760405162461bcd60e51b815260040161050590612528565b6107e481610a6f565b156108415760405162461bcd60e51b815260206004820152602760248201527f546172676574206164647265737320697320616c7265616479207468652064656044820152663b32b637b832b960c91b6064820152608401610505565b600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0383169081179091556040519081527f058fdae480ed8e99b762bceb2d39835a68ee3a4789cd84e5c90cd59722ba0209906020015b60405180910390a150565b6108d033826116d7565b6108ec5760405162461bcd60e51b8152600401610505906125de565b61079d838383611736565b60008281526007602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161096c5750604080518082019091526006546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101516000906127109061098b906001600160601b03168761262b565b6109959190612642565b915196919550909350505050565b6001600160a01b0381166000908152600d6020908152604091829020805483518184028101840190945280845260609392830182828015610a0357602002820191906000526020600020905b8154815260200190600101908083116109ef575b50505050509050919050565b61079d838383604051806020016040528060008152506111d8565b6008546001600160a01b0316331480610a475750610a4733610a6f565b610a635760405162461bcd60e51b815260040161050590612528565b610a6c8161189a565b50565b6000805b600e54811015610aca57600e8181548110610a9057610a90612664565b6000918252602090912001546001600160a01b0390811690841603610ab85750600192915050565b80610ac2816125c5565b915050610a73565b50600092915050565b6008546001600160a01b0316331480610af05750610af033610a6f565b610b0c5760405162461bcd60e51b815260040161050590612528565b60005b6001600160a01b0383166000908152600d6020526040902054811015610bb4576001600160a01b0383166000908152600d60205260409020805483919083908110610b5c57610b5c612664565b906000526020600020015403610ba2576001600160a01b0383166000908152600d60205260409020805482908110610b9657610b96612664565b60009182526020822001555b80610bac816125c5565b915050610b0f565b50604080516001600160a01b0384168152602081018390527f14df3135e9f8deff5c78bfcf9b36ddc87b4dfce8f621a0506f5efa36b3d592e8910161055b565b6000818152600260205260408120546001600160a01b0316806104c65760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610505565b6008546001600160a01b0316331480610c715750610c7133610a6f565b610c8d5760405162461bcd60e51b815260040161050590612528565b610c9b600980546001019055565b6000610ca660095490565b9050610cb2828261192f565b8060010361073a57610cd782610cd06008546001600160a01b031690565b6001611aba565b60005b600e5481101561079d57610d1783600e8381548110610cfb57610cfb612664565b6000918252602090912001546001600160a01b03166001611aba565b80610d21816125c5565b915050610cda565b60006001600160a01b038216610d935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610505565b506001600160a01b031660009081526003602052604090205490565b610db7611b88565b610dc16000611be2565b565b6008546001600160a01b0316331480610de05750610de033610a6f565b610dfc5760405162461bcd60e51b815260040161050590612528565b6001600160a01b0381166000818152600c6020908152604091829020805460ff1916600117905590519182527f7e82e36808082f76da270c3c5e72976b35dd02ffdd5e28dc06990b08c959f7c091016108bb565b60606001805461061190612575565b6008546001600160a01b0316331480610e7c5750610e7c33610a6f565b610e985760405162461bcd60e51b815260040161050590612528565b610ea181610a6f565b610ef95760405162461bcd60e51b815260206004820152602360248201527f5461726765742061646472657373206973206e6f742074686520646576656c6f6044820152623832b960e91b6064820152608401610505565b6000805b600e54811015610f5457826001600160a01b0316600e8281548110610f2457610f24612664565b6000918252602090912001546001600160a01b031603610f42578091505b80610f4c816125c5565b915050610efd565b50805b600e54610f669060019061267a565b811015610ff157600e610f7a82600161268d565b81548110610f8a57610f8a612664565b600091825260209091200154600e80546001600160a01b039092169183908110610fb657610fb6612664565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905580610fe9816125c5565b915050610f57565b50600e805480611003576110036126a0565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03841681527f110a48e3e347ae018d4d40446e4e917b416f912dec489da19b4507bb9bb18cd4910161055b565b600b5460ff168061108a57506001600160a01b0382166000908152600c602052604090205460ff165b6110d65760405162461bcd60e51b815260206004820152601b60248201527f6f70657261746f72206973206e6f742077686974656c697374656400000000006044820152606401610505565b61073a8282611c34565b6008546001600160a01b03163314806110fd57506110fd33610a6f565b6111195760405162461bcd60e51b815260040161050590612528565b6111236000600655565b6040517f20126e7e20bc764763e15d3be485c23ca9eb6329c98c1a1c79657a72c1e8089090600090a1565b6008546001600160a01b031633148061116b575061116b33610a6f565b6111875760405162461bcd60e51b815260040161050590612528565b6001600160a01b0381166000818152600c6020908152604091829020805460ff1916905590519182527f45dcd9ab8c61f0629f2904906111e617d542ed4af59ecb4af2586823382a408c91016108bb565b6111e233836116d7565b6111fe5760405162461bcd60e51b8152600401610505906125de565b61120a84848484611c3f565b50505050565b606061121b82611568565b6000611225611c72565b905060008151116112455760405180602001604052806000815250611270565b8061124f84611ca4565b6040516020016112609291906126d2565b6040516020818303038152906040525b9392505050565b6008546001600160a01b0316331480611294575061129433610a6f565b6112b05760405162461bcd60e51b815260040161050590612528565b6112bb838383610a0f565b6112d182610cd06008546001600160a01b031690565b61079d8233610cd0565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611311611b88565b6001600160a01b0381166113765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610505565b610a6c81611be2565b6008546001600160a01b031633148061139c575061139c33610a6f565b6113b85760405162461bcd60e51b815260040161050590612528565b6113c28383610ad3565b61079d8382610567565b6008546001600160a01b03163314806113e957506113e933610a6f565b6114055760405162461bcd60e51b815260040161050590612528565b600b805460ff19168215159081179091556040519081527fcaa8488687f02e90366af4a215169fea22965c9a5fdd4a3a9787c9f0538a9404906020016108bb565b60006001600160e01b0319821663152a902d60e11b14806104c657506104c682611d37565b6127106001600160601b03821611156114d95760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610505565b6001600160a01b03821661152f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610505565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600655565b6000818152600260205260409020546001600160a01b0316610a6c5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610505565b60006115d282610bf4565b9050806001600160a01b0316836001600160a01b03160361163f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610505565b336001600160a01b038216148061165b575061165b81336112db565b6116cd5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610505565b61079d8383611d87565b6000806116e383610bf4565b9050806001600160a01b0316846001600160a01b0316148061170a575061170a81856112db565b8061172e5750836001600160a01b031661172384610694565b6001600160a01b0316145b949350505050565b826001600160a01b031661174982610bf4565b6001600160a01b03161461176f5760405162461bcd60e51b815260040161050590612701565b6001600160a01b0382166117d15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610505565b826001600160a01b03166117e482610bf4565b6001600160a01b03161461180a5760405162461bcd60e51b815260040161050590612701565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006118a582610bf4565b90506118b082610bf4565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166119855760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610505565b6000818152600260205260409020546001600160a01b0316156119ea5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610505565b6000818152600260205260409020546001600160a01b031615611a4f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610505565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603611b1b5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610505565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6008546001600160a01b03163314610dc15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610505565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61073a338383611aba565b611c4a848484611736565b611c5684848484611df5565b61120a5760405162461bcd60e51b815260040161050590612746565b6060600a611c7f30611ef6565b604051602001611c90929190612798565b604051602081830303815290604052905090565b60606000611cb183611f01565b600101905060008167ffffffffffffffff811115611cd157611cd16123be565b6040519080825280601f01601f191660200182016040528015611cfb576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611d0557509392505050565b60006001600160e01b031982166380ac58cd60e01b1480611d6857506001600160e01b03198216635b5e139f60e01b145b806104c657506301ffc9a760e01b6001600160e01b03198316146104c6565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611dbc82610bf4565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0384163b15611eeb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e3990339089908890889060040161285b565b6020604051808303816000875af1925050508015611e74575060408051601f3d908101601f19168201909252611e7191810190612898565b60015b611ed1573d808015611ea2576040519150601f19603f3d011682016040523d82523d6000602084013e611ea7565b606091505b508051600003611ec95760405162461bcd60e51b815260040161050590612746565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061172e565b506001949350505050565b60606104c682611fd9565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611f405772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611f6c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611f8a57662386f26fc10000830492506010015b6305f5e1008310611fa2576305f5e100830492506008015b6127108310611fb657612710830492506004015b60648310611fc8576064830492506002015b600a83106104c65760010192915050565b60606104c66001600160a01b038316601460606000611ff983600261262b565b61200490600261268d565b67ffffffffffffffff81111561201c5761201c6123be565b6040519080825280601f01601f191660200182016040528015612046576020820181803683370190505b509050600360fc1b8160008151811061206157612061612664565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061209057612090612664565b60200101906001600160f81b031916908160001a90535060006120b484600261262b565b6120bf90600161268d565b90505b6001811115612137576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120f3576120f3612664565b1a60f81b82828151811061210957612109612664565b60200101906001600160f81b031916908160001a90535060049490941c93612130816128b5565b90506120c2565b5083156112705760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610505565b6001600160e01b031981168114610a6c57600080fd5b6000602082840312156121ae57600080fd5b813561127081612186565b80356001600160a01b03811681146121d057600080fd5b919050565b600080604083850312156121e857600080fd5b6121f1836121b9565b915060208301356001600160601b038116811461220d57600080fd5b809150509250929050565b6000806040838503121561222b57600080fd5b612234836121b9565b946020939093013593505050565b60005b8381101561225d578181015183820152602001612245565b50506000910152565b6000815180845261227e816020860160208601612242565b601f01601f19169290920160200192915050565b6020815260006112706020830184612266565b6000602082840312156122b757600080fd5b5035919050565b6000602082840312156122d057600080fd5b611270826121b9565b6000806000606084860312156122ee57600080fd5b6122f7846121b9565b9250612305602085016121b9565b9150604084013590509250925092565b6000806040838503121561232857600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561236f57835183529284019291840191600101612353565b50909695505050505050565b803580151581146121d057600080fd5b6000806040838503121561239e57600080fd5b6123a7836121b9565b91506123b56020840161237b565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156123ea57600080fd5b6123f3856121b9565b9350612401602086016121b9565b925060408501359150606085013567ffffffffffffffff8082111561242557600080fd5b818701915087601f83011261243957600080fd5b81358181111561244b5761244b6123be565b604051601f8201601f19908116603f01168101908382118183101715612473576124736123be565b816040528281528a602084870101111561248c57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156124c357600080fd5b6124cc836121b9565b91506123b5602084016121b9565b6000806000606084860312156124ef57600080fd5b6124f8846121b9565b95602085013595506040909401359392505050565b60006020828403121561251f57600080fd5b6112708261237b565b6020808252602d908201527f43616c6c6572206973206e65697468657220746865206f776e6572206e6f722060408201526c3a3432903232bb32b637b832b960991b606082015260800190565b600181811c9082168061258957607f821691505b6020821081036125a957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600182016125d7576125d76125af565b5060010190565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b80820281158282048414176104c6576104c66125af565b60008261265f57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b818103818111156104c6576104c66125af565b808201808211156104c6576104c66125af565b634e487b7160e01b600052603160045260246000fd5b600081516126c8818560208601612242565b9290920192915050565b600083516126e4818460208801612242565b8351908301906126f8818360208801612242565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600080845481600182811c9150808316806127b457607f831692505b602080841082036127d357634e487b7160e01b86526022600452602486fd5b8180156127e757600181146127fc57612829565b60ff1986168952841515850289019650612829565b60008b81526020902060005b868110156128215781548b820152908501908301612808565b505084890196505b50505050505061285261283c82866126b6565b692f746f6b656e5f69642f60b01b8152600a0190565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061288e90830184612266565b9695505050505050565b6000602082840312156128aa57600080fd5b815161127081612186565b6000816128c4576128c46125af565b50600019019056fea2646970667358221220605d8c86aac2875cbfac84def97fce2dcfbf33b2231bcacc069cf46f7976b10464736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002f68747470733a2f2f6170692d6d6574612e6e66742e7265636f63686f6b752e6a702f76312f636f6e7472616374732f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000556454e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004564e465400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000003aacbe21cc53315671ae913ddb2f2f4a05330505000000000000000000000000a4c426fb97e7eddc3055a2bd41e901db790ebc4b000000000000000000000000f06b25656d3399f3474de417f8b514bc31bcdb0c0000000000000000000000001babd0965530ff49e260875c169fcc514a58836f00000000000000000000000047ef91d7f14eac75821d5428de7972bc5b8217a9000000000000000000000000d9fe3c4bd92c87f1b81814dedb0334277417ef90000000000000000000000000be056b6adbd81109e3c5bb665667cdfc9456dbae0000000000000000000000005e0f53d36f2e85be7e15640e563d69eab15d2b91000000000000000000000000ff12da10cd4c7f39f852a1ea42f5dd3aee7c994e0000000000000000000000007baaf794b2d86955e466009cb1b46b670e3c8633
-----Decoded View---------------
Arg [0] : tokenURIPrefix_ (string): https://api-meta.nft.recochoku.jp/v1/contracts/
Arg [1] : name_ (string): VENFT
Arg [2] : symbol_ (string): VNFT
Arg [3] : developers_ (address[]): 0x3AacBE21cc53315671aE913DDB2f2f4a05330505,0xa4C426fB97e7EDdc3055a2BD41E901dB790EBc4B,0xf06b25656d3399f3474DE417F8b514BC31BcDB0c,0x1BABd0965530Ff49e260875c169fCC514A58836f,0x47eF91d7f14EAC75821d5428de7972Bc5b8217A9,0xd9Fe3c4bd92C87F1b81814DEdB0334277417EF90,0xbE056B6aDbd81109e3C5bb665667CdfC9456dbAe,0x5E0f53D36F2E85Be7E15640e563D69eab15D2B91,0xff12dA10Cd4C7F39f852A1Ea42f5dD3aeE7c994e,0x7BAAF794B2d86955E466009cB1B46b670E3C8633
Arg [4] : royaltyReceiver_ (address): 0x0000000000000000000000000000000000000000
Arg [5] : royaltyFeeNumerator_ (uint96): 0
-----Encoded View---------------
24 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 000000000000000000000000000000000000000000000000000000000000002f
Arg [7] : 68747470733a2f2f6170692d6d6574612e6e66742e7265636f63686f6b752e6a
Arg [8] : 702f76312f636f6e7472616374732f0000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 56454e4654000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [12] : 564e465400000000000000000000000000000000000000000000000000000000
Arg [13] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [14] : 0000000000000000000000003aacbe21cc53315671ae913ddb2f2f4a05330505
Arg [15] : 000000000000000000000000a4c426fb97e7eddc3055a2bd41e901db790ebc4b
Arg [16] : 000000000000000000000000f06b25656d3399f3474de417f8b514bc31bcdb0c
Arg [17] : 0000000000000000000000001babd0965530ff49e260875c169fcc514a58836f
Arg [18] : 00000000000000000000000047ef91d7f14eac75821d5428de7972bc5b8217a9
Arg [19] : 000000000000000000000000d9fe3c4bd92c87f1b81814dedb0334277417ef90
Arg [20] : 000000000000000000000000be056b6adbd81109e3c5bb665667cdfc9456dbae
Arg [21] : 0000000000000000000000005e0f53d36f2e85be7e15640e563d69eab15d2b91
Arg [22] : 000000000000000000000000ff12da10cd4c7f39f852a1ea42f5dd3aee7c994e
Arg [23] : 0000000000000000000000007baaf794b2d86955e466009cb1b46b670e3c8633
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.