Contract Overview
Balance:
0 BTT
My Name Tag:
Not Available
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x75d332ae57dae6c50b2b72d8dec1b4c4ad8a2e5d9ad62c223408cedd3fee4caf | 0x60806040 | 14842200 | 76 days 10 hrs ago | 0x31003c2d5685c7d28d7174c3255307eb9a0f3015 | IN | Create: Membership | 0 BTT | 1,551.0996 |
[ Download CSV Export ]
Contract Name:
Membership
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// 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.8.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.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.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// 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 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 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 (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.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 `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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** * @title ERC-3525 Semi-Fungible Token Standard * @dev See https://eips.ethereum.org/EIPS/eip-3525 * Note: the ERC-165 identifier for this interface is 0xc97ae3d5. */ interface IERC3525 is IERC165, IERC721 { /** * @dev MUST emit when value of a token is transferred to another token with the same slot, * including zero value transfers (_value == 0) as well as transfers when tokens are created * (`_fromTokenId` == 0) or destroyed (`_toTokenId` == 0). * @param _fromTokenId The token id to transfer value from * @param _toTokenId The token id to transfer value to * @param _value The transferred value */ event TransferValue( uint256 indexed _fromTokenId, uint256 indexed _toTokenId, uint256 _value ); /** * @dev MUST emits when the approval value of a token is set or changed. * @param _tokenId The token to approve * @param _operator The operator to approve for * @param _value The maximum value that `_operator` is allowed to manage */ event ApprovalValue( uint256 indexed _tokenId, address indexed _operator, uint256 _value ); /** * @dev MUST emit when the slot of a token is set or changed. * @param _tokenId The token of which slot is set or changed * @param _oldSlot The previous slot of the token * @param _newSlot The updated slot of the token */ event SlotChanged( uint256 indexed _tokenId, uint256 indexed _oldSlot, uint256 indexed _newSlot ); /** * @notice Get the number of decimals the token uses for value - e.g. 6, means the user * representation of the value of a token can be calculated by dividing it by 1,000,000. * Considering the compatibility with third-party wallets, this function is defined as * `valueDecimals()` instead of `decimals()` to avoid conflict with ERC20 tokens. * @return The number of decimals for value */ function valueDecimals() external view returns (uint8); /** * @notice Get the value of a token. * @param _tokenId The token for which to query the balance * @return The value of `_tokenId` */ function balanceOf(uint256 _tokenId) external view returns (uint256); /** * @notice Get the slot of a token. * @param _tokenId The identifier for a token * @return The slot of the token */ function slotOf(uint256 _tokenId) external view returns (uint256); /** * @notice Allow an operator to manage the value of a token, up to the `_value` amount. * @dev MUST revert unless caller is the current owner, an authorized operator, or the approved * address for `_tokenId`. * MUST emit ApprovalValue event. * @param _tokenId The token to approve * @param _operator The operator to be approved * @param _value The maximum value of `_toTokenId` that `_operator` is allowed to manage */ function approve( uint256 _tokenId, address _operator, uint256 _value ) external; /** * @notice Get the maximum value of a token that an operator is allowed to manage. * @param _tokenId The token for which to query the allowance * @param _operator The address of an operator * @return The current approval value of `_tokenId` that `_operator` is allowed to manage */ function allowance( uint256 _tokenId, address _operator ) external view returns (uint256); /** * @notice Transfer value from a specified token to another specified token with the same slot. * @dev Caller MUST be the current owner, an authorized operator or an operator who has been * approved the whole `_fromTokenId` or part of it. * MUST revert if `_fromTokenId` or `_toTokenId` is zero token id or does not exist. * MUST revert if slots of `_fromTokenId` and `_toTokenId` do not match. * MUST revert if `_value` exceeds the balance of `_fromTokenId` or its allowance to the * operator. * MUST emit `TransferValue` event. * @param _fromTokenId The token to transfer value from * @param _toTokenId The token to transfer value to * @param _value The transferred value */ function transferFrom( uint256 _fromTokenId, uint256 _toTokenId, uint256 _value ) external; /** * @notice Transfer value from a specified token to an address. The caller should confirm that * `_to` is capable of receiving ERC3525 tokens. * @dev This function MUST create a new ERC3525 token with the same slot for `_to` to receive * the transferred value. * MUST revert if `_fromTokenId` is zero token id or does not exist. * MUST revert if `_to` is zero address. * MUST revert if `_value` exceeds the balance of `_fromTokenId` or its allowance to the * operator. * MUST emit `Transfer` and `TransferValue` events. * @param _fromTokenId The token to transfer value from * @param _to The address to transfer value to * @param _value The transferred value * @return ID of the new token created for `_to` which receives the transferred value */ function transferFrom( uint256 _fromTokenId, address _to, uint256 _value ) external returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "./IERC3525.sol"; /** * @title ERC-3525 Semi-Fungible Token Standard, optional extension for metadata * @dev Interfaces for any contract that wants to support query of the Uniform Resource Identifier * (URI) for the ERC3525 contract as well as a specified slot. * Because of the higher reliability of data stored in smart contracts compared to data stored in * centralized systems, it is recommended that metadata, including `contractURI`, `slotURI` and * `tokenURI`, be directly returned in JSON format, instead of being returned with a url pointing * to any resource stored in a centralized system. * See https://eips.ethereum.org/EIPS/eip-3525 * Note: the ERC-165 identifier for this interface is 0xe1600902. */ interface IERC3525Metadata is IERC3525, IERC721Metadata { /** * @notice Returns the Uniform Resource Identifier (URI) for the current ERC3525 contract. * @dev This function SHOULD return the URI for this contract in JSON format, starting with * header `data:application/json;`. * See https://eips.ethereum.org/EIPS/eip-3525 for the JSON schema for contract URI. * @return The JSON formatted URI of the current ERC3525 contract */ function contractURI() external view returns (string memory); /** * @notice Returns the Uniform Resource Identifier (URI) for the specified slot. * @dev This function SHOULD return the URI for `_slot` in JSON format, starting with header * `data:application/json;`. * See https://eips.ethereum.org/EIPS/eip-3525 for the JSON schema for slot URI. * @return The JSON formatted URI of `_slot` */ function slotURI(uint256 _slot) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC3525MetadataDescriptor { function constructContractURI() external view returns (string memory); function constructSlotURI( uint256 slot ) external view returns (string memory); function constructTokenURI( uint256 tokenId ) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title EIP-3525 token receiver interface * @dev Interface for a smart contract that wants to be informed by EIP-3525 contracts when * receiving values from ANY addresses or EIP-3525 tokens. * Note: the EIP-165 identifier for this interface is 0x009ce20b. */ interface IERC3525Receiver { /** * @notice Handle the receipt of an EIP-3525 token value. * @dev An EIP-3525 smart contract MUST check whether this function is implemented by the * recipient contract, if the recipient contract implements this function, the EIP-3525 * contract MUST call this function after a value transfer (i.e. `transferFrom(uint256, * uint256,uint256,bytes)`). * MUST return 0x009ce20b (i.e. `bytes4(keccak256('onERC3525Received(address,uint256,uint256, * uint256,bytes)'))`) if the transfer is accepted. * MUST revert or return any value other than 0x009ce20b if the transfer is rejected. * @param _operator The address which triggered the transfer * @param _fromTokenId The token id to transfer value from * @param _toTokenId The token id to transfer value to * @param _value The transferred value * @param _data Additional data with no specified format * @return `bytes4(keccak256('onERC3525Received(address,uint256,uint256,uint256,bytes)'))` * unless the transfer is rejected. */ function onERC3525Received( address _operator, uint256 _fromTokenId, uint256 _toTokenId, uint256 _value, bytes calldata _data ) external returns (bytes4); }
// SPDX-License-Identifier: None pragma solidity ^0.8.0; /** @title IManagement contract @dev Provide interfaces that allow interaction to Management contract */ interface IManagement { function treasury() external view returns (address); function hasRole( bytes32 role, address account ) external view returns (bool); function paymentTokens(address _token) external view returns (bool); function paused() external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/IManagement.sol"; import "./utils/ERC3525.sol"; contract Membership is ERC3525 { bytes32 private constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); bytes32 private constant MINTER_ROLE = keccak256("MINTER_ROLE"); IManagement public management; // Max tier per type (loyalty_type => max_tier) mapping(uint256 => uint256) public maxTiers; // Requiring points per tier (loyalty_type => tier_no => points) mapping(uint256 => mapping(uint256 => uint256)) public requirements; // Mapping current Tier to an account (address => loyalty_type => tier_no) mapping(address => mapping(uint256 => uint256)) public tiers; // TokenURI = baseURI + tokenId.toString() string public baseURI; modifier onlyManager() { require(management.hasRole(MANAGER_ROLE, _msgSender()), "Only Manager"); _; } modifier onlyMinter() { require(management.hasRole(MINTER_ROLE, _msgSender()), "Only Minter"); _; } modifier onPaused() { require(!management.paused(), "On Paused"); _; } modifier disabled() { _; revert("Membership: transfer is disabled"); } event Cancel(uint256 memberId); event Registration( address indexed member, uint256 indexed memberId, uint256 indexed typeOf, uint256 value ); event UpdatePoint(uint256 indexed memberId, uint256 oValue, uint256 nValue); event Upgraded( address indexed member, uint256 indexed memberId, uint256 indexed typeOf, uint256 oTier, uint256 nTier ); constructor( IManagement _management, string memory name, string memory symbol, string memory baseURI_, uint8 decimals_ ) ERC3525(name, symbol, decimals_) { management = _management; baseURI = baseURI_; } function updateBaseURI(string calldata _uri) external onlyManager { baseURI = _uri; } function config( uint256 _type, uint256[] calldata _values ) external onlyManager { // Should allow update tier's requirements ???? uint256 _currentMaxTier = maxTiers[_type]; uint256 _maxTiers = _values.length; uint256 _max; uint256 _value; for (uint256 i; i < _maxTiers; i++) { _value = _values[i]; require(_value > _max, "Not ascending order"); _max = _value; requirements[_type][i + 1] = _values[i]; } maxTiers[_type] = _maxTiers; if (_maxTiers < _currentMaxTier) { _value = _currentMaxTier - _maxTiers; for (uint256 i; i < _value; i++) delete requirements[_type][_maxTiers + i + 1]; } } function upgrade(uint256 _memberId) external { address _caller = _msgSender(); require(ownerOf(_memberId) == _caller, "Member Id not owned by caller"); uint256 _typeOf = slotOf(_memberId); uint256 _maxTiers = maxTiers[_typeOf]; uint256 _tier = tiers[_caller][_typeOf]; require( _tier < _maxTiers, "Cannot upgrade to the next tier. You have reached a max tier" ); uint256 nextTier_ = _nextTier( balanceOf(_memberId), _typeOf, _tier, _maxTiers ); require(nextTier_ > _tier, "Not enough points to upgrade"); tiers[_caller][_typeOf] = nextTier_; emit Upgraded(_caller, _memberId, _typeOf, _tier, nextTier_); } function addMembership( address _account, uint256 _memberId, uint256 _type, uint256 _value ) external onlyMinter { _mint(_account, _memberId, _type, _value); emit Registration(_account, _memberId, _type, _value); } function updatePoint( uint256 _memberId, uint256 _value, bool _isAdded ) external onlyMinter { uint256 _oPoint = balanceOf(_memberId); if (_isAdded) _mintValue(_memberId, _value); else _burnValue(_memberId, _value); uint256 _nPoint = balanceOf(_memberId); emit UpdatePoint(_memberId, _oPoint, _nPoint); } function cancelMembership(uint256 _memberId) external onlyMinter { _burn(_memberId); emit Cancel(_memberId); } function _baseURI() internal view override returns (string memory) { return baseURI; } function _nextTier( uint256 _balance, uint256 _typeOf, uint256 _tier, uint256 _maxTiers ) private view returns (uint256) { uint256 _nextRequirement = requirements[_typeOf][_maxTiers]; uint256 _mid; if (_balance >= _nextRequirement) return _maxTiers; uint256 _lo = _tier; uint256 _hi = _maxTiers; while (_lo <= _hi) { _mid = (_lo + _hi) / 2; _nextRequirement = requirements[_typeOf][_mid]; if (_balance < _nextRequirement) { _hi = _mid - 1; } else if (_balance > _nextRequirement) { _lo = _mid + 1; } else { return _mid; } } return _hi; } function _beforeValueTransfer( address _from, address _to, uint256 _fromTokenId, uint256 _toTokenId, uint256 _slot, uint256 _value ) internal override onPaused { super._beforeValueTransfer( _from, _to, _fromTokenId, _toTokenId, _slot, _value ); } function safeTransferFrom( address _from, address _to, uint256 _memberId, bytes memory _data ) public override disabled {} function safeTransferFrom( address _from, address _to, uint256 _memberId ) public override disabled {} function transferFrom( address _from, address _to, uint256 _memberId ) public override disabled {} function transferFrom( uint256 _fromMemberId, uint256 _toMemberId, uint256 _value ) public override disabled {} function transferFrom( uint256 _fromMemberId, address _to, uint256 _value ) public override disabled returns (uint256) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "../interfaces/IERC3525.sol"; import "../interfaces/IERC3525Receiver.sol"; import "../interfaces/IERC3525Metadata.sol"; import "../interfaces/IERC3525MetadataDescriptor.sol"; contract ERC3525 is Context, IERC3525Metadata, IERC721Enumerable { using Strings for address; using Strings for uint256; using Address for address; event SetMetadataDescriptor(address indexed metadataDescriptor); struct TokenData { uint256 id; uint256 slot; uint256 balance; address owner; address approved; address[] valueApprovals; } struct AddressData { uint256[] ownedTokens; mapping(uint256 => uint256) ownedTokensIndex; mapping(address => bool) approvals; } string private _name; string private _symbol; uint8 private _decimals; mapping(uint256 => mapping(address => uint256)) private _approvedValues; TokenData[] private _allTokens; mapping(uint256 => uint256) private _allTokensIndex; mapping(address => AddressData) private _addressData; IERC3525MetadataDescriptor public metadataDescriptor; constructor(string memory name_, string memory symbol_, uint8 decimals_) { _name = name_; _symbol = symbol_; _decimals = decimals_; } function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId || interfaceId == type(IERC3525).interfaceId || interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC3525Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || interfaceId == type(IERC721Metadata).interfaceId; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function valueDecimals() public view virtual override returns (uint8) { return _decimals; } function balanceOf( uint256 tokenId_ ) public view virtual override returns (uint256) { _requireMinted(tokenId_); return _allTokens[_allTokensIndex[tokenId_]].balance; } function ownerOf( uint256 tokenId_ ) public view virtual override returns (address owner_) { _requireMinted(tokenId_); owner_ = _allTokens[_allTokensIndex[tokenId_]].owner; require(owner_ != address(0), "ERC3525: invalid token ID"); } function slotOf( uint256 tokenId_ ) public view virtual override returns (uint256) { _requireMinted(tokenId_); return _allTokens[_allTokensIndex[tokenId_]].slot; } function _baseURI() internal view virtual returns (string memory) { return ""; } function contractURI() public view virtual override returns (string memory) { string memory baseURI = _baseURI(); return address(metadataDescriptor) != address(0) ? metadataDescriptor.constructContractURI() : bytes(baseURI).length > 0 ? string( abi.encodePacked( baseURI, "contract/", Strings.toHexString(address(this)) ) ) : ""; } function slotURI( uint256 slot_ ) public view virtual override returns (string memory) { string memory baseURI = _baseURI(); return address(metadataDescriptor) != address(0) ? metadataDescriptor.constructSlotURI(slot_) : bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, "slot/", slot_.toString())) : ""; } function tokenURI( uint256 tokenId_ ) public view virtual override returns (string memory) { _requireMinted(tokenId_); string memory baseURI = _baseURI(); return address(metadataDescriptor) != address(0) ? metadataDescriptor.constructTokenURI(tokenId_) : bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId_.toString())) : ""; } function approve( uint256 tokenId_, address to_, uint256 value_ ) public virtual override { address owner = ERC3525.ownerOf(tokenId_); require(to_ != owner, "ERC3525: approval to current owner"); require( _msgSender() == owner || ERC3525.isApprovedForAll(owner, _msgSender()), "ERC3525: approve caller is not owner nor approved for all" ); _approveValue(tokenId_, to_, value_); } function allowance( uint256 tokenId_, address operator_ ) public view virtual override returns (uint256) { _requireMinted(tokenId_); return _approvedValues[tokenId_][operator_]; } function transferFrom( uint256 fromTokenId_, address to_, uint256 value_ ) public virtual override returns (uint256) { _spendAllowance(_msgSender(), fromTokenId_, value_); uint256 newTokenId = _createDerivedTokenId(fromTokenId_); _mint(to_, newTokenId, ERC3525.slotOf(fromTokenId_), 0); _transferValue(fromTokenId_, newTokenId, value_); return newTokenId; } function transferFrom( uint256 fromTokenId_, uint256 toTokenId_, uint256 value_ ) public virtual override { _spendAllowance(_msgSender(), fromTokenId_, value_); _transferValue(fromTokenId_, toTokenId_, value_); } function balanceOf( address owner_ ) public view virtual override returns (uint256 balance) { require( owner_ != address(0), "ERC3525: balance query for the zero address" ); return _addressData[owner_].ownedTokens.length; } function transferFrom( address from_, address to_, uint256 tokenId_ ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId_), "ERC3525: transfer caller is not owner nor approved" ); _transferTokenId(from_, to_, tokenId_); } function safeTransferFrom( address from_, address to_, uint256 tokenId_, bytes memory data_ ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId_), "ERC3525: transfer caller is not owner nor approved" ); _safeTransferTokenId(from_, to_, tokenId_, data_); } function safeTransferFrom( address from_, address to_, uint256 tokenId_ ) public virtual override { safeTransferFrom(from_, to_, tokenId_, ""); } function approve(address to_, uint256 tokenId_) public virtual override { address owner = ERC3525.ownerOf(tokenId_); require(to_ != owner, "ERC3525: approval to current owner"); require( _msgSender() == owner || ERC3525.isApprovedForAll(owner, _msgSender()), "ERC3525: approve caller is not owner nor approved for all" ); _approve(to_, tokenId_); } function getApproved( uint256 tokenId_ ) public view virtual override returns (address) { _requireMinted(tokenId_); return _allTokens[_allTokensIndex[tokenId_]].approved; } function setApprovalForAll( address operator_, bool approved_ ) public virtual override { _setApprovalForAll(_msgSender(), operator_, approved_); } function isApprovedForAll( address owner_, address operator_ ) public view virtual override returns (bool) { return _addressData[owner_].approvals[operator_]; } function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } function tokenByIndex( uint256 index_ ) public view virtual override returns (uint256) { require( index_ < ERC3525.totalSupply(), "ERC3525: global index out of bounds" ); return _allTokens[index_].id; } function tokenOfOwnerByIndex( address owner_, uint256 index_ ) public view virtual override returns (uint256) { require( index_ < ERC3525.balanceOf(owner_), "ERC3525: owner index out of bounds" ); return _addressData[owner_].ownedTokens[index_]; } function _setApprovalForAll( address owner_, address operator_, bool approved_ ) internal virtual { require(owner_ != operator_, "ERC3525: approve to caller"); _addressData[owner_].approvals[operator_] = approved_; emit ApprovalForAll(owner_, operator_, approved_); } function _isApprovedOrOwner( address operator_, uint256 tokenId_ ) internal view virtual returns (bool) { _requireMinted(tokenId_); address owner = ERC3525.ownerOf(tokenId_); return (operator_ == owner || ERC3525.isApprovedForAll(owner, operator_) || ERC3525.getApproved(tokenId_) == operator_); } function _spendAllowance( address operator_, uint256 tokenId_, uint256 value_ ) internal virtual { uint256 currentAllowance = ERC3525.allowance(tokenId_, operator_); if ( !_isApprovedOrOwner(operator_, tokenId_) && currentAllowance != type(uint256).max ) { require( currentAllowance >= value_, "ERC3525: insufficient allowance" ); _approveValue(tokenId_, operator_, currentAllowance - value_); } } function _exists(uint256 tokenId_) internal view virtual returns (bool) { return _allTokens.length != 0 && _allTokens[_allTokensIndex[tokenId_]].id == tokenId_; } function _requireMinted(uint256 tokenId_) internal view virtual { require(_exists(tokenId_), "ERC3525: invalid token ID"); } function _mint( address to_, uint256 slot_, uint256 value_ ) internal virtual returns (uint256) { uint256 tokenId = _createOriginalTokenId(); _mint(to_, tokenId, slot_, value_); return tokenId; } function _mint( address to_, uint256 tokenId_, uint256 slot_, uint256 value_ ) internal virtual { require(to_ != address(0), "ERC3525: mint to the zero address"); require(tokenId_ != 0, "ERC3525: cannot mint zero tokenId"); require(!_exists(tokenId_), "ERC3525: token already minted"); _beforeValueTransfer(address(0), to_, 0, tokenId_, slot_, value_); __mintToken(to_, tokenId_, slot_); __mintValue(tokenId_, value_); _afterValueTransfer(address(0), to_, 0, tokenId_, slot_, value_); } function _mintValue(uint256 tokenId_, uint256 value_) internal virtual { _requireMinted(tokenId_); address owner = ERC3525.ownerOf(tokenId_); uint256 slot = ERC3525.slotOf(tokenId_); _beforeValueTransfer(address(0), owner, 0, tokenId_, slot, value_); __mintValue(tokenId_, value_); _afterValueTransfer(address(0), owner, 0, tokenId_, slot, value_); } function __mintValue(uint256 tokenId_, uint256 value_) private { _allTokens[_allTokensIndex[tokenId_]].balance += value_; emit TransferValue(0, tokenId_, value_); } function __mintToken(address to_, uint256 tokenId_, uint256 slot_) private { TokenData memory tokenData = TokenData({ id: tokenId_, slot: slot_, balance: 0, owner: to_, approved: address(0), valueApprovals: new address[](0) }); _addTokenToAllTokensEnumeration(tokenData); _addTokenToOwnerEnumeration(to_, tokenId_); emit Transfer(address(0), to_, tokenId_); emit SlotChanged(tokenId_, 0, slot_); } function _burn(uint256 tokenId_) internal virtual { _requireMinted(tokenId_); TokenData storage tokenData = _allTokens[_allTokensIndex[tokenId_]]; address owner = tokenData.owner; uint256 slot = tokenData.slot; uint256 value = tokenData.balance; _beforeValueTransfer(owner, address(0), tokenId_, 0, slot, value); _clearApprovedValues(tokenId_); _removeTokenFromOwnerEnumeration(owner, tokenId_); _removeTokenFromAllTokensEnumeration(tokenId_); emit TransferValue(tokenId_, 0, value); emit SlotChanged(tokenId_, slot, 0); emit Transfer(owner, address(0), tokenId_); _afterValueTransfer(owner, address(0), tokenId_, 0, slot, value); } function _burnValue(uint256 tokenId_, uint256 burnValue_) internal virtual { _requireMinted(tokenId_); TokenData storage tokenData = _allTokens[_allTokensIndex[tokenId_]]; address owner = tokenData.owner; uint256 slot = tokenData.slot; uint256 value = tokenData.balance; require(value >= burnValue_, "ERC3525: burn value exceeds balance"); _beforeValueTransfer(owner, address(0), tokenId_, 0, slot, burnValue_); tokenData.balance -= burnValue_; emit TransferValue(tokenId_, 0, burnValue_); _afterValueTransfer(owner, address(0), tokenId_, 0, slot, burnValue_); } function _addTokenToOwnerEnumeration( address to_, uint256 tokenId_ ) private { _allTokens[_allTokensIndex[tokenId_]].owner = to_; _addressData[to_].ownedTokensIndex[tokenId_] = _addressData[to_] .ownedTokens .length; _addressData[to_].ownedTokens.push(tokenId_); } function _removeTokenFromOwnerEnumeration( address from_, uint256 tokenId_ ) private { _allTokens[_allTokensIndex[tokenId_]].owner = address(0); AddressData storage ownerData = _addressData[from_]; uint256 lastTokenIndex = ownerData.ownedTokens.length - 1; uint256 lastTokenId = ownerData.ownedTokens[lastTokenIndex]; uint256 tokenIndex = ownerData.ownedTokensIndex[tokenId_]; ownerData.ownedTokens[tokenIndex] = lastTokenId; ownerData.ownedTokensIndex[lastTokenId] = tokenIndex; delete ownerData.ownedTokensIndex[tokenId_]; ownerData.ownedTokens.pop(); } function _addTokenToAllTokensEnumeration( TokenData memory tokenData_ ) private { _allTokensIndex[tokenData_.id] = _allTokens.length; _allTokens.push(tokenData_); } function _removeTokenFromAllTokensEnumeration(uint256 tokenId_) private { uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId_]; TokenData memory lastTokenData = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenData; _allTokensIndex[lastTokenData.id] = tokenIndex; delete _allTokensIndex[tokenId_]; _allTokens.pop(); } function _approve(address to_, uint256 tokenId_) internal virtual { _allTokens[_allTokensIndex[tokenId_]].approved = to_; emit Approval(ERC3525.ownerOf(tokenId_), to_, tokenId_); } function _approveValue( uint256 tokenId_, address to_, uint256 value_ ) internal virtual { require( to_ != address(0), "ERC3525: approve value to the zero address" ); if (!_existApproveValue(to_, tokenId_)) { _allTokens[_allTokensIndex[tokenId_]].valueApprovals.push(to_); } _approvedValues[tokenId_][to_] = value_; emit ApprovalValue(tokenId_, to_, value_); } function _clearApprovedValues(uint256 tokenId_) internal virtual { TokenData storage tokenData = _allTokens[_allTokensIndex[tokenId_]]; uint256 length = tokenData.valueApprovals.length; for (uint256 i = 0; i < length; i++) { address approval = tokenData.valueApprovals[i]; delete _approvedValues[tokenId_][approval]; } } function _existApproveValue( address to_, uint256 tokenId_ ) internal view virtual returns (bool) { uint256 length = _allTokens[_allTokensIndex[tokenId_]] .valueApprovals .length; for (uint256 i = 0; i < length; i++) { if ( _allTokens[_allTokensIndex[tokenId_]].valueApprovals[i] == to_ ) { return true; } } return false; } function _transferValue( uint256 fromTokenId_, uint256 toTokenId_, uint256 value_ ) internal virtual { require( _exists(fromTokenId_), "ERC3525: transfer from invalid token ID" ); require(_exists(toTokenId_), "ERC3525: transfer to invalid token ID"); TokenData storage fromTokenData = _allTokens[ _allTokensIndex[fromTokenId_] ]; TokenData storage toTokenData = _allTokens[_allTokensIndex[toTokenId_]]; require( fromTokenData.balance >= value_, "ERC3525: insufficient balance for transfer" ); require( fromTokenData.slot == toTokenData.slot, "ERC3525: transfer to token with different slot" ); _beforeValueTransfer( fromTokenData.owner, toTokenData.owner, fromTokenId_, toTokenId_, fromTokenData.slot, value_ ); fromTokenData.balance -= value_; toTokenData.balance += value_; emit TransferValue(fromTokenId_, toTokenId_, value_); _afterValueTransfer( fromTokenData.owner, toTokenData.owner, fromTokenId_, toTokenId_, fromTokenData.slot, value_ ); require( _checkOnERC3525Received(fromTokenId_, toTokenId_, value_, ""), "ERC3525: transfer to non ERC3525Receiver" ); } function _transferTokenId( address from_, address to_, uint256 tokenId_ ) internal virtual { require( ERC3525.ownerOf(tokenId_) == from_, "ERC3525: transfer from invalid owner" ); require(to_ != address(0), "ERC3525: transfer to the zero address"); uint256 slot = ERC3525.slotOf(tokenId_); uint256 value = ERC3525.balanceOf(tokenId_); _beforeValueTransfer(from_, to_, tokenId_, tokenId_, slot, value); _approve(address(0), tokenId_); _clearApprovedValues(tokenId_); _removeTokenFromOwnerEnumeration(from_, tokenId_); _addTokenToOwnerEnumeration(to_, tokenId_); emit Transfer(from_, to_, tokenId_); _afterValueTransfer(from_, to_, tokenId_, tokenId_, slot, value); } function _safeTransferTokenId( address from_, address to_, uint256 tokenId_, bytes memory data_ ) internal virtual { _transferTokenId(from_, to_, tokenId_); require( _checkOnERC721Received(from_, to_, tokenId_, data_), "ERC3525: transfer to non ERC721Receiver" ); } function _checkOnERC3525Received( uint256 fromTokenId_, uint256 toTokenId_, uint256 value_, bytes memory data_ ) private returns (bool) { address to = ERC3525.ownerOf(toTokenId_); if ( to.isContract() && IERC165(to).supportsInterface(type(IERC3525Receiver).interfaceId) ) { try IERC3525Receiver(to).onERC3525Received( _msgSender(), fromTokenId_, toTokenId_, value_, data_ ) returns (bytes4 retval) { return retval == IERC3525Receiver.onERC3525Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC3525: transfer to non ERC3525Receiver"); } else { // solhint-disable-next-line assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } function _checkOnERC721Received( address from_, address to_, uint256 tokenId_, bytes memory data_ ) private returns (bool) { if ( to_.isContract() && IERC165(to_).supportsInterface(type(IERC721Receiver).interfaceId) ) { 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"); } else { // solhint-disable-next-line assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /* solhint-disable */ function _beforeValueTransfer( address from_, address to_, uint256 fromTokenId_, uint256 toTokenId_, uint256 slot_, uint256 value_ ) internal virtual {} function _afterValueTransfer( address from_, address to_, uint256 fromTokenId_, uint256 toTokenId_, uint256 slot_, uint256 value_ ) internal virtual {} /* solhint-enable */ function _setMetadataDescriptor( address metadataDescriptor_ ) internal virtual { metadataDescriptor = IERC3525MetadataDescriptor(metadataDescriptor_); emit SetMetadataDescriptor(metadataDescriptor_); } function _createOriginalTokenId() internal virtual returns (uint256) { return _createDefaultTokenId(); } function _createDerivedTokenId( uint256 fromTokenId_ ) internal virtual returns (uint256) { fromTokenId_; return _createDefaultTokenId(); } function _createDefaultTokenId() private view returns (uint256) { return ERC3525.totalSupply() + 1; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"contract IManagement","name":"_management","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"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":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"ApprovalValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"memberId","type":"uint256"}],"name":"Cancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"},{"indexed":true,"internalType":"uint256","name":"memberId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"typeOf","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Registration","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"metadataDescriptor","type":"address"}],"name":"SetMetadataDescriptor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_oldSlot","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_newSlot","type":"uint256"}],"name":"SlotChanged","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":true,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_toTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"memberId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nValue","type":"uint256"}],"name":"UpdatePoint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"member","type":"address"},{"indexed":true,"internalType":"uint256","name":"memberId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"typeOf","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oTier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nTier","type":"uint256"}],"name":"Upgraded","type":"event"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_memberId","type":"uint256"},{"internalType":"uint256","name":"_type","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"addMembership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"address","name":"operator_","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_memberId","type":"uint256"}],"name":"cancelMembership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_type","type":"uint256"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"config","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"owner_","type":"address"},{"internalType":"address","name":"operator_","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"management","outputs":[{"internalType":"contract IManagement","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxTiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataDescriptor","outputs":[{"internalType":"contract IERC3525MetadataDescriptor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"requirements","outputs":[{"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":"_memberId","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":"_memberId","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":"uint256","name":"tokenId_","type":"uint256"}],"name":"slotOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"slot_","type":"uint256"}],"name":"slotURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"index_","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromMemberId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_memberId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromMemberId","type":"uint256"},{"internalType":"uint256","name":"_toMemberId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_memberId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bool","name":"_isAdded","type":"bool"}],"name":"updatePoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_memberId","type":"uint256"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"valueDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162005fcf38038062005fcf8339818101604052810190620000379190620003f3565b838382826000908051906020019062000052929190620000ef565b5081600190805190602001906200006b929190620000ef565b5080600260006101000a81548160ff021916908360ff16021790555050505084600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600c9080519060200190620000e3929190620000ef565b5050505050506200053d565b828054620000fd9062000507565b90600052602060002090601f0160209004810192826200012157600085556200016d565b82601f106200013c57805160ff19168380011785556200016d565b828001600101855582156200016d579182015b828111156200016c5782518255916020019190600101906200014f565b5b5090506200017c919062000180565b5090565b5b808211156200019b57600081600090555060010162000181565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001e082620001b3565b9050919050565b6000620001f482620001d3565b9050919050565b6200020681620001e7565b81146200021257600080fd5b50565b6000815190506200022681620001fb565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620002818262000236565b810181811067ffffffffffffffff82111715620002a357620002a262000247565b5b80604052505050565b6000620002b86200019f565b9050620002c6828262000276565b919050565b600067ffffffffffffffff821115620002e957620002e862000247565b5b620002f48262000236565b9050602081019050919050565b60005b838110156200032157808201518184015260208101905062000304565b8381111562000331576000848401525b50505050565b60006200034e6200034884620002cb565b620002ac565b9050828152602081018484840111156200036d576200036c62000231565b5b6200037a84828562000301565b509392505050565b600082601f8301126200039a57620003996200022c565b5b8151620003ac84826020860162000337565b91505092915050565b600060ff82169050919050565b620003cd81620003b5565b8114620003d957600080fd5b50565b600081519050620003ed81620003c2565b92915050565b600080600080600060a08688031215620004125762000411620001a9565b5b6000620004228882890162000215565b955050602086015167ffffffffffffffff811115620004465762000445620001ae565b5b620004548882890162000382565b945050604086015167ffffffffffffffff811115620004785762000477620001ae565b5b620004868882890162000382565b935050606086015167ffffffffffffffff811115620004aa57620004a9620001ae565b5b620004b88882890162000382565b9250506080620004cb88828901620003dc565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200052057607f821691505b60208210811415620005375762000536620004d8565b5b50919050565b615a82806200054d6000396000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c806370a0823111610130578063a71dac47116100b8578063d955299b1161007c578063d955299b146106be578063dcdd2d59146106da578063e345e0bc1461070a578063e8a3d4851461073a578063e985e9c51461075857610227565b8063a71dac471461060a578063a81462861461063a578063b88d4fde14610656578063c87b56dd14610672578063d0a9e1f3146106a257610227565b80638cb0a511116100ff5780638cb0a51114610568578063931688cb1461058457806395d89b41146105a05780639cc7f708146105be578063a22cb465146105ee57610227565b806370a08231146104e0578063840f71131461051057806388a8d6021461052e57806389def3201461054c57610227565b80632f745c59116101b357806345977d031161018257806345977d03146104165780634f6ccce71461043257806351dae4f4146104625780636352211e146104925780636c0360eb146104c257610227565b80632f745c5914610390578063310ed7f0146103c05780633e7e8669146103dc57806342842e0e146103fa57610227565b806309c3dd87116101fa57806309c3dd87146102c65780630f485c02146102f657806318160ddd1461032657806323b872dd14610344578063263f3e7e1461036057610227565b806301ffc9a71461022c57806306fdde031461025c578063081812fc1461027a578063095ea7b3146102aa575b600080fd5b610246600480360381019061024191906140db565b610788565b6040516102539190614123565b60405180910390f35b6102646109fa565b60405161027191906141d7565b60405180910390f35b610294600480360381019061028f919061422f565b610a8c565b6040516102a1919061429d565b60405180910390f35b6102c460048036038101906102bf91906142e4565b610af7565b005b6102e060048036038101906102db919061422f565b610c0f565b6040516102ed91906141d7565b60405180910390f35b610310600480360381019061030b9190614324565b610d7b565b60405161031d9190614386565b60405180910390f35b61032e610db8565b60405161033b9190614386565b60405180910390f35b61035e600480360381019061035991906143a1565b610dc5565b005b61037a6004803603810190610375919061422f565b610e00565b6040516103879190614386565b60405180910390f35b6103aa60048036038101906103a591906142e4565b610e4b565b6040516103b79190614386565b60405180910390f35b6103da60048036038101906103d591906143f4565b610efe565b005b6103e4610f39565b6040516103f19190614463565b60405180910390f35b610414600480360381019061040f91906143a1565b610f50565b005b610430600480360381019061042b919061422f565b610f8b565b005b61044c6004803603810190610447919061422f565b6111d2565b6040516104599190614386565b60405180910390f35b61047c600480360381019061047791906142e4565b61124a565b6040516104899190614386565b60405180910390f35b6104ac60048036038101906104a7919061422f565b61126f565b6040516104b9919061429d565b60405180910390f35b6104ca61134a565b6040516104d791906141d7565b60405180910390f35b6104fa60048036038101906104f5919061447e565b6113d8565b6040516105079190614386565b60405180910390f35b610518611496565b604051610525919061450a565b60405180910390f35b6105366114bc565b6040516105439190614546565b60405180910390f35b6105666004803603810190610561919061422f565b6114e2565b005b610582600480360381019061057d9190614324565b611638565b005b61059e600480360381019061059991906145c6565b611752565b005b6105a861187b565b6040516105b591906141d7565b60405180910390f35b6105d860048036038101906105d3919061422f565b61190d565b6040516105e59190614386565b60405180910390f35b6106086004803603810190610603919061463f565b611958565b005b610624600480360381019061061f919061467f565b61196e565b6040516106319190614386565b60405180910390f35b610654600480360381019061064f9190614715565b611993565b005b610670600480360381019061066b91906148a5565b611c2d565b005b61068c6004803603810190610687919061422f565b611c68565b60405161069991906141d7565b60405180910390f35b6106bc60048036038101906106b79190614928565b611ddd565b005b6106d860048036038101906106d3919061497b565b611f6b565b005b6106f460048036038101906106ef919061422f565b6120e0565b6040516107019190614386565b60405180910390f35b610724600480360381019061071f91906149e2565b6120f8565b6040516107319190614386565b60405180910390f35b61074261215c565b60405161074f91906141d7565b60405180910390f35b610772600480360381019061076d9190614a22565b6122bb565b60405161077f9190614123565b60405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061085357507fd5358140000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108bb57507f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061092357507fe1600902000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061098b57507f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806109f357507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b606060008054610a0990614a91565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3590614a91565b8015610a825780601f10610a5757610100808354040283529160200191610a82565b820191906000526020600020905b815481529060010190602001808311610a6557829003601f168201915b5050505050905090565b6000610a9782612352565b6004600560008481526020019081526020016000205481548110610abe57610abd614ac3565b5b906000526020600020906006020160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610b028261126f565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6a90614b64565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b9261239d565b73ffffffffffffffffffffffffffffffffffffffff161480610bc15750610bc081610bbb61239d565b6122bb565b5b610c00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf790614bf6565b60405180910390fd5b610c0a83836123a5565b505050565b60606000610c1b612483565b9050600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610cc2576000815111610c925760405180602001604052806000815250610cbd565b80610c9c84612515565b604051602001610cad929190614c9e565b6040516020818303038152906040525b610d73565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636c037f8a846040518263ffffffff1660e01b8152600401610d1d9190614386565b60006040518083038186803b158015610d3557600080fd5b505afa158015610d49573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610d729190614d6e565b5b915050919050565b60006040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610daf90614e03565b60405180910390fd5b6000600480549050905090565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df790614e03565b60405180910390fd5b6000610e0b82612352565b6004600560008481526020019081526020016000205481548110610e3257610e31614ac3565b5b9060005260206000209060060201600101549050919050565b6000610e56836113d8565b8210610e97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8e90614e95565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110610eeb57610eea614ac3565b5b9060005260206000200154905092915050565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3090614e03565b60405180910390fd5b6000600260009054906101000a900460ff16905090565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8290614e03565b60405180910390fd5b6000610f9561239d565b90508073ffffffffffffffffffffffffffffffffffffffff16610fb78361126f565b73ffffffffffffffffffffffffffffffffffffffff161461100d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100490614f01565b60405180910390fd5b600061101883610e00565b90506000600960008381526020019081526020016000205490506000600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000205490508181106110c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c090614f93565b60405180910390fd5b60006110df6110d78761190d565b8584866125ed565b9050818111611123576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111a90614fff565b60405180910390fd5b80600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008681526020019081526020016000208190555083868673ffffffffffffffffffffffffffffffffffffffff167fbe95a8e91a2c36d15916af6b2bb5f8daae1fe63dc66caafe79b50e47f2041dcb85856040516111c292919061501f565b60405180910390a4505050505050565b60006111dc610db8565b821061121d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611214906150ba565b60405180910390fd5b6004828154811061123157611230614ac3565b5b9060005260206000209060060201600001549050919050565b600b602052816000526040600020602052806000526040600020600091509150505481565b600061127a82612352565b60046005600084815260200190815260200160002054815481106112a1576112a0614ac3565b5b906000526020600020906006020160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611345576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133c90615126565b60405180910390fd5b919050565b600c805461135790614a91565b80601f016020809104026020016040519081016040528092919081815260200182805461138390614a91565b80156113d05780601f106113a5576101008083540402835291602001916113d0565b820191906000526020600020905b8154815290600101906020018083116113b357829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611449576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611440906151b8565b60405180910390fd5b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490509050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391d148547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661154961239d565b6040518363ffffffff1660e01b81526004016115669291906151f1565b60206040518083038186803b15801561157e57600080fd5b505afa158015611592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115b6919061522f565b6115f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ec906152a8565b60405180910390fd5b6115fe816126d7565b7f8bf30e7ff26833413be5f69e1d373744864d600b664204b4a2f9844a8eedb9ed8160405161162d9190614386565b60405180910390a150565b60006116438461126f565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab90614b64565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166116d361239d565b73ffffffffffffffffffffffffffffffffffffffff1614806117025750611701816116fc61239d565b6122bb565b5b611741576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173890614bf6565b60405180910390fd5b61174c84848461285d565b50505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391d148547f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086117b961239d565b6040518363ffffffff1660e01b81526004016117d69291906151f1565b60206040518083038186803b1580156117ee57600080fd5b505afa158015611802573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611826919061522f565b611865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185c90615314565b60405180910390fd5b8181600c9190611876929190613f21565b505050565b60606001805461188a90614a91565b80601f01602080910402602001604051908101604052809291908181526020018280546118b690614a91565b80156119035780601f106118d857610100808354040283529160200191611903565b820191906000526020600020905b8154815290600101906020018083116118e657829003601f168201915b5050505050905090565b600061191882612352565b600460056000848152602001908152602001600020548154811061193f5761193e614ac3565b5b9060005260206000209060060201600201549050919050565b61196a61196361239d565b8383612a1e565b5050565b600a602052816000526040600020602052806000526040600020600091509150505481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391d148547f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b086119fa61239d565b6040518363ffffffff1660e01b8152600401611a179291906151f1565b60206040518083038186803b158015611a2f57600080fd5b505afa158015611a43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a67919061522f565b611aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9d90615314565b60405180910390fd5b600060096000858152602001908152602001600020549050600083839050905060008060005b83811015611b9657868682818110611ae757611ae6614ac3565b5b905060200201359150828211611b32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2990615380565b60405180910390fd5b819250868682818110611b4857611b47614ac3565b5b90506020020135600a60008a81526020019081526020016000206000600184611b7191906153cf565b8152602001908152602001600020819055508080611b8e90615425565b915050611acc565b5082600960008981526020019081526020016000208190555083831015611c24578284611bc3919061546e565b905060005b81811015611c2257600a6000898152602001908152602001600020600060018387611bf391906153cf565b611bfd91906153cf565b8152602001908152602001600020600090558080611c1a90615425565b915050611bc8565b505b50505050505050565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5f90614e03565b60405180910390fd5b6060611c7382612352565b6000611c7d612483565b9050600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611d24576000815111611cf45760405180602001604052806000815250611d1f565b80611cfe84612515565b604051602001611d0f9291906154a2565b6040516020818303038152906040525b611dd5565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663894b4c2e846040518263ffffffff1660e01b8152600401611d7f9190614386565b60006040518083038186803b158015611d9757600080fd5b505afa158015611dab573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611dd49190614d6e565b5b915050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391d148547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611e4461239d565b6040518363ffffffff1660e01b8152600401611e619291906151f1565b60206040518083038186803b158015611e7957600080fd5b505afa158015611e8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb1919061522f565b611ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ee7906152a8565b60405180910390fd5b6000611efb8461190d565b90508115611f1257611f0d8484612b8e565b611f1d565b611f1c8484612be1565b5b6000611f288561190d565b9050847ffa335800799d24c33c477e0674969821a6541f8f700b59acfd78aa0e81b056508383604051611f5c92919061501f565b60405180910390a25050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166391d148547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6611fd261239d565b6040518363ffffffff1660e01b8152600401611fef9291906151f1565b60206040518083038186803b15801561200757600080fd5b505afa15801561201b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203f919061522f565b61207e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612075906152a8565b60405180910390fd5b61208a84848484612d1e565b81838573ffffffffffffffffffffffffffffffffffffffff167faa58599838af2e5e0f3251cfbb4eac5d5d447ded49f6b0ac28d6b44098224e63846040516120d29190614386565b60405180910390a450505050565b60096020528060005260406000206000915090505481565b600061210383612352565b6003600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60606000612168612483565b9050600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561220f5760008151116121df576040518060200160405280600081525061220a565b806121e930612e56565b6040516020016121fa929190615512565b6040516020818303038152906040525b6122b5565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663725fa09c6040518163ffffffff1660e01b815260040160006040518083038186803b15801561227757600080fd5b505afa15801561228b573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906122b49190614d6e565b5b91505090565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61235b81612e83565b61239a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239190615126565b60405180910390fd5b50565b600033905090565b8160046005600084815260200190815260200160002054815481106123cd576123cc614ac3565b5b906000526020600020906006020160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661243d8361126f565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6060600c805461249290614a91565b80601f01602080910402602001604051908101604052809291908181526020018280546124be90614a91565b801561250b5780601f106124e05761010080835404028352916020019161250b565b820191906000526020600020905b8154815290600101906020018083116124ee57829003601f168201915b5050505050905090565b60606000600161252484612ed8565b01905060008167ffffffffffffffff8111156125435761254261477a565b5b6040519080825280601f01601f1916602001820160405280156125755781602001600182028036833780820191505090505b509050600082602001820190505b6001156125e2578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816125cc576125cb615541565b5b04945060008514156125dd576125e2565b612583565b819350505050919050565b600080600a60008681526020019081526020016000206000848152602001908152602001600020549050600081871061262a5783925050506126cf565b600085905060008590505b8082116126c7576002818361264a91906153cf565b6126549190615570565b9250600a600089815260200190815260200160002060008481526020019081526020016000205493508389101561269957600183612692919061546e565b90506126c2565b838911156126b5576001836126ae91906153cf565b91506126c1565b829450505050506126cf565b5b612635565b809450505050505b949350505050565b6126e081612352565b6000600460056000848152602001908152602001600020548154811061270957612708614ac3565b5b9060005260206000209060060201905060008160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600082600101549050600083600201549050612764836000876000868661302b565b61276d85613121565b6127778386613224565b612780856133c0565b6000857f0b2aac84f3ec956911fd78eae5311062972ff949f38412e8da39069d9f068cc6836040516127b29190614386565b60405180910390a3600082867fe4f48c240d3b994948aa54f3e2f5fca59263dfe1d52b6e4cf39a5d249b5ccb6560405160405180910390a484600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46128568360008760008686613740565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156128cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128c490615613565b60405180910390fd5b6128d78284613748565b61297557600460056000858152602001908152602001600020548154811061290257612901614ac3565b5b9060005260206000209060060201600501829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b806003600085815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16837f621b050de0ad08b51d19b48b3e6df75348c4de6bdd93e81b252ca62e28265b1b83604051612a119190614386565b60405180910390a3505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a849061567f565b60405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612b819190614123565b60405180910390a3505050565b612b9782612352565b6000612ba28361126f565b90506000612baf84610e00565b9050612bc1600083600087858861302b565b612bcb8484613867565b612bdb6000836000878588613740565b50505050565b612bea82612352565b60006004600560008581526020019081526020016000205481548110612c1357612c12614ac3565b5b9060005260206000209060060201905060008160030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008260010154905060008360020154905084811015612ca1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c9890615711565b60405180910390fd5b612cb1836000886000868a61302b565b84846002016000828254612cc5919061546e565b925050819055506000867f0b2aac84f3ec956911fd78eae5311062972ff949f38412e8da39069d9f068cc687604051612cfe9190614386565b60405180910390a3612d16836000886000868a613740565b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612d8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d85906157a3565b60405180910390fd5b6000831415612dd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612dc990615835565b60405180910390fd5b612ddb83612e83565b15612e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e12906158a1565b60405180910390fd5b612e2b600085600086868661302b565b612e368484846138f4565b612e408382613867565b612e506000856000868686613740565b50505050565b6060612e7c8273ffffffffffffffffffffffffffffffffffffffff16601460ff16613a41565b9050919050565b60008060048054905014158015612ed15750816004600560008581526020019081526020016000205481548110612ebd57612ebc614ac3565b5b906000526020600020906006020160000154145b9050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612f36577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381612f2c57612f2b615541565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612f73576d04ee2d6d415b85acef81000000008381612f6957612f68615541565b5b0492506020810190505b662386f26fc100008310612fa257662386f26fc100008381612f9857612f97615541565b5b0492506010810190505b6305f5e1008310612fcb576305f5e1008381612fc157612fc0615541565b5b0492506008810190505b6127108310612ff0576127108381612fe657612fe5615541565b5b0492506004810190505b60648310613013576064838161300957613008615541565b5b0492506002810190505b600a8310613022576001810190505b80915050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561309357600080fd5b505afa1580156130a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130cb919061522f565b1561310b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131029061590d565b60405180910390fd5b613119868686868686613c7d565b505050505050565b6000600460056000848152602001908152602001600020548154811061314a57613149614ac3565b5b9060005260206000209060060201905060008160050180549050905060005b8181101561321e57600083600501828154811061318957613188614ac3565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506003600086815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000905550808061321690615425565b915050613169565b50505050565b6000600460056000848152602001908152602001600020548154811061324d5761324c614ac3565b5b906000526020600020906006020160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600182600001805490506132f5919061546e565b9050600082600001828154811061330f5761330e614ac3565b5b9060005260206000200154905060008360010160008681526020019081526020016000205490508184600001828154811061334d5761334c614ac3565b5b9060005260206000200181905550808460010160008481526020019081526020016000208190555083600101600086815260200190815260200160002060009055836000018054806133a2576133a161592d565b5b60019003818190600052602060002001600090559055505050505050565b600060016004805490506133d4919061546e565b905060006005600084815260200190815260200160002054905060006004838154811061340457613403614ac3565b5b90600052602060002090600602016040518060c00160405290816000820154815260200160018201548152602001600282015481526020016003820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016005820180548060200260200160405190810160405280929190818152602001828054801561356c57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311613522575b5050505050815250509050806004838154811061358c5761358b614ac3565b5b906000526020600020906006020160008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a0820151816005019080519060200190613662929190613fa7565b5090505081600560008360000151815260200190815260200160002081905550600560008581526020019081526020016000206000905560048054806136ab576136aa61592d565b5b6001900381819060005260206000209060060201600080820160009055600182016000905560028201600090556003820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556004820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556005820160006137369190614031565b5050905550505050565b505050505050565b600080600460056000858152602001908152602001600020548154811061377257613771614ac3565b5b906000526020600020906006020160050180549050905060005b8181101561385a578473ffffffffffffffffffffffffffffffffffffffff1660046005600087815260200190815260200160002054815481106137d2576137d1614ac3565b5b906000526020600020906006020160050182815481106137f5576137f4614ac3565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561384757600192505050613861565b808061385290615425565b91505061378c565b5060009150505b92915050565b80600460056000858152602001908152602001600020548154811061388f5761388e614ac3565b5b906000526020600020906006020160020160008282546138af91906153cf565b925050819055508160007f0b2aac84f3ec956911fd78eae5311062972ff949f38412e8da39069d9f068cc6836040516138e89190614386565b60405180910390a35050565b60006040518060c00160405280848152602001838152602001600081526020018573ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff8111156139685761396761477a565b5b6040519080825280602002602001820160405280156139965781602001602082028036833780820191505090505b5081525090506139a581613c85565b6139af8484613da0565b828473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4816000847fe4f48c240d3b994948aa54f3e2f5fca59263dfe1d52b6e4cf39a5d249b5ccb6560405160405180910390a450505050565b606060006002836002613a54919061595c565b613a5e91906153cf565b67ffffffffffffffff811115613a7757613a7661477a565b5b6040519080825280601f01601f191660200182016040528015613aa95781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613ae157613ae0614ac3565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613b4557613b44614ac3565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002613b85919061595c565b613b8f91906153cf565b90505b6001811115613c2f577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110613bd157613bd0614ac3565b5b1a60f81b828281518110613be857613be7614ac3565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080613c28906159b6565b9050613b92565b5060008414613c73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613c6a90615a2c565b60405180910390fd5b8091505092915050565b505050505050565b600480549050600560008360000151815260200190815260200160002081905550600481908060018154018082558091505060019003906000526020600020906006020160009091909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a0820151816005019080519060200190613d9a929190613fa7565b50505050565b816004600560008481526020019081526020016000205481548110613dc857613dc7614ac3565b5b906000526020600020906006020160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002081905550600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190806001815401808255809150506001900390600052602060002001600090919091909150555050565b828054613f2d90614a91565b90600052602060002090601f016020900481019282613f4f5760008555613f96565b82601f10613f6857803560ff1916838001178555613f96565b82800160010185558215613f96579182015b82811115613f95578235825591602001919060010190613f7a565b5b509050613fa39190614052565b5090565b828054828255906000526020600020908101928215614020579160200282015b8281111561401f5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190613fc7565b5b50905061402d9190614052565b5090565b508054600082559060005260206000209081019061404f9190614052565b50565b5b8082111561406b576000816000905550600101614053565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6140b881614083565b81146140c357600080fd5b50565b6000813590506140d5816140af565b92915050565b6000602082840312156140f1576140f0614079565b5b60006140ff848285016140c6565b91505092915050565b60008115159050919050565b61411d81614108565b82525050565b60006020820190506141386000830184614114565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561417857808201518184015260208101905061415d565b83811115614187576000848401525b50505050565b6000601f19601f8301169050919050565b60006141a98261413e565b6141b38185614149565b93506141c381856020860161415a565b6141cc8161418d565b840191505092915050565b600060208201905081810360008301526141f1818461419e565b905092915050565b6000819050919050565b61420c816141f9565b811461421757600080fd5b50565b60008135905061422981614203565b92915050565b60006020828403121561424557614244614079565b5b60006142538482850161421a565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006142878261425c565b9050919050565b6142978161427c565b82525050565b60006020820190506142b2600083018461428e565b92915050565b6142c18161427c565b81146142cc57600080fd5b50565b6000813590506142de816142b8565b92915050565b600080604083850312156142fb576142fa614079565b5b6000614309858286016142cf565b925050602061431a8582860161421a565b9150509250929050565b60008060006060848603121561433d5761433c614079565b5b600061434b8682870161421a565b935050602061435c868287016142cf565b925050604061436d8682870161421a565b9150509250925092565b614380816141f9565b82525050565b600060208201905061439b6000830184614377565b92915050565b6000806000606084860312156143ba576143b9614079565b5b60006143c8868287016142cf565b93505060206143d9868287016142cf565b92505060406143ea8682870161421a565b9150509250925092565b60008060006060848603121561440d5761440c614079565b5b600061441b8682870161421a565b935050602061442c8682870161421a565b925050604061443d8682870161421a565b9150509250925092565b600060ff82169050919050565b61445d81614447565b82525050565b60006020820190506144786000830184614454565b92915050565b60006020828403121561449457614493614079565b5b60006144a2848285016142cf565b91505092915050565b6000819050919050565b60006144d06144cb6144c68461425c565b6144ab565b61425c565b9050919050565b60006144e2826144b5565b9050919050565b60006144f4826144d7565b9050919050565b614504816144e9565b82525050565b600060208201905061451f60008301846144fb565b92915050565b6000614530826144d7565b9050919050565b61454081614525565b82525050565b600060208201905061455b6000830184614537565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261458657614585614561565b5b8235905067ffffffffffffffff8111156145a3576145a2614566565b5b6020830191508360018202830111156145bf576145be61456b565b5b9250929050565b600080602083850312156145dd576145dc614079565b5b600083013567ffffffffffffffff8111156145fb576145fa61407e565b5b61460785828601614570565b92509250509250929050565b61461c81614108565b811461462757600080fd5b50565b60008135905061463981614613565b92915050565b6000806040838503121561465657614655614079565b5b6000614664858286016142cf565b92505060206146758582860161462a565b9150509250929050565b6000806040838503121561469657614695614079565b5b60006146a48582860161421a565b92505060206146b58582860161421a565b9150509250929050565b60008083601f8401126146d5576146d4614561565b5b8235905067ffffffffffffffff8111156146f2576146f1614566565b5b60208301915083602082028301111561470e5761470d61456b565b5b9250929050565b60008060006040848603121561472e5761472d614079565b5b600061473c8682870161421a565b935050602084013567ffffffffffffffff81111561475d5761475c61407e565b5b614769868287016146bf565b92509250509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6147b28261418d565b810181811067ffffffffffffffff821117156147d1576147d061477a565b5b80604052505050565b60006147e461406f565b90506147f082826147a9565b919050565b600067ffffffffffffffff8211156148105761480f61477a565b5b6148198261418d565b9050602081019050919050565b82818337600083830152505050565b6000614848614843846147f5565b6147da565b90508281526020810184848401111561486457614863614775565b5b61486f848285614826565b509392505050565b600082601f83011261488c5761488b614561565b5b813561489c848260208601614835565b91505092915050565b600080600080608085870312156148bf576148be614079565b5b60006148cd878288016142cf565b94505060206148de878288016142cf565b93505060406148ef8782880161421a565b925050606085013567ffffffffffffffff8111156149105761490f61407e565b5b61491c87828801614877565b91505092959194509250565b60008060006060848603121561494157614940614079565b5b600061494f8682870161421a565b93505060206149608682870161421a565b92505060406149718682870161462a565b9150509250925092565b6000806000806080858703121561499557614994614079565b5b60006149a3878288016142cf565b94505060206149b48782880161421a565b93505060406149c58782880161421a565b92505060606149d68782880161421a565b91505092959194509250565b600080604083850312156149f9576149f8614079565b5b6000614a078582860161421a565b9250506020614a18858286016142cf565b9150509250929050565b60008060408385031215614a3957614a38614079565b5b6000614a47858286016142cf565b9250506020614a58858286016142cf565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614aa957607f821691505b60208210811415614abd57614abc614a62565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f455243333532353a20617070726f76616c20746f2063757272656e74206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6000614b4e602283614149565b9150614b5982614af2565b604082019050919050565b60006020820190508181036000830152614b7d81614b41565b9050919050565b7f455243333532353a20617070726f76652063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f76656420666f7220616c6c00000000000000602082015250565b6000614be0603983614149565b9150614beb82614b84565b604082019050919050565b60006020820190508181036000830152614c0f81614bd3565b9050919050565b600081905092915050565b6000614c2c8261413e565b614c368185614c16565b9350614c4681856020860161415a565b80840191505092915050565b7f736c6f742f000000000000000000000000000000000000000000000000000000600082015250565b6000614c88600583614c16565b9150614c9382614c52565b600582019050919050565b6000614caa8285614c21565b9150614cb582614c7b565b9150614cc18284614c21565b91508190509392505050565b600067ffffffffffffffff821115614ce857614ce761477a565b5b614cf18261418d565b9050602081019050919050565b6000614d11614d0c84614ccd565b6147da565b905082815260208101848484011115614d2d57614d2c614775565b5b614d3884828561415a565b509392505050565b600082601f830112614d5557614d54614561565b5b8151614d65848260208601614cfe565b91505092915050565b600060208284031215614d8457614d83614079565b5b600082015167ffffffffffffffff811115614da257614da161407e565b5b614dae84828501614d40565b91505092915050565b7f4d656d626572736869703a207472616e736665722069732064697361626c6564600082015250565b6000614ded602083614149565b9150614df882614db7565b602082019050919050565b60006020820190508181036000830152614e1c81614de0565b9050919050565b7f455243333532353a206f776e657220696e646578206f7574206f6620626f756e60008201527f6473000000000000000000000000000000000000000000000000000000000000602082015250565b6000614e7f602283614149565b9150614e8a82614e23565b604082019050919050565b60006020820190508181036000830152614eae81614e72565b9050919050565b7f4d656d626572204964206e6f74206f776e65642062792063616c6c6572000000600082015250565b6000614eeb601d83614149565b9150614ef682614eb5565b602082019050919050565b60006020820190508181036000830152614f1a81614ede565b9050919050565b7f43616e6e6f74207570677261646520746f20746865206e65787420746965722e60008201527f20596f75206861766520726561636865642061206d6178207469657200000000602082015250565b6000614f7d603c83614149565b9150614f8882614f21565b604082019050919050565b60006020820190508181036000830152614fac81614f70565b9050919050565b7f4e6f7420656e6f75676820706f696e747320746f207570677261646500000000600082015250565b6000614fe9601c83614149565b9150614ff482614fb3565b602082019050919050565b6000602082019050818103600083015261501881614fdc565b9050919050565b60006040820190506150346000830185614377565b6150416020830184614377565b9392505050565b7f455243333532353a20676c6f62616c20696e646578206f7574206f6620626f7560008201527f6e64730000000000000000000000000000000000000000000000000000000000602082015250565b60006150a4602383614149565b91506150af82615048565b604082019050919050565b600060208201905081810360008301526150d381615097565b9050919050565b7f455243333532353a20696e76616c696420746f6b656e20494400000000000000600082015250565b6000615110601983614149565b915061511b826150da565b602082019050919050565b6000602082019050818103600083015261513f81615103565b9050919050565b7f455243333532353a2062616c616e636520717565727920666f7220746865207a60008201527f65726f2061646472657373000000000000000000000000000000000000000000602082015250565b60006151a2602b83614149565b91506151ad82615146565b604082019050919050565b600060208201905081810360008301526151d181615195565b9050919050565b6000819050919050565b6151eb816151d8565b82525050565b600060408201905061520660008301856151e2565b615213602083018461428e565b9392505050565b60008151905061522981614613565b92915050565b60006020828403121561524557615244614079565b5b60006152538482850161521a565b91505092915050565b7f4f6e6c79204d696e746572000000000000000000000000000000000000000000600082015250565b6000615292600b83614149565b915061529d8261525c565b602082019050919050565b600060208201905081810360008301526152c181615285565b9050919050565b7f4f6e6c79204d616e616765720000000000000000000000000000000000000000600082015250565b60006152fe600c83614149565b9150615309826152c8565b602082019050919050565b6000602082019050818103600083015261532d816152f1565b9050919050565b7f4e6f7420617363656e64696e67206f7264657200000000000000000000000000600082015250565b600061536a601383614149565b915061537582615334565b602082019050919050565b600060208201905081810360008301526153998161535d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006153da826141f9565b91506153e5836141f9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561541a576154196153a0565b5b828201905092915050565b6000615430826141f9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615463576154626153a0565b5b600182019050919050565b6000615479826141f9565b9150615484836141f9565b925082821015615497576154966153a0565b5b828203905092915050565b60006154ae8285614c21565b91506154ba8284614c21565b91508190509392505050565b7f636f6e74726163742f0000000000000000000000000000000000000000000000600082015250565b60006154fc600983614c16565b9150615507826154c6565b600982019050919050565b600061551e8285614c21565b9150615529826154ef565b91506155358284614c21565b91508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061557b826141f9565b9150615586836141f9565b92508261559657615595615541565b5b828204905092915050565b7f455243333532353a20617070726f76652076616c756520746f20746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b60006155fd602a83614149565b9150615608826155a1565b604082019050919050565b6000602082019050818103600083015261562c816155f0565b9050919050565b7f455243333532353a20617070726f766520746f2063616c6c6572000000000000600082015250565b6000615669601a83614149565b915061567482615633565b602082019050919050565b600060208201905081810360008301526156988161565c565b9050919050565b7f455243333532353a206275726e2076616c756520657863656564732062616c6160008201527f6e63650000000000000000000000000000000000000000000000000000000000602082015250565b60006156fb602383614149565b91506157068261569f565b604082019050919050565b6000602082019050818103600083015261572a816156ee565b9050919050565b7f455243333532353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061578d602183614149565b915061579882615731565b604082019050919050565b600060208201905081810360008301526157bc81615780565b9050919050565b7f455243333532353a2063616e6e6f74206d696e74207a65726f20746f6b656e4960008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b600061581f602183614149565b915061582a826157c3565b604082019050919050565b6000602082019050818103600083015261584e81615812565b9050919050565b7f455243333532353a20746f6b656e20616c7265616479206d696e746564000000600082015250565b600061588b601d83614149565b915061589682615855565b602082019050919050565b600060208201905081810360008301526158ba8161587e565b9050919050565b7f4f6e205061757365640000000000000000000000000000000000000000000000600082015250565b60006158f7600983614149565b9150615902826158c1565b602082019050919050565b60006020820190508181036000830152615926816158ea565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000615967826141f9565b9150615972836141f9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156159ab576159aa6153a0565b5b828202905092915050565b60006159c1826141f9565b915060008214156159d5576159d46153a0565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000615a16602083614149565b9150615a21826159e0565b602082019050919050565b60006020820190508181036000830152615a4581615a09565b905091905056fea2646970667358221220f574d9fe76d4d66853e33f5ff399224fd7c8e65db3de3c31b78d6a9982f107c264736f6c634300080900330000000000000000000000002f295e191147d406bc7c1b732243ff5d437ce71600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000f4d656d626572736869702054657374000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044142434400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001368747470733a2f2f6578616d706c652e636f6d00000000000000000000000000
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002f295e191147d406bc7c1b732243ff5d437ce71600000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000f4d656d626572736869702054657374000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044142434400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001368747470733a2f2f6578616d706c652e636f6d00000000000000000000000000
-----Decoded View---------------
Arg [0] : _management (address): 0x2f295e191147d406bc7c1b732243ff5d437ce716
Arg [1] : name (string): Membership Test
Arg [2] : symbol (string): ABCD
Arg [3] : baseURI_ (string): https://example.com
Arg [4] : decimals_ (uint8): 18
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 0000000000000000000000002f295e191147d406bc7c1b732243ff5d437ce716
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [6] : 4d656d6265727368697020546573740000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [8] : 4142434400000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [10] : 68747470733a2f2f6578616d706c652e636f6d00000000000000000000000000
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|