Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 14504154 | 996 days ago | IN | 0 ETH | 0.01706467 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TokenCollection
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 99999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol"; import "./BaseCollection.sol"; contract TokenCollection is BaseCollection, ERC721URIStorageUpgradeable, ERC721BurnableUpgradeable { event RedeemableCreated(uint256 indexed redeemableId); event TokenRedeemed( address indexed collector, uint256 indexed redeemableId, uint256 quantity ); struct Redeemable { string tokenURI; uint256 price; uint256 maxAmount; uint256 maxPerWallet; uint256 maxPerMint; uint256 redeemedCount; bytes32 merkleRoot; bool active; uint256 nonce; } using CountersUpgradeable for CountersUpgradeable.Counter; using SafeMathUpgradeable for uint256; using MerkleProofUpgradeable for bytes32[]; using ECDSAUpgradeable for bytes32; CountersUpgradeable.Counter private _tokenIdCounter; CountersUpgradeable.Counter private _redeemablesCounter; mapping(uint256 => Redeemable) private _redeemables; mapping(uint256 => mapping(address => uint256)) private _redeemedByWallet; modifier onlyRedeemable( uint256 redeemableId, uint256 numberOfTokens, bytes calldata signature ) { Redeemable memory redeemable = _redeemables[redeemableId]; require(redeemable.active, "Not valid: 1"); require( redeemable.price.mul(numberOfTokens) <= msg.value, "Value incorrect" ); require( _redeemedByWallet[redeemableId][_msgSender()].add(numberOfTokens) <= redeemable.maxPerWallet, "Exceeded max: 1" ); require( redeemable.redeemedCount.add(numberOfTokens) <= redeemable.maxAmount, "Exceeded max: 2" ); require( keccak256(abi.encodePacked(redeemableId.add(redeemable.nonce))) .toEthSignedMessageHash() .recover(signature) == owner(), "Not valid: 2" ); _; } function initialize( string memory name_, string memory symbol_, address treasury_, address royalty_, uint96 royaltyFee_ ) public override initializer { __BaseCollection_init(name_, symbol_, treasury_, royalty_, royaltyFee_); __ERC721URIStorage_init(); __ERC721Burnable_init(); } function mint(address to, string memory uri) public onlyOwner { _mint(to, uri); } function createRedeemable( string memory uri, uint256 price, uint256 maxAmount, uint256 maxPerWallet, uint256 maxPerMint ) public onlyOwner { uint256 redeemableId = _redeemablesCounter.current(); _redeemablesCounter.increment(); _redeemables[redeemableId] = Redeemable({ tokenURI: uri, price: price, maxAmount: maxAmount, maxPerWallet: maxPerWallet, maxPerMint: maxPerMint, redeemedCount: 0, merkleRoot: "", active: true, nonce: 0 }); emit RedeemableCreated(redeemableId); } function setMerkleRoot(uint256 redeemableId, bytes32 newRoot) public onlyOwner { require(_redeemables[redeemableId].active, "Invalid Redeemable"); _redeemables[redeemableId].merkleRoot = newRoot; } function invalidate(uint256 redeemableId) public onlyOwner { require(_redeemables[redeemableId].active, "Invalid Redeemable"); _redeemables[redeemableId].nonce = _redeemables[redeemableId].nonce.add( 1 ); } function revoke(uint256 redeemableId) public onlyOwner { require(_redeemables[redeemableId].active, "Invalid Redeemable"); _redeemables[redeemableId].active = false; } function redeem( uint256 redeemableId, uint256 numberOfTokens, bytes calldata signature ) public payable onlyRedeemable(redeemableId, numberOfTokens, signature) { Redeemable memory redeemable = _redeemables[redeemableId]; require(redeemable.merkleRoot == "", "Not valid: 3"); _redeem(redeemableId, numberOfTokens); } function redeem( uint256 redeemableId, uint256 numberOfTokens, bytes calldata signature, bytes32[] calldata proof ) public payable onlyRedeemable(redeemableId, numberOfTokens, signature) { Redeemable memory redeemable = _redeemables[redeemableId]; require(redeemable.merkleRoot != "", "Not valid: 3"); require( MerkleProofUpgradeable.verify( proof, redeemable.merkleRoot, keccak256(abi.encodePacked(_msgSender())) ), "Not valid: 4" ); _redeem(redeemableId, numberOfTokens); } function totalRedeemables() external view returns (uint256) { return _redeemablesCounter.current(); } function redeemableByIndex(uint256 index) external view returns ( string memory uri, uint256 price, uint256 maxAmount, uint256 maxPerWallet, uint256 maxPerMint, uint256 redeemedCount, bytes32 merkleRoot, bool active, uint256 nonce ) { Redeemable memory redeemable = _redeemables[index]; return ( redeemable.tokenURI, redeemable.price, redeemable.maxAmount, redeemable.maxPerWallet, redeemable.maxPerMint, redeemable.redeemedCount, redeemable.merkleRoot, redeemable.active, redeemable.nonce ); } function _redeem(uint256 redeemableId, uint256 numberOfTokens) internal { Redeemable memory redeemable = _redeemables[redeemableId]; unchecked { _totalRevenue = _totalRevenue.add(msg.value); _redeemables[redeemableId].redeemedCount = redeemable .redeemedCount .add(numberOfTokens); _redeemedByWallet[redeemableId][_msgSender()] = _redeemedByWallet[ redeemableId ][_msgSender()].add(numberOfTokens); } for (uint256 i = 0; i < numberOfTokens; i++) { _mint(_msgSender(), redeemable.tokenURI); } _niftyKit.addFees(msg.value); emit TokenRedeemed(_msgSender(), redeemableId, numberOfTokens); } function _mint(address to, string memory uri) internal { uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(to, tokenId); _setTokenURI(tokenId, uri); } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721Upgradeable, ERC721URIStorageUpgradeable) { ERC721URIStorageUpgradeable._burn(tokenId); } function tokenURI(uint256 tokenId) public view override(ERC721Upgradeable, ERC721URIStorageUpgradeable) returns (string memory) { return ERC721URIStorageUpgradeable.tokenURI(tokenId); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(BaseCollection, ERC721Upgradeable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(BaseCollection, ERC721Upgradeable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProofUpgradeable { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable { function __ERC721URIStorage_init() internal onlyInitializing { } function __ERC721URIStorage_init_unchained() internal onlyInitializing { } using StringsUpgradeable for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../utils/ContextUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { function __ERC721Burnable_init() internal onlyInitializing { } function __ERC721Burnable_init_unchained() internal onlyInitializing { } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol"; import "./interfaces/IBaseCollection.sol"; import "./interfaces/INiftyKit.sol"; abstract contract BaseCollection is ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC2981Upgradeable, OwnableUpgradeable, IBaseCollection { using AddressUpgradeable for address; using SafeMathUpgradeable for uint256; INiftyKit internal _niftyKit; address internal _treasury; uint256 internal _totalRevenue; function __BaseCollection_init( string memory name_, string memory symbol_, address treasury_, address royalty_, uint96 royaltyFee_ ) internal onlyInitializing { __ERC721_init(name_, symbol_); __ERC721Enumerable_init(); __ERC2981_init(); __Ownable_init_unchained(); _niftyKit = INiftyKit(_msgSender()); _treasury = treasury_; _setDefaultRoyalty(royalty_, royaltyFee_); } function withdraw() external { require(address(this).balance > 0, "0 balance"); uint256 balance = address(this).balance; uint256 fees = _niftyKit.getFees(address(this)); _niftyKit.addFeesClaimed(fees); AddressUpgradeable.sendValue(payable(address(_niftyKit)), fees); AddressUpgradeable.sendValue(payable(_treasury), balance.sub(fees)); } function setTreasury(address newTreasury) external onlyOwner { _treasury = newTreasury; } function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { _setTokenRoyalty(tokenId, receiver, feeNumerator); } function treasury() external view returns (address) { return _treasury; } function totalRevenue() external view returns (uint256) { return _totalRevenue; } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override( ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC2981Upgradeable ) returns (bool) { return super.supportsInterface(interfaceId); } function transferOwnership(address newOwner) public override(IBaseCollection, OwnableUpgradeable) { return OwnableUpgradeable.transferOwnership(newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 IERC721ReceiverUpgradeable { /** * @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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 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; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[46] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981Upgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { function __ERC2981_init() internal onlyInitializing { } function __ERC2981_init_unchained() internal onlyInitializing { } struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981Upgradeable */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[48] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; interface IBaseCollection { /** * @dev Contract upgradeable initializer */ function initialize( string memory, string memory, address, address, uint96 ) external; /** * @dev part of Ownable */ function transferOwnership(address) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; interface INiftyKit { /** * @dev Emitted when collection is created */ event CollectionCreated(address indexed collectionAddress); /** * @dev Returns the commission amount. */ function commission(uint256 amount) external view returns (uint256); /** * @dev Add fees from Collection */ function addFees(uint256 amount) external; /** * @dev Add fees claimed by the Collection */ function addFeesClaimed(uint256 amount) external; /** * @dev Get fees accrued by the account */ function getFees(address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @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 (last updated v4.5.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
{ "optimizer": { "enabled": true, "runs": 99999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"redeemableId","type":"uint256"}],"name":"RedeemableCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collector","type":"address"},{"indexed":true,"internalType":"uint256","name":"redeemableId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"TokenRedeemed","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"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"uint256","name":"maxPerMint","type":"uint256"}],"name":"createRedeemable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"treasury_","type":"address"},{"internalType":"address","name":"royalty_","type":"address"},{"internalType":"uint96","name":"royaltyFee_","type":"uint96"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemableId","type":"uint256"}],"name":"invalidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemableId","type":"uint256"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemableId","type":"uint256"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"redeem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"redeemableByIndex","outputs":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"maxPerWallet","type":"uint256"},{"internalType":"uint256","name":"maxPerMint","type":"uint256"},{"internalType":"uint256","name":"redeemedCount","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemableId","type":"uint256"}],"name":"revoke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemableId","type":"uint256"},{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":"totalRedeemables","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRevenue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615b9680620000216000396000f3fe60806040526004361061026a5760003560e01c80635944c75311610153578063b88d4fde116100cb578063d0def5211161007f578063ea4caca511610064578063ea4caca514610715578063f0f442601461074a578063f2fde38b1461076a57600080fd5b8063d0def5211461069f578063e985e9c5146106bf57600080fd5b8063bf2d9e0b116100b0578063bf2d9e0b14610654578063c13e33f31461066a578063c87b56dd1461067f57600080fd5b8063b88d4fde14610621578063b9b607471461064157600080fd5b8063715018a61161012257806395d89b411161010757806395d89b41146105cc578063a22cb465146105e1578063afef7c041461060157600080fd5b8063715018a61461058c5780638da5cb5b146105a157600080fd5b80635944c7531461050057806361d027b3146105205780636352211e1461054c57806370a082311461056c57600080fd5b80631ea1afdb116101e65780632f745c59116101b557806342842e0e1161019a57806342842e0e146104a057806342966c68146104c05780634f6ccce7146104e057600080fd5b80632f745c591461046b5780633ccfd60b1461048b57600080fd5b80631ea1afdb146103bf57806320c5429b146103df57806323b872dd146103ff5780632a55205a1461041f57600080fd5b8063081812fc1161023d5780630daf00bc116102225780630daf00bc1461036057806318160ddd1461038057806318712c211461039f57600080fd5b8063081812fc146102fb578063095ea7b31461034057600080fd5b806301ffc9a71461026f5780630449015a146102a457806304634d8d146102b957806306fdde03146102d9575b600080fd5b34801561027b57600080fd5b5061028f61028a3660046151ed565b61078a565b60405190151581526020015b60405180910390f35b6102b76102b236600461524c565b61079b565b005b3480156102c557600080fd5b506102b76102d43660046152e4565b610ddf565b3480156102e557600080fd5b506102ee610e6e565b60405161029b919061538d565b34801561030757600080fd5b5061031b6103163660046153a0565b610f00565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161029b565b34801561034c57600080fd5b506102b761035b3660046153b9565b610fda565b34801561036c57600080fd5b506102b761037b3660046154c6565b611167565b34801561038c57600080fd5b506099545b60405190815260200161029b565b3480156103ab57600080fd5b506102b76103ba366004615523565b611321565b3480156103cb57600080fd5b506102b76103da3660046153a0565b611434565b3480156103eb57600080fd5b506102b76103fa3660046153a0565b611565565b34801561040b57600080fd5b506102b761041a366004615545565b61169c565b34801561042b57600080fd5b5061043f61043a366004615523565b61173e565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520161029b565b34801561047757600080fd5b506103916104863660046153b9565b611837565b34801561049757600080fd5b506102b7611906565b3480156104ac57600080fd5b506102b76104bb366004615545565b611aef565b3480156104cc57600080fd5b506102b76104db3660046153a0565b611b0a565b3480156104ec57600080fd5b506103916104fb3660046153a0565b611bab565b34801561050c57600080fd5b506102b761051b366004615581565b611c69565b34801561052c57600080fd5b5061012e5473ffffffffffffffffffffffffffffffffffffffff1661031b565b34801561055857600080fd5b5061031b6105673660046153a0565b611cf5565b34801561057857600080fd5b506103916105873660046155bd565b611da7565b34801561059857600080fd5b506102b7611e75565b3480156105ad57600080fd5b5060fb5473ffffffffffffffffffffffffffffffffffffffff1661031b565b3480156105d857600080fd5b506102ee611f02565b3480156105ed57600080fd5b506102b76105fc3660046155d8565b611f11565b34801561060d57600080fd5b506102b761061c366004615614565b611f1c565b34801561062d57600080fd5b506102b761063c3660046156aa565b61205a565b6102b761064f366004615726565b612102565b34801561066057600080fd5b5061012f54610391565b34801561067657600080fd5b50610391612770565b34801561068b57600080fd5b506102ee61069a3660046153a0565b612781565b3480156106ab57600080fd5b506102b76106ba3660046157d8565b61278c565b3480156106cb57600080fd5b5061028f6106da366004615826565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561072157600080fd5b506107356107303660046153a0565b612817565b60405161029b99989796959493929190615850565b34801561075657600080fd5b506102b76107653660046155bd565b61298a565b34801561077657600080fd5b506102b76107853660046155bd565b612a53565b600061079582612a5c565b92915050565b8383838360006101966000868152602001908152602001600020604051806101200160405290816000820180546107d1906158a6565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906158a6565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e0808301919091526008909201546101009091015281015190915061091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a2031000000000000000000000000000000000000000060448201526064015b60405180910390fd5b602081015134906109309086612a67565b1115610998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b60608101516000868152610197602052604081206109e291879190335b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205490612a7a565b1115610a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a0820151610a5e9086612a7a565b1115610ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd984848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a7a565b604051602001610b5591815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b90612a86565b73ffffffffffffffffffffffffffffffffffffffff1614610c56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b6000898152610196602052604080822081516101208101909252805482908290610c7f906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cab906158a6565b8015610cf85780601f10610ccd57610100808354040283529160200191610cf8565b820191906000526020600020905b815481529060010190602001808311610cdb57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e08301526008909201546101009091015281015190915015610dc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b610dd38a8a612aaa565b50505050505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282612d23565b5050565b606060658054610e7d906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610ea9906158a6565b8015610ef65780601f10610ecb57610100808354040283529160200191610ef6565b820191906000526020600020905b815481529060010190602001808311610ed957829003601f168201915b5050505050905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16610fb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610fe582611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610916565b3373ffffffffffffffffffffffffffffffffffffffff821614806110cc57506110cc81336106da565b611158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610916565b6111628383612e9c565b505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146111e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b60006111f46101955490565b905061120561019580546001019055565b604080516101208101825287815260208082018890528183018790526060820186905260808201859052600060a0830181905260c08301819052600160e08401526101008301819052848152610196825292909220815180519293919261126f92849201906150f0565b50602082015160018201556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e08301516007830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055610100909201516008909101555181907f722868ecddb510067469fb495ac2904c250692c67941ad0bd36e01c2059fc77890600090a2505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000828152610196602052604090206007015460ff1661141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000918252610196602052604090912060060155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146114b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000818152610196602052604090206008015461154f906001612a7a565b6000918252610196602052604090912060080155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146115e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611662576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b60009081526101966020526040902060070180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6116a7335b82612f3c565b611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b6111628383836130ac565b600082815260ca6020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169282019290925282916117f957506040805180820190915260c95473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b60208101516000906127109061181d906bffffffffffffffffffffffff1687615929565b6118279190615995565b91519350909150505b9250929050565b600061184283611da7565b82106118d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152609760209081526040808320938352929052205490565b60004711611970576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f302062616c616e636500000000000000000000000000000000000000000000006044820152606401610916565b61012d546040517f9af608c9000000000000000000000000000000000000000000000000000000008152306004820152479160009173ffffffffffffffffffffffffffffffffffffffff90911690639af608c99060240160206040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1791906159a9565b61012d546040517fb9bff4bb0000000000000000000000000000000000000000000000000000000081526004810183905291925073ffffffffffffffffffffffffffffffffffffffff169063b9bff4bb90602401600060405180830381600087803b158015611a8557600080fd5b505af1158015611a99573d6000803e3d6000fd5b505061012d54611ac2925073ffffffffffffffffffffffffffffffffffffffff1690508261331e565b61012e54610e6a9073ffffffffffffffffffffffffffffffffffffffff16611aea8484613478565b61331e565b6111628383836040518060200160405280600081525061205a565b611b13336116a1565b611b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610916565b611ba881613484565b50565b6000611bb660995490565b8210611c44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610916565b60998281548110611c5757611c576159c2565b90600052602060002001549050919050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b61116283838361348d565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610916565b600073ffffffffffffffffffffffffffffffffffffffff8216611e4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611ef6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b611f006000613617565b565b606060668054610e7d906158a6565b610e6a33838361368e565b600054610100900460ff16611f375760005460ff1615611f3b565b303b155b611fc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610916565b600054610100900460ff1615801561200657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b61201386868686866137b4565b61201b6138ce565b6120236138ce565b801561205257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b505050505050565b6120643383612f3c565b6120f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b6120fc84848484613965565b50505050565b858585856000610196600086815260200190815260200160002060405180610120016040529081600082018054612138906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054612164906158a6565b80156121b15780601f10612186576101008083540402835291602001916121b1565b820191906000526020600020905b81548152906001019060200180831161219457829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08083019190915260089092015461010090910152810151909150612281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203100000000000000000000000000000000000000006044820152606401610916565b602081015134906122929086612a67565b11156122fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b606081015160008681526101976020526040812061231b91879190336109b5565b1115612383576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a08201516123979086612a7a565b11156123ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a7a565b73ffffffffffffffffffffffffffffffffffffffff16146124f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b60008b8152610196602052604080822081516101208101909252805482908290612522906158a6565b80601f016020809104026020016040519081016040528092919081815260200182805461254e906158a6565b801561259b5780601f106125705761010080835404028352916020019161259b565b820191906000526020600020905b81548152906001019060200180831161257e57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e08301526008909201546101009091015281015190915061266b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b6126f288888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060c08301516040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260340160405160208183030381529060405280519060200120613a08565b612758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203400000000000000000000000000000000000000006044820152606401610916565b6127628c8c612aaa565b505050505050505050505050565b600061277c6101955490565b905090565b606061079582613a1e565b60fb5473ffffffffffffffffffffffffffffffffffffffff16331461280d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282613bd1565b6060600080600080600080600080600061019660008c815260200190815260200160002060405180610120016040529081600082018054612857906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054612883906158a6565b80156128d05780601f106128a5576101008083540402835291602001916128d0565b820191906000526020600020905b8154815290600101906020018083116128b357829003601f168201915b505050505081526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820160009054906101000a900460ff161515151581526020016008820154815250509050806000015181602001518260400151836060015184608001518560a001518660c001518760e00151886101000151995099509950995099509950995099509950509193959799909294969850565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314612a0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b61012e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611ba881613c02565b600061079582613d2f565b6000612a738284615929565b9392505050565b6000612a7382846159f1565b6000806000612a958585613d85565b91509150612aa281613df2565b509392505050565b6000828152610196602052604080822081516101208101909252805482908290612ad3906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054612aff906158a6565b8015612b4c5780601f10612b2157610100808354040283529160200191612b4c565b820191906000526020600020905b815481529060010190602001808311612b2f57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101009091015261012f54909150612bbd9034612a7a565b61012f5560a0810151612bd09083612a7a565b600084815261019660209081526040808320600501939093556101979052908120612bfe91849190336109b5565b6000848152610197602090815260408083203384529091528120919091555b82811015612c4257612c30338351613bd1565b80612c3a81615a09565b915050612c1d565b5061012d546040517f107e9cf100000000000000000000000000000000000000000000000000000000815234600482015273ffffffffffffffffffffffffffffffffffffffff9091169063107e9cf190602401600060405180830381600087803b158015612caf57600080fd5b505af1158015612cc3573d6000803e3d6000fd5b5050505082612ccf3390565b73ffffffffffffffffffffffffffffffffffffffff167fac100af3f918c30d71d2bfb00d975e36374d10738748c899376504e76c70bc7384604051612d1691815260200190565b60405180910390a3505050565b6127106bffffffffffffffffffffffff82161115612dc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216612e40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610916565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff9091166020909201829052740100000000000000000000000000000000000000009091021760c955565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612ef682611cf5565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16612fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b6000612ff883611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061306757508373ffffffffffffffffffffffffffffffffffffffff1661304f84610f00565b73ffffffffffffffffffffffffffffffffffffffff16145b806130a4575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166130cc82611cf5565b73ffffffffffffffffffffffffffffffffffffffff161461316f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216613211576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610916565b61321c83838361404b565b613227600082612e9c565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260686020526040812080546001929061325d908490615a42565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906132989084906159f1565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b80471015613388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610916565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146133e2576040519150601f19603f3d011682016040523d82523d6000602084013e6133e7565b606091505b5050905080611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610916565b6000612a738284615a42565b611ba881614056565b6127106bffffffffffffffffffffffff8216111561352d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff82166135aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610916565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff93841681526bffffffffffffffffffffffff9283166020808301918252600096875260ca9052919094209351905190911674010000000000000000000000000000000000000000029116179055565b60fb805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612d16565b600054610100900460ff1661384b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b6138558585614098565b61385d6138ce565b6138656138ce565b61386d614139565b61012d8054337fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915561012e805490911673ffffffffffffffffffffffffffffffffffffffff85161790556138c78282612d23565b5050505050565b600054610100900460ff16611f00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b6139708484846130ac565b61397c848484846141d9565b6120fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b600082613a1585846143d8565b14949350505050565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16613ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610916565b6000828152610130602052604081208054613aec906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054613b18906158a6565b8015613b655780601f10613b3a57610100808354040283529160200191613b65565b820191906000526020600020905b815481529060010190602001808311613b4857829003601f168201915b505050505090506000613b8360408051602081019091526000815290565b9050805160001415613b96575092915050565b815115613bc8578082604051602001613bb0929190615a59565b60405160208183030381529060405292505050919050565b6130a484614444565b6000613bdd6101945490565b9050613bee61019480546001019055565b613bf88382614560565b611162818361457a565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314613c83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8116613d26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610916565b611ba881613617565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061079557506107958261464b565b600080825160411415613dbc5760208301516040840151606085015160001a613db0878285856146a1565b94509450505050611830565b825160401415613de65760208301516040840151613ddb8683836147b9565b935093505050611830565b50600090506002611830565b6000816004811115613e0657613e06615a88565b1415613e0f5750565b6001816004811115613e2357613e23615a88565b1415613e8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610916565b6002816004811115613e9f57613e9f615a88565b1415613f07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610916565b6003816004811115613f1b57613f1b615a88565b1415613fa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b6004816004811115613fbd57613fbd615a88565b1415611ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b61116283838361480b565b61405f81614816565b6000818152610130602052604090208054614079906158a6565b159050611ba857600081815261013060205260408120611ba891615174565b600054610100900460ff1661412f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b610e6a82826148ef565b600054610100900460ff166141d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b611f0033613617565b600073ffffffffffffffffffffffffffffffffffffffff84163b156143cd576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290614250903390899088908890600401615ab7565b602060405180830381600087803b15801561426a57600080fd5b505af19250505080156142b8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526142b591810190615b00565b60015b614382573d8080156142e6576040519150601f19603f3d011682016040523d82523d6000602084013e6142eb565b606091505b50805161437a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506130a4565b506001949350505050565b600081815b8451811015612aa25760008582815181106143fa576143fa6159c2565b602002602001015190508083116144205760008381526020829052604090209250614431565b600081815260208490526040902092505b508061443c81615a09565b9150506143dd565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff166144f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610916565b600061450f60408051602081019091526000815290565b9050600081511161452f5760405180602001604052806000815250612a73565b80614539846149ad565b60405160200161454a929190615a59565b6040516020818303038152906040529392505050565b610e6a828260405180602001604052806000815250614adf565b60008281526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1661462b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610916565b6000828152610130602090815260409091208251611162928401906150f0565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610795575061079582614b82565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156146d857506000905060036147b0565b8460ff16601b141580156146f057508460ff16601c14155b1561470157506000905060046147b0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614755573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166147a9576000600192509250506147b0565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8316816147ef60ff86901c601b6159f1565b90506147fd878288856146a1565b935093505050935093915050565b611162838383614c65565b600061482182611cf5565b905061482f8160008461404b565b61483a600083612e9c565b73ffffffffffffffffffffffffffffffffffffffff81166000908152606860205260408120805460019290614870908490615a42565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600054610100900460ff16614986576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b81516149999060659060208501906150f0565b5080516111629060669060208401906150f0565b6060816149ed57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115614a175780614a0181615a09565b9150614a109050600a83615995565b91506149f1565b60008167ffffffffffffffff811115614a3257614a326153e3565b6040519080825280601f01601f191660200182016040528015614a5c576020820181803683370190505b5090505b84156130a457614a71600183615a42565b9150614a7e600a86615b1d565b614a899060306159f1565b60f81b818381518110614a9e57614a9e6159c2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350614ad8600a86615995565b9450614a60565b614ae98383614d6b565b614af660008484846141d9565b611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480614c1557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061079557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610795565b73ffffffffffffffffffffffffffffffffffffffff8316614ccd57614cc881609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b614d0a565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614614d0a57614d0a8382614f39565b73ffffffffffffffffffffffffffffffffffffffff8216614d2e5761116281614ff0565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461116257611162828261509f565b73ffffffffffffffffffffffffffffffffffffffff8216614de8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610916565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615614e74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610916565b614e806000838361404b565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290614eb69084906159f1565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001614f4684611da7565b614f509190615a42565b600083815260986020526040902054909150808214614fb05773ffffffffffffffffffffffffffffffffffffffff841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b50600091825260986020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352609781528383209183525290812055565b60995460009061500290600190615a42565b6000838152609a60205260408120546099805493945090928490811061502a5761502a6159c2565b90600052602060002001549050806099838154811061504b5761504b6159c2565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061508357615083615b31565b6001900381819060005260206000200160009055905550505050565b60006150aa83611da7565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b8280546150fc906158a6565b90600052602060002090601f01602090048101928261511e5760008555615164565b82601f1061513757805160ff1916838001178555615164565b82800160010185558215615164579182015b82811115615164578251825591602001919060010190615149565b506151709291506151aa565b5090565b508054615180906158a6565b6000825580601f10615190575050565b601f016020900490600052602060002090810190611ba891905b5b8082111561517057600081556001016151ab565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611ba857600080fd5b6000602082840312156151ff57600080fd5b8135612a73816151bf565b60008083601f84011261521c57600080fd5b50813567ffffffffffffffff81111561523457600080fd5b60208301915083602082850101111561183057600080fd5b6000806000806060858703121561526257600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561528757600080fd5b6152938782880161520a565b95989497509550505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146152c357600080fd5b919050565b80356bffffffffffffffffffffffff811681146152c357600080fd5b600080604083850312156152f757600080fd5b6153008361529f565b915061530e602084016152c8565b90509250929050565b60005b8381101561533257818101518382015260200161531a565b838111156120fc5750506000910152565b6000815180845261535b816020860160208601615317565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a736020830184615343565b6000602082840312156153b257600080fd5b5035919050565b600080604083850312156153cc57600080fd5b6153d58361529f565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561542d5761542d6153e3565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715615473576154736153e3565b8160405280935085815286868601111561548c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126154b757600080fd5b612a7383833560208501615412565b600080600080600060a086880312156154de57600080fd5b853567ffffffffffffffff8111156154f557600080fd5b615501888289016154a6565b9860208801359850604088013597606081013597506080013595509350505050565b6000806040838503121561553657600080fd5b50508035926020909101359150565b60008060006060848603121561555a57600080fd5b6155638461529f565b92506155716020850161529f565b9150604084013590509250925092565b60008060006060848603121561559657600080fd5b833592506155a66020850161529f565b91506155b4604085016152c8565b90509250925092565b6000602082840312156155cf57600080fd5b612a738261529f565b600080604083850312156155eb57600080fd5b6155f48361529f565b91506020830135801515811461560957600080fd5b809150509250929050565b600080600080600060a0868803121561562c57600080fd5b853567ffffffffffffffff8082111561564457600080fd5b61565089838a016154a6565b9650602088013591508082111561566657600080fd5b50615673888289016154a6565b9450506156826040870161529f565b92506156906060870161529f565b915061569e608087016152c8565b90509295509295909350565b600080600080608085870312156156c057600080fd5b6156c98561529f565b93506156d76020860161529f565b925060408501359150606085013567ffffffffffffffff8111156156fa57600080fd5b8501601f8101871361570b57600080fd5b61571a87823560208401615412565b91505092959194509250565b6000806000806000806080878903121561573f57600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561576557600080fd5b6157718a838b0161520a565b9096509450606089013591508082111561578a57600080fd5b818901915089601f83011261579e57600080fd5b8135818111156157ad57600080fd5b8a60208260051b85010111156157c257600080fd5b6020830194508093505050509295509295509295565b600080604083850312156157eb57600080fd5b6157f48361529f565b9150602083013567ffffffffffffffff81111561581057600080fd5b61581c858286016154a6565b9150509250929050565b6000806040838503121561583957600080fd5b6158428361529f565b915061530e6020840161529f565b60006101208083526158648184018d615343565b602084019b909b52505060408101979097526060870195909552608086019390935260a085019190915260c0840152151560e083015261010090910152919050565b600181811c908216806158ba57607f821691505b602082108114156158f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615961576159616158fa565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826159a4576159a4615966565b500490565b6000602082840312156159bb57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115615a0457615a046158fa565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615a3b57615a3b6158fa565b5060010190565b600082821015615a5457615a546158fa565b500390565b60008351615a6b818460208801615317565b835190830190615a7f818360208801615317565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152615af66080830184615343565b9695505050505050565b600060208284031215615b1257600080fd5b8151612a73816151bf565b600082615b2c57615b2c615966565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220b89463e6be1d63e08b17dd3ce9d5b5387783ab1fba46d6aae8b2c015e157ac1764736f6c63430008090033
Deployed Bytecode
0x60806040526004361061026a5760003560e01c80635944c75311610153578063b88d4fde116100cb578063d0def5211161007f578063ea4caca511610064578063ea4caca514610715578063f0f442601461074a578063f2fde38b1461076a57600080fd5b8063d0def5211461069f578063e985e9c5146106bf57600080fd5b8063bf2d9e0b116100b0578063bf2d9e0b14610654578063c13e33f31461066a578063c87b56dd1461067f57600080fd5b8063b88d4fde14610621578063b9b607471461064157600080fd5b8063715018a61161012257806395d89b411161010757806395d89b41146105cc578063a22cb465146105e1578063afef7c041461060157600080fd5b8063715018a61461058c5780638da5cb5b146105a157600080fd5b80635944c7531461050057806361d027b3146105205780636352211e1461054c57806370a082311461056c57600080fd5b80631ea1afdb116101e65780632f745c59116101b557806342842e0e1161019a57806342842e0e146104a057806342966c68146104c05780634f6ccce7146104e057600080fd5b80632f745c591461046b5780633ccfd60b1461048b57600080fd5b80631ea1afdb146103bf57806320c5429b146103df57806323b872dd146103ff5780632a55205a1461041f57600080fd5b8063081812fc1161023d5780630daf00bc116102225780630daf00bc1461036057806318160ddd1461038057806318712c211461039f57600080fd5b8063081812fc146102fb578063095ea7b31461034057600080fd5b806301ffc9a71461026f5780630449015a146102a457806304634d8d146102b957806306fdde03146102d9575b600080fd5b34801561027b57600080fd5b5061028f61028a3660046151ed565b61078a565b60405190151581526020015b60405180910390f35b6102b76102b236600461524c565b61079b565b005b3480156102c557600080fd5b506102b76102d43660046152e4565b610ddf565b3480156102e557600080fd5b506102ee610e6e565b60405161029b919061538d565b34801561030757600080fd5b5061031b6103163660046153a0565b610f00565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161029b565b34801561034c57600080fd5b506102b761035b3660046153b9565b610fda565b34801561036c57600080fd5b506102b761037b3660046154c6565b611167565b34801561038c57600080fd5b506099545b60405190815260200161029b565b3480156103ab57600080fd5b506102b76103ba366004615523565b611321565b3480156103cb57600080fd5b506102b76103da3660046153a0565b611434565b3480156103eb57600080fd5b506102b76103fa3660046153a0565b611565565b34801561040b57600080fd5b506102b761041a366004615545565b61169c565b34801561042b57600080fd5b5061043f61043a366004615523565b61173e565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520161029b565b34801561047757600080fd5b506103916104863660046153b9565b611837565b34801561049757600080fd5b506102b7611906565b3480156104ac57600080fd5b506102b76104bb366004615545565b611aef565b3480156104cc57600080fd5b506102b76104db3660046153a0565b611b0a565b3480156104ec57600080fd5b506103916104fb3660046153a0565b611bab565b34801561050c57600080fd5b506102b761051b366004615581565b611c69565b34801561052c57600080fd5b5061012e5473ffffffffffffffffffffffffffffffffffffffff1661031b565b34801561055857600080fd5b5061031b6105673660046153a0565b611cf5565b34801561057857600080fd5b506103916105873660046155bd565b611da7565b34801561059857600080fd5b506102b7611e75565b3480156105ad57600080fd5b5060fb5473ffffffffffffffffffffffffffffffffffffffff1661031b565b3480156105d857600080fd5b506102ee611f02565b3480156105ed57600080fd5b506102b76105fc3660046155d8565b611f11565b34801561060d57600080fd5b506102b761061c366004615614565b611f1c565b34801561062d57600080fd5b506102b761063c3660046156aa565b61205a565b6102b761064f366004615726565b612102565b34801561066057600080fd5b5061012f54610391565b34801561067657600080fd5b50610391612770565b34801561068b57600080fd5b506102ee61069a3660046153a0565b612781565b3480156106ab57600080fd5b506102b76106ba3660046157d8565b61278c565b3480156106cb57600080fd5b5061028f6106da366004615826565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561072157600080fd5b506107356107303660046153a0565b612817565b60405161029b99989796959493929190615850565b34801561075657600080fd5b506102b76107653660046155bd565b61298a565b34801561077657600080fd5b506102b76107853660046155bd565b612a53565b600061079582612a5c565b92915050565b8383838360006101966000868152602001908152602001600020604051806101200160405290816000820180546107d1906158a6565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906158a6565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e0808301919091526008909201546101009091015281015190915061091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a2031000000000000000000000000000000000000000060448201526064015b60405180910390fd5b602081015134906109309086612a67565b1115610998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b60608101516000868152610197602052604081206109e291879190335b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205490612a7a565b1115610a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a0820151610a5e9086612a7a565b1115610ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd984848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a7a565b604051602001610b5591815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b90612a86565b73ffffffffffffffffffffffffffffffffffffffff1614610c56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b6000898152610196602052604080822081516101208101909252805482908290610c7f906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610cab906158a6565b8015610cf85780601f10610ccd57610100808354040283529160200191610cf8565b820191906000526020600020905b815481529060010190602001808311610cdb57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e08301526008909201546101009091015281015190915015610dc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b610dd38a8a612aaa565b50505050505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282612d23565b5050565b606060658054610e7d906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610ea9906158a6565b8015610ef65780601f10610ecb57610100808354040283529160200191610ef6565b820191906000526020600020905b815481529060010190602001808311610ed957829003601f168201915b5050505050905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16610fb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610fe582611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610916565b3373ffffffffffffffffffffffffffffffffffffffff821614806110cc57506110cc81336106da565b611158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610916565b6111628383612e9c565b505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146111e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b60006111f46101955490565b905061120561019580546001019055565b604080516101208101825287815260208082018890528183018790526060820186905260808201859052600060a0830181905260c08301819052600160e08401526101008301819052848152610196825292909220815180519293919261126f92849201906150f0565b50602082015160018201556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e08301516007830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055610100909201516008909101555181907f722868ecddb510067469fb495ac2904c250692c67941ad0bd36e01c2059fc77890600090a2505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000828152610196602052604090206007015460ff1661141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000918252610196602052604090912060060155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146114b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000818152610196602052604090206008015461154f906001612a7a565b6000918252610196602052604090912060080155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146115e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611662576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b60009081526101966020526040902060070180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6116a7335b82612f3c565b611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b6111628383836130ac565b600082815260ca6020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169282019290925282916117f957506040805180820190915260c95473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b60208101516000906127109061181d906bffffffffffffffffffffffff1687615929565b6118279190615995565b91519350909150505b9250929050565b600061184283611da7565b82106118d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152609760209081526040808320938352929052205490565b60004711611970576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f302062616c616e636500000000000000000000000000000000000000000000006044820152606401610916565b61012d546040517f9af608c9000000000000000000000000000000000000000000000000000000008152306004820152479160009173ffffffffffffffffffffffffffffffffffffffff90911690639af608c99060240160206040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1791906159a9565b61012d546040517fb9bff4bb0000000000000000000000000000000000000000000000000000000081526004810183905291925073ffffffffffffffffffffffffffffffffffffffff169063b9bff4bb90602401600060405180830381600087803b158015611a8557600080fd5b505af1158015611a99573d6000803e3d6000fd5b505061012d54611ac2925073ffffffffffffffffffffffffffffffffffffffff1690508261331e565b61012e54610e6a9073ffffffffffffffffffffffffffffffffffffffff16611aea8484613478565b61331e565b6111628383836040518060200160405280600081525061205a565b611b13336116a1565b611b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610916565b611ba881613484565b50565b6000611bb660995490565b8210611c44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610916565b60998281548110611c5757611c576159c2565b90600052602060002001549050919050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b61116283838361348d565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610916565b600073ffffffffffffffffffffffffffffffffffffffff8216611e4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611ef6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b611f006000613617565b565b606060668054610e7d906158a6565b610e6a33838361368e565b600054610100900460ff16611f375760005460ff1615611f3b565b303b155b611fc7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610916565b600054610100900460ff1615801561200657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b61201386868686866137b4565b61201b6138ce565b6120236138ce565b801561205257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b505050505050565b6120643383612f3c565b6120f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b6120fc84848484613965565b50505050565b858585856000610196600086815260200190815260200160002060405180610120016040529081600082018054612138906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054612164906158a6565b80156121b15780601f10612186576101008083540402835291602001916121b1565b820191906000526020600020905b81548152906001019060200180831161219457829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08083019190915260089092015461010090910152810151909150612281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203100000000000000000000000000000000000000006044820152606401610916565b602081015134906122929086612a67565b11156122fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b606081015160008681526101976020526040812061231b91879190336109b5565b1115612383576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a08201516123979086612a7a565b11156123ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a7a565b73ffffffffffffffffffffffffffffffffffffffff16146124f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b60008b8152610196602052604080822081516101208101909252805482908290612522906158a6565b80601f016020809104026020016040519081016040528092919081815260200182805461254e906158a6565b801561259b5780601f106125705761010080835404028352916020019161259b565b820191906000526020600020905b81548152906001019060200180831161257e57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e08301526008909201546101009091015281015190915061266b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b6126f288888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060c08301516040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260340160405160208183030381529060405280519060200120613a08565b612758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203400000000000000000000000000000000000000006044820152606401610916565b6127628c8c612aaa565b505050505050505050505050565b600061277c6101955490565b905090565b606061079582613a1e565b60fb5473ffffffffffffffffffffffffffffffffffffffff16331461280d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282613bd1565b6060600080600080600080600080600061019660008c815260200190815260200160002060405180610120016040529081600082018054612857906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054612883906158a6565b80156128d05780601f106128a5576101008083540402835291602001916128d0565b820191906000526020600020905b8154815290600101906020018083116128b357829003601f168201915b505050505081526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820160009054906101000a900460ff161515151581526020016008820154815250509050806000015181602001518260400151836060015184608001518560a001518660c001518760e00151886101000151995099509950995099509950995099509950509193959799909294969850565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314612a0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b61012e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611ba881613c02565b600061079582613d2f565b6000612a738284615929565b9392505050565b6000612a7382846159f1565b6000806000612a958585613d85565b91509150612aa281613df2565b509392505050565b6000828152610196602052604080822081516101208101909252805482908290612ad3906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054612aff906158a6565b8015612b4c5780601f10612b2157610100808354040283529160200191612b4c565b820191906000526020600020905b815481529060010190602001808311612b2f57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101009091015261012f54909150612bbd9034612a7a565b61012f5560a0810151612bd09083612a7a565b600084815261019660209081526040808320600501939093556101979052908120612bfe91849190336109b5565b6000848152610197602090815260408083203384529091528120919091555b82811015612c4257612c30338351613bd1565b80612c3a81615a09565b915050612c1d565b5061012d546040517f107e9cf100000000000000000000000000000000000000000000000000000000815234600482015273ffffffffffffffffffffffffffffffffffffffff9091169063107e9cf190602401600060405180830381600087803b158015612caf57600080fd5b505af1158015612cc3573d6000803e3d6000fd5b5050505082612ccf3390565b73ffffffffffffffffffffffffffffffffffffffff167fac100af3f918c30d71d2bfb00d975e36374d10738748c899376504e76c70bc7384604051612d1691815260200190565b60405180910390a3505050565b6127106bffffffffffffffffffffffff82161115612dc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216612e40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610916565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff9091166020909201829052740100000000000000000000000000000000000000009091021760c955565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612ef682611cf5565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16612fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b6000612ff883611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061306757508373ffffffffffffffffffffffffffffffffffffffff1661304f84610f00565b73ffffffffffffffffffffffffffffffffffffffff16145b806130a4575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166130cc82611cf5565b73ffffffffffffffffffffffffffffffffffffffff161461316f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216613211576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610916565b61321c83838361404b565b613227600082612e9c565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260686020526040812080546001929061325d908490615a42565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906132989084906159f1565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b80471015613388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610916565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146133e2576040519150601f19603f3d011682016040523d82523d6000602084013e6133e7565b606091505b5050905080611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610916565b6000612a738284615a42565b611ba881614056565b6127106bffffffffffffffffffffffff8216111561352d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff82166135aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610916565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff93841681526bffffffffffffffffffffffff9283166020808301918252600096875260ca9052919094209351905190911674010000000000000000000000000000000000000000029116179055565b60fb805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612d16565b600054610100900460ff1661384b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b6138558585614098565b61385d6138ce565b6138656138ce565b61386d614139565b61012d8054337fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915561012e805490911673ffffffffffffffffffffffffffffffffffffffff85161790556138c78282612d23565b5050505050565b600054610100900460ff16611f00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b6139708484846130ac565b61397c848484846141d9565b6120fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b600082613a1585846143d8565b14949350505050565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16613ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610916565b6000828152610130602052604081208054613aec906158a6565b80601f0160208091040260200160405190810160405280929190818152602001828054613b18906158a6565b8015613b655780601f10613b3a57610100808354040283529160200191613b65565b820191906000526020600020905b815481529060010190602001808311613b4857829003601f168201915b505050505090506000613b8360408051602081019091526000815290565b9050805160001415613b96575092915050565b815115613bc8578082604051602001613bb0929190615a59565b60405160208183030381529060405292505050919050565b6130a484614444565b6000613bdd6101945490565b9050613bee61019480546001019055565b613bf88382614560565b611162818361457a565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314613c83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8116613d26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610916565b611ba881613617565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061079557506107958261464b565b600080825160411415613dbc5760208301516040840151606085015160001a613db0878285856146a1565b94509450505050611830565b825160401415613de65760208301516040840151613ddb8683836147b9565b935093505050611830565b50600090506002611830565b6000816004811115613e0657613e06615a88565b1415613e0f5750565b6001816004811115613e2357613e23615a88565b1415613e8b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610916565b6002816004811115613e9f57613e9f615a88565b1415613f07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610916565b6003816004811115613f1b57613f1b615a88565b1415613fa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b6004816004811115613fbd57613fbd615a88565b1415611ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b61116283838361480b565b61405f81614816565b6000818152610130602052604090208054614079906158a6565b159050611ba857600081815261013060205260408120611ba891615174565b600054610100900460ff1661412f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b610e6a82826148ef565b600054610100900460ff166141d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b611f0033613617565b600073ffffffffffffffffffffffffffffffffffffffff84163b156143cd576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290614250903390899088908890600401615ab7565b602060405180830381600087803b15801561426a57600080fd5b505af19250505080156142b8575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526142b591810190615b00565b60015b614382573d8080156142e6576040519150601f19603f3d011682016040523d82523d6000602084013e6142eb565b606091505b50805161437a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506130a4565b506001949350505050565b600081815b8451811015612aa25760008582815181106143fa576143fa6159c2565b602002602001015190508083116144205760008381526020829052604090209250614431565b600081815260208490526040902092505b508061443c81615a09565b9150506143dd565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff166144f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610916565b600061450f60408051602081019091526000815290565b9050600081511161452f5760405180602001604052806000815250612a73565b80614539846149ad565b60405160200161454a929190615a59565b6040516020818303038152906040529392505050565b610e6a828260405180602001604052806000815250614adf565b60008281526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1661462b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610916565b6000828152610130602090815260409091208251611162928401906150f0565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610795575061079582614b82565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156146d857506000905060036147b0565b8460ff16601b141580156146f057508460ff16601c14155b1561470157506000905060046147b0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614755573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166147a9576000600192509250506147b0565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8316816147ef60ff86901c601b6159f1565b90506147fd878288856146a1565b935093505050935093915050565b611162838383614c65565b600061482182611cf5565b905061482f8160008461404b565b61483a600083612e9c565b73ffffffffffffffffffffffffffffffffffffffff81166000908152606860205260408120805460019290614870908490615a42565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600054610100900460ff16614986576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b81516149999060659060208501906150f0565b5080516111629060669060208401906150f0565b6060816149ed57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115614a175780614a0181615a09565b9150614a109050600a83615995565b91506149f1565b60008167ffffffffffffffff811115614a3257614a326153e3565b6040519080825280601f01601f191660200182016040528015614a5c576020820181803683370190505b5090505b84156130a457614a71600183615a42565b9150614a7e600a86615b1d565b614a899060306159f1565b60f81b818381518110614a9e57614a9e6159c2565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350614ad8600a86615995565b9450614a60565b614ae98383614d6b565b614af660008484846141d9565b611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480614c1557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061079557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610795565b73ffffffffffffffffffffffffffffffffffffffff8316614ccd57614cc881609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b614d0a565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614614d0a57614d0a8382614f39565b73ffffffffffffffffffffffffffffffffffffffff8216614d2e5761116281614ff0565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461116257611162828261509f565b73ffffffffffffffffffffffffffffffffffffffff8216614de8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610916565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615614e74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610916565b614e806000838361404b565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290614eb69084906159f1565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001614f4684611da7565b614f509190615a42565b600083815260986020526040902054909150808214614fb05773ffffffffffffffffffffffffffffffffffffffff841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b50600091825260986020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352609781528383209183525290812055565b60995460009061500290600190615a42565b6000838152609a60205260408120546099805493945090928490811061502a5761502a6159c2565b90600052602060002001549050806099838154811061504b5761504b6159c2565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061508357615083615b31565b6001900381819060005260206000200160009055905550505050565b60006150aa83611da7565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b8280546150fc906158a6565b90600052602060002090601f01602090048101928261511e5760008555615164565b82601f1061513757805160ff1916838001178555615164565b82800160010185558215615164579182015b82811115615164578251825591602001919060010190615149565b506151709291506151aa565b5090565b508054615180906158a6565b6000825580601f10615190575050565b601f016020900490600052602060002090810190611ba891905b5b8082111561517057600081556001016151ab565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611ba857600080fd5b6000602082840312156151ff57600080fd5b8135612a73816151bf565b60008083601f84011261521c57600080fd5b50813567ffffffffffffffff81111561523457600080fd5b60208301915083602082850101111561183057600080fd5b6000806000806060858703121561526257600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561528757600080fd5b6152938782880161520a565b95989497509550505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146152c357600080fd5b919050565b80356bffffffffffffffffffffffff811681146152c357600080fd5b600080604083850312156152f757600080fd5b6153008361529f565b915061530e602084016152c8565b90509250929050565b60005b8381101561533257818101518382015260200161531a565b838111156120fc5750506000910152565b6000815180845261535b816020860160208601615317565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a736020830184615343565b6000602082840312156153b257600080fd5b5035919050565b600080604083850312156153cc57600080fd5b6153d58361529f565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561542d5761542d6153e3565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715615473576154736153e3565b8160405280935085815286868601111561548c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126154b757600080fd5b612a7383833560208501615412565b600080600080600060a086880312156154de57600080fd5b853567ffffffffffffffff8111156154f557600080fd5b615501888289016154a6565b9860208801359850604088013597606081013597506080013595509350505050565b6000806040838503121561553657600080fd5b50508035926020909101359150565b60008060006060848603121561555a57600080fd5b6155638461529f565b92506155716020850161529f565b9150604084013590509250925092565b60008060006060848603121561559657600080fd5b833592506155a66020850161529f565b91506155b4604085016152c8565b90509250925092565b6000602082840312156155cf57600080fd5b612a738261529f565b600080604083850312156155eb57600080fd5b6155f48361529f565b91506020830135801515811461560957600080fd5b809150509250929050565b600080600080600060a0868803121561562c57600080fd5b853567ffffffffffffffff8082111561564457600080fd5b61565089838a016154a6565b9650602088013591508082111561566657600080fd5b50615673888289016154a6565b9450506156826040870161529f565b92506156906060870161529f565b915061569e608087016152c8565b90509295509295909350565b600080600080608085870312156156c057600080fd5b6156c98561529f565b93506156d76020860161529f565b925060408501359150606085013567ffffffffffffffff8111156156fa57600080fd5b8501601f8101871361570b57600080fd5b61571a87823560208401615412565b91505092959194509250565b6000806000806000806080878903121561573f57600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561576557600080fd5b6157718a838b0161520a565b9096509450606089013591508082111561578a57600080fd5b818901915089601f83011261579e57600080fd5b8135818111156157ad57600080fd5b8a60208260051b85010111156157c257600080fd5b6020830194508093505050509295509295509295565b600080604083850312156157eb57600080fd5b6157f48361529f565b9150602083013567ffffffffffffffff81111561581057600080fd5b61581c858286016154a6565b9150509250929050565b6000806040838503121561583957600080fd5b6158428361529f565b915061530e6020840161529f565b60006101208083526158648184018d615343565b602084019b909b52505060408101979097526060870195909552608086019390935260a085019190915260c0840152151560e083015261010090910152919050565b600181811c908216806158ba57607f821691505b602082108114156158f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615961576159616158fa565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826159a4576159a4615966565b500490565b6000602082840312156159bb57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115615a0457615a046158fa565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615a3b57615a3b6158fa565b5060010190565b600082821015615a5457615a546158fa565b500390565b60008351615a6b818460208801615317565b835190830190615a7f818360208801615317565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152615af66080830184615343565b9695505050505050565b600060208284031215615b1257600080fd5b8151612a73816151bf565b600082615b2c57615b2c615966565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220b89463e6be1d63e08b17dd3ce9d5b5387783ab1fba46d6aae8b2c015e157ac1764736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.