NFT
Overview
TokenID
656
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TheKissPrecise
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Copyright 2022 Arran Schlosberg pragma solidity >=0.8.0 <0.9.0; import "./IKissRenderer.sol"; import "./IPublicMintable.sol"; import "@divergencetech/ethier/contracts/crypto/SignatureChecker.sol"; import "@divergencetech/ethier/contracts/erc721/ERC721Common.sol"; import "@divergencetech/ethier/contracts/erc721/ERC721Redeemer.sol"; import "@divergencetech/ethier/contracts/sales/ArbitraryPriceSeller.sol"; import "@divergencetech/ethier/contracts/utils/Monotonic.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC721.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; /** @notice A pure-Solidity generative-art NFT, The Kiss Precise: www.thekiss.xyz */ contract TheKissPrecise is ERC721Common, ArbitraryPriceSeller, IERC2981, IPublicMintable { using EnumerableSet for EnumerableSet.AddressSet; using ERC165Checker for address; using ERC721Redeemer for ERC721Redeemer.Claims; using Monotonic for Monotonic.Increaser; using SignatureChecker for EnumerableSet.AddressSet; /** @notice Address of the PROOF OF {ART}WORK NFT. Hodlers are guaranteed 2x Kiss mints. */ IERC721 public immutable poaw; /** @notice Address of the Brotchain NFT. Hodlers are guaranteed 1x Kiss mint. */ IERC721 public immutable brot; constructor( address _renderer, IERC721 _poaw, IERC721 _brotchain ) ERC721Common("The Kiss Precise", "KISS") ArbitraryPriceSeller( Seller.SellerConfig({ totalInventory: 1024, maxPerAddress: 0, maxPerTx: 0, freeQuota: 20, reserveFreeQuota: true, lockFreeQuota: false, lockTotalInventory: true }), payable(0x5D484C0546679aaCe24c330b301CC6baDFA60259) ) { poaw = _poaw; brot = _brotchain; setRenderer(_renderer); } /** @notice Minting price for public minters. */ uint256 public publicPrice = 0.314159 ether; /** @notice Minting price for hodlers of divergence tokens, PO{A}W or Brotchain. */ uint256 public collectorPrice = 0.256 ether; /** @notice Updates the prices for the two tiers. */ function setPrice(uint256 public_, uint256 collectors) external onlyOwner { publicPrice = public_; collectorPrice = collectors; } /** @notice Proxy contract from which public minting requests are allowed. */ address public publicMinter; /** @notice Toggles the public-minting contract. */ function setPublicMinter(address _publicMinter) external onlyOwner { publicMinter = _publicMinter; } /** @notice Mint as a member of the public, but only via minter contract. @dev This allows for arbitrary control of minting logic post deployment. */ function mintPublic(address to, uint256 n) external payable { require(msg.sender == publicMinter, "Direct public minting"); _purchase(to, n, publicPrice); } /** @notice Flag reflecting if collector (PO{A}W or Brotchain) minting is open. */ bool public collectorMinting = false; /** @notice Toggles the collector-minting flag. */ function setCollectorMinting(bool _collectorMinting) external onlyOwner { collectorMinting = _collectorMinting; } /** @notice Already-claimed mints from the PROOF OF {ART}WORK and Brotchain guaranteed pools. */ ERC721Redeemer.Claims private poawClaims; ERC721Redeemer.Claims private brotClaims; uint256 private constant CLAIM_ALLOWANCE = 1; /** @notice Mint as a holder of PROOF OF {ART}WORK or Brotchain token(s). @dev Only one of the two collections can be claimed per call. @param poawIds PROOF OF {ART}WORK tokenIds to claim against; each claim receives an extra free Kiss. @param brotIds Brotchain tokenIds to claim against. */ function claimCollectorMints( uint256[] calldata poawIds, uint256[] calldata brotIds ) external payable { require(collectorMinting, "Collector minting closed"); // To adjust for the free Kiss to PO{A}W holders, we halve the price and // double the number redeemed. Because of potential rounding errors, we // therefore can't merge with Brotchain redemption. It also isn't safe // to call _purchase() twice in a single transaction as msg.value will // be double spent. if (poawIds.length > 0) { _purchase( msg.sender, 2 * poawClaims.redeem( CLAIM_ALLOWANCE, msg.sender, poaw, poawIds ), collectorPrice / 2 ); } else { _purchase( msg.sender, brotClaims.redeem(CLAIM_ALLOWANCE, msg.sender, brot, brotIds), collectorPrice ); } } /** @notice Returns the number of additional claims that can be made, via claimCollectorMints(), with the specific PROOF OF {ART}WORK token. */ function poawClaimsRemaining(uint256 tokenId) external view returns (uint256) { return claimsRemaining(poaw, poawClaims, CLAIM_ALLOWANCE, tokenId); } /** @notice Returns the number of additional claims that can be made, via claimCollectorMints(), with the specific Brotchain token. */ function brotchainClaimsRemaining(uint256 tokenId) external view returns (uint256) { return claimsRemaining(brot, brotClaims, CLAIM_ALLOWANCE, tokenId); } function claimsRemaining( IERC721 token, ERC721Redeemer.Claims storage claims, uint256 maxAllowance, uint256 tokenId ) private view returns (uint256) { token.ownerOf(tokenId); // will revert if non-existent return claims.unclaimed(maxAllowance, tokenId); } /** @notice Set of addresses from which valid signatures will be accepted to provide access to minting. */ EnumerableSet.AddressSet private signers; /** @notice Add an address allowed to sign minting access. */ function addSigner(address signer) external onlyOwner { signers.add(signer); } /** @notice Remove an address from those allowed to sign minting access. */ function removeSigner(address signer) external onlyOwner { signers.remove(signer); } /** @notice Already-redeemed signed-minting messages. */ mapping(bytes32 => bool) public usedMessages; /** @notice Mint as a holder of a signature; most likely from the allow list. */ function mintWithSignature( uint256 n, uint256 price, bytes32 nonce, bytes calldata signature ) external payable { signers.requireValidSignature( abi.encodePacked(msg.sender, n, price, nonce), signature, usedMessages ); _purchase(msg.sender, n, price); } /** @notice Partially fulfills the ERC721Enumerable interface. */ Monotonic.Increaser public totalSupply; /** @notice The per-token seeds used to generate images. */ mapping(uint256 => bytes32) public seeds; /** @notice Override of the Seller purchasing logic to mint the required number of tokens. The freeOfCharge boolean flag is deliberately ignored. */ function _handlePurchase( address to, uint256 n, bool ) internal override { uint256 nextId = totalSupply.current(); uint256 end = nextId + n; // These are close enough to unpredictable / uncontrollable to be // sufficiently random for our purpose. Only a miner could really // influence this. bytes memory entropyBase = abi.encodePacked( address(this), block.coinbase, block.number, to ); for (; nextId < end; ++nextId) { _safeMint(to, nextId); seeds[nextId] = keccak256(abi.encodePacked(entropyBase, nextId)); } totalSupply.add(n); } /** @notice Flag to disable use of renewSeed(). */ bool public seedsLocked = false; /** @notice Permanently sets the seed-lock flag to true. */ function lockSeeds() external onlyOwner { seedsLocked = true; } /** @notice Some seeds would result in execution errors and although this behaviour has not been seen recently, renewSeed() recalculates a seed by hashing the old one. This is a protective mechanism to guarantee that no tokens are invalid. Once all tokens are rendered, the irreversible seed lock will be put in place. */ function renewSeed(uint256 tokenId) external tokenExists(tokenId) onlyOwner { require(!seedsLocked, "Seeds locked"); seeds[tokenId] = keccak256(abi.encodePacked(seeds[tokenId])); } /** @notice Contract responsible for rendering images and token metadata from seeds. */ IKissRenderer public renderer; /** @notice Flag to disable use of setRenderer(). */ bool public rendererLocked = false; /** @notice Permanently sets the renderer-lock flag to true. */ function lockRenderer() external onlyOwner { require( address(renderer).supportsInterface( type(IKissRenderer).interfaceId ), "Not IKissRenderer" ); rendererLocked = true; } /** @notice Sets the address of the rendering contract. @dev No checks are performed when setting, but lockRenderer() ensures that the final address implements the IKissRenderer interface. */ function setRenderer(address _renderer) public onlyOwner { require(!rendererLocked, "Renderer locked"); renderer = IKissRenderer(_renderer); } /** @notice Returns the data-encoded token URI containing full metadata and image. */ function tokenURI(uint256 tokenId) public view override tokenExists(tokenId) returns (string memory) { require(address(renderer) != address(0), "No renderer"); return renderer.tokenURI(tokenId, seeds[tokenId]); } /** @notice Defines royalty proportion in hundredths of a percent. */ uint256 public royaltyBasisPoints = 1000; uint256 private constant BASIS_POINT_DENOMINATOR = 100 * 100; /** @notice Sets royalty proportion. @param basisPoints Measured in hundredths of a percent; 1% = 100; 1.5% = 150; etc. */ function setRoyalties(uint256 basisPoints) external onlyOwner { require(basisPoints <= BASIS_POINT_DENOMINATOR, ">100%"); royaltyBasisPoints = basisPoints; } /** @notice Implements ERC2981, always returning the sales beneficiary as the receiver. */ function royaltyInfo(uint256, uint256 salePrice) external view override returns (address, uint256) { // Probably safe to assume that salePrice will be less than max(uint256)/10000 ;) return ( Seller.beneficiary, (salePrice * royaltyBasisPoints) / BASIS_POINT_DENOMINATOR ); } /** @notice Adds ERC2981 interface to the set of already-supported interfaces. */ function supportsInterface(bytes4 interfaceId) public view override(ERC721Common, IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; interface IPublicMintable { function mintPublic(address to, uint256 n) external payable; }
// SPDX-License-Identifier: UNLICENSED // Copyright 2022 Arran Schlosberg pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/interfaces/IERC165.sol"; interface IKissRenderer is IERC165 { /** @notice Returns an image for an arbitrary seed. */ function draw(bytes32 seed) external pure returns (string memory); /** @notice Returns an image for an arbitrary string, which should be hashed and propagated to draw(bytes32). */ function draw(string memory seed) external pure returns (string memory); /** @notice Returns a full token JSON metadata object, with image, as a data URI. */ function tokenURI(uint256 tokenId, bytes32 seed) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface, */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return _supportsERC165Interface(account, type(IERC165).interfaceId) && !_supportsERC165Interface(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && _supportsERC165Interface(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in _interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!_supportsERC165Interface(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) { bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams); if (result.length < 32) return false; return success && abi.decode(result, (bool)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.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 ECDSA { 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; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 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", Strings.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/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { 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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(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 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721Pausable is ERC721, Pausable { /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } }
// 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 IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `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/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: 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 = ERC721.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 = ERC721.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); } /** * @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 = ERC721.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); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); 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); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits 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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { 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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) pragma solidity ^0.8.0; import "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard */ interface IERC2981 is IERC165 { /** * @dev Called with the sale price to determine how much royalty is owed and to whom. * @param tokenId - the NFT asset queried for royalty information * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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); } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; /// @notice A Pausable contract that can only be toggled by the Owner. contract OwnerPausable is Ownable, Pausable { /// @notice Pauses the contract. function pause() public onlyOwner { Pausable._pause(); } /// @notice Unpauses the contract. function unpause() public onlyOwner { Pausable._unpause(); } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; /** @notice Provides monotonic increasing and decreasing values, similar to OpenZeppelin's Counter but (a) limited in direction, and (b) allowing for steps > 1. */ library Monotonic { /** @notice Holds a value that can only increase. @dev The internal value MUST NOT be accessed directly. Instead use current() and add(). */ struct Increaser { uint256 value; } /// @notice Returns the current value of the Increaser. function current(Increaser storage incr) internal view returns (uint256) { return incr.value; } /// @notice Adds x to the Increaser's value. function add(Increaser storage incr, uint256 x) internal { incr.value += x; } /** @notice Holds a value that can only decrease. @dev The internal value MUST NOT be accessed directly. Instead use current() and subtract(). */ struct Decreaser { uint256 value; } /// @notice Returns the current value of the Decreaser. function current(Decreaser storage decr) internal view returns (uint256) { return decr.value; } /// @notice Subtracts x from the Decreaser's value. function subtract(Decreaser storage decr, uint256 x) internal { decr.value -= x; } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; /// @notice A minimal interface describing OpenSea's Wyvern proxy registry. contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** @dev This pattern of using an empty contract is cargo-culted directly from OpenSea's example code. TODO: it's likely that the above mapping can be changed to address => address without affecting anything, but further investigation is needed (i.e. is there a subtle reason that OpenSea released it like this?). */ contract OwnableDelegateProxy { }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; // Inspired by BaseOpenSea by Simon Fremaux (@dievardump) but without the need // to pass specific addresses depending on deployment network. // https://gist.github.com/dievardump/483eb43bc6ed30b14f01e01842e3339b/ import "./ProxyRegistry.sol"; /// @notice Library to achieve gas-free listings on OpenSea. library OpenSeaGasFreeListing { /** @notice Returns whether the operator is an OpenSea proxy for the owner, thus allowing it to list without the token owner paying gas. @dev ERC{721,1155}.isApprovedForAll should be overriden to also check if this function returns true. */ function isApprovedForAll(address owner, address operator) internal view returns (bool) { address proxy = proxyFor(owner); return proxy != address(0) && proxy == operator; } /** @notice Returns the OpenSea proxy address for the owner. */ function proxyFor(address owner) internal view returns (address) { address registry; uint256 chainId; assembly { chainId := chainid() switch chainId // Production networks are placed higher to minimise the number of // checks performed and therefore reduce gas. By the same rationale, // mainnet comes before Polygon as it's more expensive. case 1 { // mainnet registry := 0xa5409ec958c83c3f309868babaca7c86dcb077c1 } case 137 { // polygon registry := 0x58807baD0B376efc12F5AD86aAc70E78ed67deaE } case 4 { // rinkeby registry := 0xf57b2c51ded3a29e6891aba85459d600256cf317 } case 80001 { // mumbai registry := 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c } case 1337 { // The geth SimulatedBackend iff used with the ethier // openseatest package. This is mocked as a Wyvern proxy as it's // more complex than the 0x ones. registry := 0xE1a2bbc877b29ADBC56D2659DBcb0ae14ee62071 } } // Unlike Wyvern, the registry itself is the proxy for all owners on 0x // chains. if (registry == address(0) || chainId == 137 || chainId == 80001) { return registry; } return address(ProxyRegistry(registry).proxies(owner)); } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "../utils/Monotonic.sol"; import "../utils/OwnerPausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** @notice An abstract contract providing the _purchase() function to: - Enforce per-wallet / per-transaction limits - Calculate required cost, forwarding to a beneficiary, and refunding extra */ abstract contract Seller is OwnerPausable, ReentrancyGuard { using Address for address payable; using Monotonic for Monotonic.Increaser; using Strings for uint256; /** @dev Note that the address limits are vulnerable to wallet farming. @param maxPerAddress Unlimited if zero. @param maxPerTex Unlimited if zero. @param freeQuota Maximum number that can be purchased free of charge by the contract owner. @param reserveFreeQuota Whether to excplitly reserve the freeQuota amount and not let it be eroded by regular purchases. @param lockFreeQuota If true, calls to setSellerConfig() will ignore changes to freeQuota. Can be locked after initial setting, but not unlocked. This allows a contract owner to commit to a maximum number of reserved items. @param lockTotalInventory Similar to lockFreeQuota but applied to totalInventory. */ struct SellerConfig { uint256 totalInventory; uint256 maxPerAddress; uint256 maxPerTx; uint248 freeQuota; bool reserveFreeQuota; bool lockFreeQuota; bool lockTotalInventory; } constructor(SellerConfig memory config, address payable _beneficiary) { setSellerConfig(config); setBeneficiary(_beneficiary); } /// @notice Configuration of purchase limits. SellerConfig public sellerConfig; /// @notice Sets the seller config. function setSellerConfig(SellerConfig memory config) public onlyOwner { require( config.totalInventory >= config.freeQuota, "Seller: excessive free quota" ); require( config.totalInventory >= _totalSold.current(), "Seller: inventory < already sold" ); require( config.freeQuota >= purchasedFreeOfCharge.current(), "Seller: free quota < already used" ); // Overriding the in-memory fields before copying the whole struct, as // against writing individual fields, gives a greater guarantee of // correctness as the code is simpler to read. if (sellerConfig.lockTotalInventory) { config.lockTotalInventory = true; config.totalInventory = sellerConfig.totalInventory; } if (sellerConfig.lockFreeQuota) { config.lockFreeQuota = true; config.freeQuota = sellerConfig.freeQuota; } sellerConfig = config; } /// @notice Recipient of revenues. address payable public beneficiary; /// @notice Sets the recipient of revenues. function setBeneficiary(address payable _beneficiary) public onlyOwner { beneficiary = _beneficiary; } /** @dev Must return the current cost of a batch of items. This may be constant or, for example, decreasing for a Dutch auction or increasing for a bonding curve. @param n The number of items being purchased. @param metadata Arbitrary data, propagated by the call to _purchase() that can be used to charge different prices. This value is a uint256 instead of bytes as this allows simple passing of a set cost (see ArbitraryPriceSeller). */ function cost(uint256 n, uint256 metadata) public view virtual returns (uint256); /** @dev Called by both _purchase() and purchaseFreeOfCharge() after all limits have been put in place; must perform all contract-specific sale logic, e.g. ERC721 minting. When _handlePurchase() is called, the value returned by Seller.totalSold() will be the pre-purchase amount. @param to The recipient of the item(s). @param n The number of items allowed to be purchased, which MAY be less than to the number passed to _purchase() but SHALL be greater than zero. @param freeOfCharge Indicates that the call originated from purchaseFreeOfCharge() and not _purchase(). */ function _handlePurchase( address to, uint256 n, bool freeOfCharge ) internal virtual; /** @notice Tracks total number of items sold by this contract, including those purchased free of charge by the contract owner. */ Monotonic.Increaser private _totalSold; /// @notice Returns the total number of items sold by this contract. function totalSold() public view returns (uint256) { return _totalSold.current(); } /** @notice Tracks the number of items already bought by an address, regardless of transferring out (in the case of ERC721). @dev This isn't public as it may be skewed due to differences in msg.sender and tx.origin, which it treats in the same way such that sum(_bought)>=totalSold(). */ mapping(address => uint256) private _bought; /** @notice Returns min(n, max(extra items addr can purchase)) and reverts if 0. @param zeroMsg The message with which to revert on 0 extra. */ function _capExtra( uint256 n, address addr, string memory zeroMsg ) internal view returns (uint256) { uint256 extra = sellerConfig.maxPerAddress - _bought[addr]; if (extra == 0) { revert(string(abi.encodePacked("Seller: ", zeroMsg))); } return Math.min(n, extra); } /// @notice Emitted when a buyer is refunded. event Refund(address indexed buyer, uint256 amount); /// @notice Emitted on all purchases of non-zero amount. event Revenue( address indexed beneficiary, uint256 numPurchased, uint256 amount ); /// @notice Tracks number of items purchased free of charge. Monotonic.Increaser private purchasedFreeOfCharge; /** @notice Allows the contract owner to purchase without payment, within the quota enforced by the SellerConfig. */ function purchaseFreeOfCharge(address to, uint256 n) public onlyOwner whenNotPaused { uint256 freeQuota = sellerConfig.freeQuota; n = Math.min(n, freeQuota - purchasedFreeOfCharge.current()); require(n > 0, "Seller: Free quota exceeded"); uint256 totalInventory = sellerConfig.totalInventory; n = Math.min(n, totalInventory - _totalSold.current()); require(n > 0, "Seller: Sold out"); _handlePurchase(to, n, true); _totalSold.add(n); purchasedFreeOfCharge.add(n); assert(_totalSold.current() <= totalInventory); assert(purchasedFreeOfCharge.current() <= freeQuota); } /** @notice Convenience function for calling _purchase() with empty costMetadata when unneeded. */ function _purchase(address to, uint256 requested) internal virtual { _purchase(to, requested, 0); } /** @notice Enforces all purchase limits (counts and costs) before calling _handlePurchase(), after which the received funds are disbursed to the beneficiary, less any required refunds. @param to The final recipient of the item(s). @param requested The number of items requested for purchase, which MAY be reduced when passed to _handlePurchase(). @param costMetadata Arbitrary data, propagated in the call to cost(), to be optionally used in determining the price. */ function _purchase( address to, uint256 requested, uint256 costMetadata ) internal nonReentrant whenNotPaused { /** * ##### CHECKS */ SellerConfig memory config = sellerConfig; uint256 n = config.maxPerTx == 0 ? requested : Math.min(requested, config.maxPerTx); uint256 maxAvailable; uint256 sold; if (config.reserveFreeQuota) { maxAvailable = config.totalInventory - config.freeQuota; sold = _totalSold.current() - purchasedFreeOfCharge.current(); } else { maxAvailable = config.totalInventory; sold = _totalSold.current(); } n = Math.min(n, maxAvailable - sold); require(n > 0, "Seller: Sold out"); if (config.maxPerAddress > 0) { bool alsoLimitSender = _msgSender() != to; bool alsoLimitOrigin = tx.origin != _msgSender() && tx.origin != to; n = _capExtra(n, to, "Buyer limit"); if (alsoLimitSender) { n = _capExtra(n, _msgSender(), "Sender limit"); } if (alsoLimitOrigin) { n = _capExtra(n, tx.origin, "Origin limit"); } _bought[to] += n; if (alsoLimitSender) { _bought[_msgSender()] += n; } if (alsoLimitOrigin) { _bought[tx.origin] += n; } } uint256 _cost = cost(n, costMetadata); if (msg.value < _cost) { revert( string( abi.encodePacked( "Seller: Costs ", (_cost / 1e9).toString(), " GWei" ) ) ); } /** * ##### EFFECTS */ _handlePurchase(to, n, false); _totalSold.add(n); assert(_totalSold.current() <= config.totalInventory); /** * ##### INTERACTIONS */ // Ideally we'd be using a PullPayment here, but the user experience is // poor when there's a variable cost or the number of items purchased // has been capped. We've addressed reentrancy with both a nonReentrant // modifier and the checks, effects, interactions pattern. if (_cost > 0) { beneficiary.sendValue(_cost); emit Revenue(beneficiary, n, _cost); } if (msg.value > _cost) { address payable reimburse = payable(_msgSender()); uint256 refund = msg.value - _cost; // Using Address.sendValue() here would mask the revertMsg upon // reentrancy, but we want to expose it to allow for more precise // testing. This otherwise uses the exact same pattern as // Address.sendValue(). (bool success, bytes memory returnData) = reimburse.call{ value: refund }(""); // Although `returnData` will have a spurious prefix, all we really // care about is that it contains the ReentrancyGuard reversion // message so we can check in the tests. require(success, string(returnData)); emit Refund(reimburse, refund); } } }
// SPDX-License-Identifier: MIT // Copyright (c) 2022 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "./Seller.sol"; /** @dev The Seller base contract has a convenience function _purchase(to,n) that calls the standard function as _purchase(to,n,0). This would result in a free purchase, to the convenience variant is overriden and always reverts with this error. */ error ImplicitFreePurchase(); /** @notice A Seller with an arbitrary price passed in externally. */ abstract contract ArbitraryPriceSeller is Seller { constructor( Seller.SellerConfig memory sellerConfig, address payable _beneficiary ) Seller(sellerConfig, _beneficiary) {} /** @notice Block accidental usage of the convenience function that would default to a free sale. */ function _purchase(address, uint256) internal pure override { revert ImplicitFreePurchase(); } /** @notice Override of Seller.cost() with price passed via metadata. @return n*costEach; */ function cost(uint256 n, uint256 costEach) public pure override returns (uint256) { return n * costEach; } }
// SPDX-License-Identifier: MIT // Copyright (c) 2022 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/interfaces/IERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** @notice Allows holders of ERC721 tokens to redeem rights to some claim; for example, the right to mint a token of some other collection. */ library ERC721Redeemer { using Strings for uint256; /** @notice Storage value to track already-claimed redemptions for a specific token collection. */ struct Claims { /** @dev This field MUST NOT be considered part of the public API. Instead, prefer `using ERC721Redeemer for ERC721Redeemer.Claims` and utilise the provided functions. */ mapping(uint256 => uint256) _total; } /** @notice Emitted when a token's claim is redeemed. */ event Redemption( IERC721 indexed token, address indexed redeemer, uint256 tokenId, uint256 n ); /** @notice Checks that the redeemer is allowed to redeem the claims for the tokenIds by being either the owner or approved address for all tokens, and updates the Claims to reflect this. @dev For more efficient gas usage, recurring values in tokenIds SHOULD be adjacent to one another as this will batch expensive operations. The simplest way to achieve this is by sorting tokenIds. @param tokenIds The token IDs for which the claims are being redeemed. If maxAllowance > 1 then identical tokenIds can be passed more than once; see dev comments. @return The number of redeemed claims; either 0 or tokenIds.length; */ function redeem( Claims storage claimed, uint256 maxAllowance, address redeemer, IERC721 token, uint256[] calldata tokenIds ) internal returns (uint256) { if (maxAllowance == 0 || tokenIds.length == 0) { return 0; } // See comment for `endSameId`. bool multi = maxAllowance > 1; for ( uint256 i = 0; i < tokenIds.length; /* note increment at end */ ) { uint256 tokenId = tokenIds[i]; if ( token.ownerOf(tokenId) != redeemer && token.getApproved(tokenId) != redeemer ) { revertWithTokenId( "ERC721Redeemer: not approved nor owner of", tokenId ); } uint256 n = 1; if (multi) { // If allowed > 1 we can save on expensive operations like // checking ownership / remaining allowance by batching equal // tokenIds. The algorithm assumes that equal IDs are adjacent // in the array. uint256 endSameId; for ( endSameId = i + 1; endSameId < tokenIds.length && tokenIds[endSameId] == tokenId; endSameId++ ) {} n = endSameId - i; } claimed._total[tokenId] += n; if (claimed._total[tokenId] > maxAllowance) { revertWithTokenId( "ERC721Redeemer: over allowance for", tokenId ); } i += n; emit Redemption(token, redeemer, tokenId, n); } return tokenIds.length; } /** @notice Reverts with the concatenation of revertMsg and tokenId.toString(). @dev Used to save gas by constructing the revert message only as required, instead of passing it to require(). */ function revertWithTokenId(string memory revertMsg, uint256 tokenId) private pure { revert(string(abi.encodePacked(revertMsg, " ", tokenId.toString()))); } /** @notice Returns the number of unclaimed redemptions for the token. */ function unclaimed( Claims storage claimed, uint256 maxAllowance, uint256 tokenId ) internal view returns (uint256) { return maxAllowance - claimed._total[tokenId]; } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "../thirdparty/opensea/OpenSeaGasFreeListing.sol"; import "../utils/OwnerPausable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; /** @notice An ERC721 contract with common functionality: - OpenSea gas-free listings - OpenZeppelin Pausable - OpenZeppelin Pausable with functions exposed to Owner only */ contract ERC721Common is Context, ERC721Pausable, OwnerPausable { constructor(string memory name, string memory symbol) ERC721(name, symbol) {} /// @notice Requires that the token exists. modifier tokenExists(uint256 tokenId) { require(ERC721._exists(tokenId), "ERC721Common: Token doesn't exist"); _; } /// @notice Requires that msg.sender owns or is approved for the token. modifier onlyApprovedOrOwner(uint256 tokenId) { require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721Common: Not approved nor owner" ); _; } /// @notice Overrides _beforeTokenTransfer as required by inheritance. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721Pausable) { super._beforeTokenTransfer(from, to, tokenId); } /// @notice Overrides supportsInterface as required by inheritance. function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { return super.supportsInterface(interfaceId); } /** @notice Returns true if either standard isApprovedForAll() returns true or the operator is the OpenSea proxy for the owner. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return super.isApprovedForAll(owner, operator) || OpenSeaGasFreeListing.isApprovedForAll(owner, operator); } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; /** @title SignatureChecker @notice Additional functions for EnumerableSet.Addresset that require a valid ECDSA signature of a standardized message, signed by any member of the set. */ library SignatureChecker { using EnumerableSet for EnumerableSet.AddressSet; /** @notice Requires that the message has not been used previously and that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper for message generation + signature verification + marking message as used @param signers Set of addresses from which signatures are accepted. @param usedMessages Set of already-used messages. @param signature ECDSA signature of message. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, bytes memory data, bytes calldata signature, mapping(bytes32 => bool) storage usedMessages ) internal { bytes32 message = generateMessage(data); require( !usedMessages[message], "SignatureChecker: Message already used" ); usedMessages[message] = true; requireValidSignature(signers, message, signature); } /** @notice Requires that the message has not been used previously and that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper for message generation + signature verification. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, bytes memory data, bytes calldata signature ) internal view { bytes32 message = generateMessage(data); requireValidSignature(signers, message, signature); } /** @notice Requires that the message has not been used previously and that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper for message generation from address + signature verification. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, address a, bytes calldata signature ) internal view { bytes32 message = generateMessage(abi.encodePacked(a)); requireValidSignature(signers, message, signature); } /** @notice Common validator logic, checking if the recovered signer is contained in the signers AddressSet. */ function validSignature( EnumerableSet.AddressSet storage signers, bytes32 message, bytes calldata signature ) internal view returns (bool) { return signers.contains(ECDSA.recover(message, signature)); } /** @notice Requires that the recovered signer is contained in the signers AddressSet. @dev Convenience wrapper that reverts if the signature validation fails. */ function requireValidSignature( EnumerableSet.AddressSet storage signers, bytes32 message, bytes calldata signature ) internal view { require( validSignature(signers, message, signature), "SignatureChecker: Invalid signature" ); } /** @notice Generates a message for a given data input that will be signed off-chain using ECDSA. @dev For multiple data fields, a standard concatenation using `abi.encodePacked` is commonly used to build data. */ function generateMessage(bytes memory data) internal pure returns (bytes32) { return ECDSA.toEthSignedMessageHash(data); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_renderer","type":"address"},{"internalType":"contract IERC721","name":"_poaw","type":"address"},{"internalType":"contract IERC721","name":"_brotchain","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Refund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"numPurchased","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Revenue","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"addSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"brot","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"brotchainClaimsRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"poawIds","type":"uint256[]"},{"internalType":"uint256[]","name":"brotIds","type":"uint256[]"}],"name":"claimCollectorMints","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"collectorMinting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectorPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"},{"internalType":"uint256","name":"costEach","type":"uint256"}],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockSeeds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintWithSignature","outputs":[],"stateMutability":"payable","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":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poaw","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"poawClaimsRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"purchaseFreeOfCharge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"removeSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract IKissRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rendererLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"renewSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","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":"uint256","name":"","type":"uint256"}],"name":"seeds","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seedsLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellerConfig","outputs":[{"internalType":"uint256","name":"totalInventory","type":"uint256"},{"internalType":"uint256","name":"maxPerAddress","type":"uint256"},{"internalType":"uint256","name":"maxPerTx","type":"uint256"},{"internalType":"uint248","name":"freeQuota","type":"uint248"},{"internalType":"bool","name":"reserveFreeQuota","type":"bool"},{"internalType":"bool","name":"lockFreeQuota","type":"bool"},{"internalType":"bool","name":"lockTotalInventory","type":"bool"}],"stateMutability":"view","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 payable","name":"_beneficiary","type":"address"}],"name":"setBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_collectorMinting","type":"bool"}],"name":"setCollectorMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"public_","type":"uint256"},{"internalType":"uint256","name":"collectors","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_publicMinter","type":"address"}],"name":"setPublicMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_renderer","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"totalInventory","type":"uint256"},{"internalType":"uint256","name":"maxPerAddress","type":"uint256"},{"internalType":"uint256","name":"maxPerTx","type":"uint256"},{"internalType":"uint248","name":"freeQuota","type":"uint248"},{"internalType":"bool","name":"reserveFreeQuota","type":"bool"},{"internalType":"bool","name":"lockFreeQuota","type":"bool"},{"internalType":"bool","name":"lockTotalInventory","type":"bool"}],"internalType":"struct Seller.SellerConfig","name":"config","type":"tuple"}],"name":"setSellerConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"value","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":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedMessages","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c060405267045c1df22dfdf00060115567038d7ea4c68000006012556013805460ff60a01b19169055601b805460ff60ff60a81b01191690556103e8601c553480156200004c57600080fd5b5060405162004a9b38038062004a9b8339810160408190526200006f916200062b565b6040805160e0810182526104008152600060208083018290528284018290526014606084015260016080840181905260a0840183905260c084015283518085018552601081526f546865204b697373205072656369736560801b818301908152855180870190965260048652634b49535360e01b9286019290925280519394735d484c0546679aace24c330b301cc6badfa60259948694869484928492620001199290916200056c565b5080516200012f9060019060208401906200056c565b5050506200014c62000146620001a160201b60201c565b620001a5565b50506006805460ff60a01b1916905560016007556200016b82620001f7565b62000176816200043a565b5050506001600160a01b03808416608052821660a052506200019883620004a7565b505050620006bc565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6006546001600160a01b03163314620002465760405162461bcd60e51b8152602060048201819052602482015260008051602062004a7b83398151915260448201526064015b60405180910390fd5b80606001516001600160f81b031681600001511015620002a95760405162461bcd60e51b815260206004820152601c60248201527f53656c6c65723a2065786365737369766520667265652071756f74610000000060448201526064016200023d565b620002c0600e6200056860201b62001b5b1760201c565b81511015620003125760405162461bcd60e51b815260206004820181905260248201527f53656c6c65723a20696e76656e746f7279203c20616c726561647920736f6c6460448201526064016200023d565b6200032960106200056860201b62001b5b1760201c565b81606001516001600160f81b03161015620003915760405162461bcd60e51b815260206004820152602160248201527f53656c6c65723a20667265652071756f7461203c20616c7265616479207573656044820152601960fa1b60648201526084016200023d565b600c54610100900460ff1615620003af57600160c082015260085481525b600c5460ff1615620003d457600160a0820152600b546001600160f81b031660608201525b805160085560208101516009556040810151600a55606081015160808201511515600160f81b026001600160f81b0390911617600b5560a0810151600c805460c09093015115156101000261ff00199215159290921661ffff1990931692909217179055565b6006546001600160a01b03163314620004855760405162461bcd60e51b8152602060048201819052602482015260008051602062004a7b83398151915260448201526064016200023d565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314620004f25760405162461bcd60e51b8152602060048201819052602482015260008051602062004a7b83398151915260448201526064016200023d565b601b54600160a81b900460ff1615620005405760405162461bcd60e51b815260206004820152600f60248201526e14995b99195c995c881b1bd8dad959608a1b60448201526064016200023d565b601b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b5490565b8280546200057a906200067f565b90600052602060002090601f0160209004810192826200059e5760008555620005e9565b82601f10620005b957805160ff1916838001178555620005e9565b82800160010185558215620005e9579182015b82811115620005e9578251825591602001919060010190620005cc565b50620005f7929150620005fb565b5090565b5b80821115620005f75760008155600101620005fc565b6001600160a01b03811681146200062857600080fd5b50565b6000806000606084860312156200064157600080fd5b83516200064e8162000612565b6020850151909350620006618162000612565b6040850151909250620006748162000612565b809150509250925092565b600181811c908216806200069457607f821691505b60208210811415620006b657634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05161437d620006fe600039600081816108210152818161116c01526117aa01526000818161099701528181611114015261143e015261437d6000f3fe6080604052600436106103505760003560e01c806376997548116101c6578063a945bf80116100f7578063d6c878c511610095578063ec9e1c331161006f578063ec9e1c3314610a19578063f0503e8014610a39578063f2fde38b14610a66578063f7d9757714610a8657600080fd5b8063d6c878c5146109b9578063e985e9c5146109d9578063eb12d61e146109f957600080fd5b8063bf62e21d116100d1578063bf62e21d14610925578063c4ec98cc14610945578063c87b56dd14610965578063cc70813b1461098557600080fd5b8063a945bf8014610864578063b88d4fde1461087a578063bb69b7ef1461089a57600080fd5b80639560a90e116101645780639f93f7791161013e5780639f93f779146107dc578063a22cb465146107ef578063a3246b8d1461080f578063a52526991461084357600080fd5b80639560a90e1461079c57806395d89b41146107b25780639c8a2bfd146107c757600080fd5b8063891c77ec116101a0578063891c77ec1461072f5780638ada6b0f146107445780638da5cb5b146107695780639106d7ba1461078757600080fd5b806376997548146106e7578063774a2f6f146106fa5780638456cb591461071a57600080fd5b806338af3eed116102a05780635a0284001161023e5780636352211e116102185780636352211e146106725780636e6ca9581461069257806370a08231146106b2578063715018a6146106d257600080fd5b80635a028400146106025780635c975abb146106325780636094a0701461065157600080fd5b806342260b5d1161027a57806342260b5d1461059257806342842e0e146105a8578063551ba053146105c857806356d3163d146105e257600080fd5b806338af3eed1461053d5780633ec02e141461055d5780633f4ba83a1461057d57600080fd5b806318160ddd1161030d5780632a55205a116102e75780632a55205a146104ab5780632b80183f146104ea5780632f274bd41461050a578063368412ee1461052a57600080fd5b806318160ddd146104465780631c31f7101461046b57806323b872dd1461048b57600080fd5b806301ffc9a71461035557806306fdde031461038a578063081812fc146103ac578063095ea7b3146103e45780630e316ab71461040657806313e7c1d514610426575b600080fd5b34801561036157600080fd5b50610375610370366004613919565b610aa6565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b5061039f610ad1565b604051610381919061398e565b3480156103b857600080fd5b506103cc6103c73660046139a1565b610b63565b6040516001600160a01b039091168152602001610381565b3480156103f057600080fd5b506104046103ff3660046139cf565b610bfd565b005b34801561041257600080fd5b506104046104213660046139fb565b610d13565b34801561043257600080fd5b506104046104413660046139fb565b610d4c565b34801561045257600080fd5b5060195461045d9081565b604051908152602001610381565b34801561047757600080fd5b506104046104863660046139fb565b610d98565b34801561049757600080fd5b506104046104a6366004613a18565b610de4565b3480156104b757600080fd5b506104cb6104c6366004613a59565b610e15565b604080516001600160a01b039093168352602083019190915201610381565b3480156104f657600080fd5b506104046105053660046139a1565b610e50565b34801561051657600080fd5b50610404610525366004613b09565b610eb9565b610404610538366004613bd9565b6110a7565b34801561054957600080fd5b50600d546103cc906001600160a01b031681565b34801561056957600080fd5b5061045d610578366004613a59565b6111a0565b34801561058957600080fd5b506104046111b3565b34801561059e57600080fd5b5061045d601c5481565b3480156105b457600080fd5b506104046105c3366004613a18565b6111e7565b3480156105d457600080fd5b50601b546103759060ff1681565b3480156105ee57600080fd5b506104046105fd3660046139fb565b611202565b34801561060e57600080fd5b5061037561061d3660046139a1565b60186020526000908152604090205460ff1681565b34801561063e57600080fd5b50600654600160a01b900460ff16610375565b34801561065d57600080fd5b50601b5461037590600160a81b900460ff1681565b34801561067e57600080fd5b506103cc61068d3660046139a1565b6112a0565b34801561069e57600080fd5b506013546103cc906001600160a01b031681565b3480156106be57600080fd5b5061045d6106cd3660046139fb565b611317565b3480156106de57600080fd5b5061040461139e565b6104046106f5366004613c45565b6113d2565b34801561070657600080fd5b5061045d6107153660046139a1565b611437565b34801561072657600080fd5b50610404611467565b34801561073b57600080fd5b50610404611499565b34801561075057600080fd5b50601b546103cc9061010090046001600160a01b031681565b34801561077557600080fd5b506006546001600160a01b03166103cc565b34801561079357600080fd5b5061045d6114d2565b3480156107a857600080fd5b5061045d60125481565b3480156107be57600080fd5b5061039f6114e2565b3480156107d357600080fd5b506104046114f1565b6104046107ea3660046139cf565b611592565b3480156107fb57600080fd5b5061040461080a366004613cd2565b6115f1565b34801561081b57600080fd5b506103cc7f000000000000000000000000000000000000000000000000000000000000000081565b34801561084f57600080fd5b5060135461037590600160a01b900460ff1681565b34801561087057600080fd5b5061045d60115481565b34801561088657600080fd5b50610404610895366004613d33565b6115fc565b3480156108a657600080fd5b50600854600954600a54600b54600c546108e2949392916001600160f81b0381169160ff600160f81b9092048216918181169161010090041687565b604080519788526020880196909652948601939093526001600160f81b03909116606085015215156080840152151560a0830152151560c082015260e001610381565b34801561093157600080fd5b506104046109403660046139cf565b61162e565b34801561095157600080fd5b5061045d6109603660046139a1565b6117a3565b34801561097157600080fd5b5061039f6109803660046139a1565b6117d3565b34801561099157600080fd5b506103cc7f000000000000000000000000000000000000000000000000000000000000000081565b3480156109c557600080fd5b506104046109d43660046139a1565b6118f4565b3480156109e557600080fd5b506103756109f4366004613de2565b6119d3565b348015610a0557600080fd5b50610404610a143660046139fb565b611a0e565b348015610a2557600080fd5b50610404610a34366004613e10565b611a43565b348015610a4557600080fd5b5061045d610a543660046139a1565b601a6020526000908152604090205481565b348015610a7257600080fd5b50610404610a813660046139fb565b611a8b565b348015610a9257600080fd5b50610404610aa1366004613a59565b611b26565b60006001600160e01b0319821663152a902d60e11b1480610acb5750610acb82611b5f565b92915050565b606060008054610ae090613e2d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0c90613e2d565b8015610b595780601f10610b2e57610100808354040283529160200191610b59565b820191906000526020600020905b815481529060010190602001808311610b3c57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610be15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c08826112a0565b9050806001600160a01b0316836001600160a01b03161415610c765760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bd8565b336001600160a01b0382161480610c925750610c9281336119d3565b610d045760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bd8565b610d0e8383611b6a565b505050565b6006546001600160a01b03163314610d3d5760405162461bcd60e51b8152600401610bd890613e62565b610d48601682611bd8565b5050565b6006546001600160a01b03163314610d765760405162461bcd60e51b8152600401610bd890613e62565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314610dc25760405162461bcd60e51b8152600401610bd890613e62565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b610dee3382611bed565b610e0a5760405162461bcd60e51b8152600401610bd890613e97565b610d0e838383611cc4565b600d54601c5460009182916001600160a01b039091169061271090610e3a9086613efe565b610e449190613f33565b915091505b9250929050565b6006546001600160a01b03163314610e7a5760405162461bcd60e51b8152600401610bd890613e62565b612710811115610eb45760405162461bcd60e51b81526020600482015260056024820152643e3130302560d81b6044820152606401610bd8565b601c55565b6006546001600160a01b03163314610ee35760405162461bcd60e51b8152600401610bd890613e62565b80606001516001600160f81b031681600001511015610f445760405162461bcd60e51b815260206004820152601c60248201527f53656c6c65723a2065786365737369766520667265652071756f7461000000006044820152606401610bd8565b600e5481511015610f975760405162461bcd60e51b815260206004820181905260248201527f53656c6c65723a20696e76656e746f7279203c20616c726561647920736f6c646044820152606401610bd8565b60105481606001516001600160f81b031610156110005760405162461bcd60e51b815260206004820152602160248201527f53656c6c65723a20667265652071756f7461203c20616c7265616479207573656044820152601960fa1b6064820152608401610bd8565b600c54610100900460ff161561101d57600160c082015260085481525b600c5460ff161561104157600160a0820152600b546001600160f81b031660608201525b805160085560208101516009556040810151600a55606081015160808201511515600160f81b026001600160f81b0390911617600b5560a0810151600c805460c09093015115156101000261ff00199215159290921661ffff1990931692909217179055565b601354600160a01b900460ff166111005760405162461bcd60e51b815260206004820152601860248201527f436f6c6c6563746f72206d696e74696e6720636c6f73656400000000000000006044820152606401610bd8565b821561115e576111593361113a60146001837f00000000000000000000000000000000000000000000000000000000000000008a8a611e6f565b611145906002613efe565b60026012546111549190613f33565b612118565b61119a565b61119a3361119260156001837f00000000000000000000000000000000000000000000000000000000000000008888611e6f565b601254612118565b50505050565b60006111ac8284613efe565b9392505050565b6006546001600160a01b031633146111dd5760405162461bcd60e51b8152600401610bd890613e62565b6111e56125f6565b565b610d0e838383604051806020016040528060008152506115fc565b6006546001600160a01b0316331461122c5760405162461bcd60e51b8152600401610bd890613e62565b601b54600160a81b900460ff16156112785760405162461bcd60e51b815260206004820152600f60248201526e14995b99195c995c881b1bd8dad959608a1b6044820152606401610bd8565b601b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000818152600260205260408120546001600160a01b031680610acb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bd8565b60006001600160a01b0382166113825760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bd8565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146113c85760405162461bcd60e51b8152600401610bd890613e62565b6111e56000612693565b6040516bffffffffffffffffffffffff193360601b1660208201526034810186905260548101859052607481018490526114259060940160408051601f19818403018152919052601690848460186126e5565b611430338686612118565b5050505050565b6000610acb7f0000000000000000000000000000000000000000000000000000000000000000601460018561278e565b6006546001600160a01b031633146114915760405162461bcd60e51b8152600401610bd890613e62565b6111e561280f565b6006546001600160a01b031633146114c35760405162461bcd60e51b8152600401610bd890613e62565b601b805460ff19166001179055565b60006114dd600e5490565b905090565b606060018054610ae090613e2d565b6006546001600160a01b0316331461151b5760405162461bcd60e51b8152600401610bd890613e62565b601b5461153d9061010090046001600160a01b0316630e94d5cf60e21b612874565b61157d5760405162461bcd60e51b81526020600482015260116024820152702737ba1024a5b4b9b9a932b73232b932b960791b6044820152606401610bd8565b601b805460ff60a81b1916600160a81b179055565b6013546001600160a01b031633146115e45760405162461bcd60e51b8152602060048201526015602482015274446972656374207075626c6963206d696e74696e6760581b6044820152606401610bd8565b610d488282601154612118565b610d48338383612890565b6116063383611bed565b6116225760405162461bcd60e51b8152600401610bd890613e97565b61119a8484848461295f565b6006546001600160a01b031633146116585760405162461bcd60e51b8152600401610bd890613e62565b600654600160a01b900460ff16156116825760405162461bcd60e51b8152600401610bd890613f47565b600b546001600160f81b03166116aa8261169b60105490565b6116a59084613f71565b612992565b9150600082116116fc5760405162461bcd60e51b815260206004820152601b60248201527f53656c6c65723a20467265652071756f746120657863656564656400000000006044820152606401610bd8565b60085461170c8361169b600e5490565b9250600083116117515760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b6044820152606401610bd8565b61175d848460016129a8565b611768600e84612a74565b611773601084612a74565b8061177d600e5490565b111561178b5761178b613f88565b8161179560105490565b111561119a5761119a613f88565b6000610acb7f0000000000000000000000000000000000000000000000000000000000000000601560018561278e565b6060816117f7816000908152600260205260409020546001600160a01b0316151590565b6118135760405162461bcd60e51b8152600401610bd890613f9e565b601b5461010090046001600160a01b031661185e5760405162461bcd60e51b815260206004820152600b60248201526a2737903932b73232b932b960a91b6044820152606401610bd8565b601b546000848152601a602052604090819020549051631ecf701b60e31b81526004810186905260248101919091526101009091046001600160a01b03169063f67b80d890604401600060405180830381865afa1580156118c3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118eb9190810190613fdf565b91505b50919050565b60008181526002602052604090205481906001600160a01b031661192a5760405162461bcd60e51b8152600401610bd890613f9e565b6006546001600160a01b031633146119545760405162461bcd60e51b8152600401610bd890613e62565b601b5460ff16156119965760405162461bcd60e51b815260206004820152600c60248201526b14d959591cc81b1bd8dad95960a21b6044820152606401610bd8565b506000818152601a602081815260408084208054825180850191909152825180820385018152908301909252815191830191909120949093525255565b6001600160a01b03808316600090815260056020908152604080832093851683529290529081205460ff16806111ac57506111ac8383612a91565b6006546001600160a01b03163314611a385760405162461bcd60e51b8152600401610bd890613e62565b610d48601682612ad0565b6006546001600160a01b03163314611a6d5760405162461bcd60e51b8152600401610bd890613e62565b60138054911515600160a01b0260ff60a01b19909216919091179055565b6006546001600160a01b03163314611ab55760405162461bcd60e51b8152600401610bd890613e62565b6001600160a01b038116611b1a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bd8565b611b2381612693565b50565b6006546001600160a01b03163314611b505760405162461bcd60e51b8152600401610bd890613e62565b601191909155601255565b5490565b6000610acb82612ae5565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611b9f826112a0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006111ac836001600160a01b038416612b35565b6000818152600260205260408120546001600160a01b0316611c665760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bd8565b6000611c71836112a0565b9050806001600160a01b0316846001600160a01b03161480611cac5750836001600160a01b0316611ca184610b63565b6001600160a01b0316145b80611cbc5750611cbc81856119d3565b949350505050565b826001600160a01b0316611cd7826112a0565b6001600160a01b031614611d3f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610bd8565b6001600160a01b038216611da15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bd8565b611dac838383612c28565b611db7600082611b6a565b6001600160a01b0383166000908152600360205260408120805460019290611de0908490613f71565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e0e90849061404d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000851580611e7c575081155b15611e895750600061210e565b6001861160005b83811015612108576000858583818110611eac57611eac614065565b905060200201359050876001600160a01b0316876001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401611eed91815260200190565b602060405180830381865afa158015611f0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2e919061407b565b6001600160a01b031614158015611fba575060405163020604bf60e21b8152600481018290526001600160a01b03808a16919089169063081812fc90602401602060405180830381865afa158015611f8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fae919061407b565b6001600160a01b031614155b15611fe157611fe16040518060600160405280602981526020016142fd6029913982612c33565b60018315612044576000611ff684600161404d565b90505b868110801561201f57508288888381811061201657612016614065565b90506020020135145b15612036578061202e81614098565b915050611ff9565b6120408482613f71565b9150505b600082815260208c905260408120805483929061206290849061404d565b9091555050600082815260208c905260409020548a101561209f5761209f6040518060600160405280602281526020016143266022913983612c33565b6120a9818461404d565b9250886001600160a01b0316886001600160a01b03167fa28d80c9910787c0c058ed9b50c577f1389264bf61563fa45529e0771976f56284846040516120f9929190918252602082015260400190565b60405180910390a35050611e90565b50829150505b9695505050505050565b6002600754141561216b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bd8565b6002600755600654600160a01b900460ff161561219a5760405162461bcd60e51b8152600401610bd890613f47565b6040805160e08101825260085481526009546020820152600a54918101829052600b546001600160f81b038116606083015260ff600160f81b909104811615156080830152600c54808216151560a0840152610100900416151560c0820152906000901561221557612210848360400151612992565b612217565b835b905060008083608001511561225f5760608401518451612240916001600160f81b031690613f71565b915061224b60105490565b600e546122589190613f71565b905061226f565b8351915061226c600e5490565b90505b61227d836116a58385613f71565b9250600083116122c25760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b6044820152606401610bd8565b60208401511561241e57336001600160a01b0388168114159060009032148015906122f65750326001600160a01b038a1614155b9050612326858a6040518060400160405280600b81526020016a109d5e595c881b1a5b5a5d60aa1b815250612c4e565b945081156123605761235d85336040518060400160405280600c81526020016b14d95b99195c881b1a5b5a5d60a21b815250612c4e565b94505b80156123985761239585326040518060400160405280600c81526020016b13dc9a59da5b881b1a5b5a5d60a21b815250612c4e565b94505b6001600160a01b0389166000908152600f6020526040812080548792906123c090849061404d565b909155505081156123f057336000908152600f6020526040812080548792906123ea90849061404d565b90915550505b801561241b57326000908152600f60205260408120805487929061241590849061404d565b90915550505b50505b600061242a84876111a0565b9050803410156124805761244a612445633b9aca0083613f33565b612c97565b60405160200161245a91906140b3565b60408051601f198184030181529082905262461bcd60e51b8252610bd89160040161398e565b61248c888560006129a8565b612497600e85612a74565b8451600e5411156124aa576124aa613f88565b801561250f57600d546124c6906001600160a01b031682612d95565b600d5460408051868152602081018490526001600160a01b03909216917f01f51b99bd1c3cca301836178e5dee13aadfe44eff06dc3ddcbf3c9d058454f8910160405180910390a25b803411156125e7573360006125248334613f71565b9050600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114612574576040519150601f19603f3d011682016040523d82523d6000602084013e612579565b606091505b509150915081819061259e5760405162461bcd60e51b8152600401610bd8919061398e565b50836001600160a01b03167fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d846040516125da91815260200190565b60405180910390a2505050505b50506001600755505050505050565b600654600160a01b900460ff166126465760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610bd8565b6006805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006126f085612eae565b60008181526020849052604090205490915060ff16156127615760405162461bcd60e51b815260206004820152602660248201527f5369676e6174757265436865636b65723a204d65737361676520616c726561646044820152651e481d5cd95960d21b6064820152608401610bd8565b6000818152602083905260409020805460ff1916600117905561278686828686612eb9565b505050505050565b6040516331a9108f60e11b8152600481018290526000906001600160a01b03861690636352211e90602401602060405180830381865afa1580156127d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127fa919061407b565b50612806848484612f1d565b95945050505050565b600654600160a01b900460ff16156128395760405162461bcd60e51b8152600401610bd890613f47565b6006805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126763390565b600061287f83612f36565b80156111ac57506111ac8383612f69565b816001600160a01b0316836001600160a01b031614156128f25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bd8565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61296a848484611cc4565b61297684848484613048565b61119a5760405162461bcd60e51b8152600401610bd8906140f8565b60008183106129a157816111ac565b5090919050565b60006129b360195490565b905060006129c1848361404d565b6040516bffffffffffffffffffffffff1930606090811b8216602084015241811b8216603484015243604884015288901b166068820152909150600090607c0160405160208183030381529060405290505b81831015612a6d57612a258684613143565b8083604051602001612a3892919061414a565b60408051601f1981840301815291815281516020928301206000868152601a909352912055612a6683614098565b9250612a13565b6127866019865b80826000016000828254612a88919061404d565b90915550505050565b600080612a9d8461315d565b90506001600160a01b03811615801590611cbc5750826001600160a01b0316816001600160a01b03161491505092915050565b60006111ac836001600160a01b0384166132b4565b60006001600160e01b031982166380ac58cd60e01b1480612b1657506001600160e01b03198216635b5e139f60e01b145b80610acb57506301ffc9a760e01b6001600160e01b0319831614610acb565b60008181526001830160205260408120548015612c1e576000612b59600183613f71565b8554909150600090612b6d90600190613f71565b9050818114612bd2576000866000018281548110612b8d57612b8d614065565b9060005260206000200154905080876000018481548110612bb057612bb0614065565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612be357612be361416c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610acb565b6000915050610acb565b610d0e838383613303565b81612c3d82612c97565b60405160200161245a929190614182565b6001600160a01b0382166000908152600f60205260408120546009548291612c7591613f71565b905080612c8d578260405160200161245a91906141be565b6128068582612992565b606081612cbb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ce55780612ccf81614098565b9150612cde9050600a83613f33565b9150612cbf565b60008167ffffffffffffffff811115612d0057612d00613a7b565b6040519080825280601f01601f191660200182016040528015612d2a576020820181803683370190505b5090505b8415611cbc57612d3f600183613f71565b9150612d4c600a866141ee565b612d5790603061404d565b60f81b818381518110612d6c57612d6c614065565b60200101906001600160f81b031916908160001a905350612d8e600a86613f33565b9450612d2e565b80471015612de55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bd8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612e32576040519150601f19603f3d011682016040523d82523d6000602084013e612e37565b606091505b5050905080610d0e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bd8565b6000610acb82613371565b612ec5848484846133ac565b61119a5760405162461bcd60e51b815260206004820152602360248201527f5369676e6174757265436865636b65723a20496e76616c6964207369676e617460448201526275726560e81b6064820152608401610bd8565b600081815260208490526040812054611cbc9084613f71565b6000612f49826301ffc9a760e01b612f69565b8015610acb5750612f62826001600160e01b0319612f69565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090612fd0908690614202565b6000604051808303818686fa925050503d806000811461300c576040519150601f19603f3d011682016040523d82523d6000602084013e613011565b606091505b509150915060208151101561302c5760009350505050610acb565b81801561210e57508080602001905181019061210e919061421e565b60006001600160a01b0384163b1561313b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061308c90339089908890889060040161423b565b6020604051808303816000875af19250505080156130c7575060408051601f3d908101601f191682019092526130c49181019061426e565b60015b613121573d8080156130f5576040519150601f19603f3d011682016040523d82523d6000602084013e6130fa565b606091505b5080516131195760405162461bcd60e51b8152600401610bd8906140f8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cbc565b506001611cbc565b610d488282604051806020016040528060008152506133f8565b60008046806001811461319257608981146131ae57600481146131ca576201388181146131e65761053981146132025761321a565b73a5409ec958c83c3f309868babaca7c86dcb077c1925061321a565b7358807bad0b376efc12f5ad86aac70e78ed67deae925061321a565b73f57b2c51ded3a29e6891aba85459d600256cf317925061321a565b73ff7ca10af37178bdd056628ef42fd7f799fac77c925061321a565b73e1a2bbc877b29adbc56d2659dbcb0ae14ee6207192505b506001600160a01b03821615806132315750806089145b8061323e57508062013881145b1561324a575092915050565b60405163c455279160e01b81526001600160a01b03858116600483015283169063c455279190602401602060405180830381865afa158015613290573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cbc919061407b565b60008181526001830160205260408120546132fb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610acb565b506000610acb565b600654600160a01b900460ff1615610d0e5760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610bd8565b600061337d8251612c97565b8260405160200161338f92919061428b565b604051602081830303815290604052805190602001209050919050565b60006128066133f18585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061342b92505050565b869061344f565b6134028383613471565b61340f6000848484613048565b610d0e5760405162461bcd60e51b8152600401610bd8906140f8565b600080600061343a85856135bf565b915091506134478161362c565b509392505050565b6001600160a01b038116600090815260018301602052604081205415156111ac565b6001600160a01b0382166134c75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bd8565b6000818152600260205260409020546001600160a01b03161561352c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bd8565b61353860008383612c28565b6001600160a01b038216600090815260036020526040812080546001929061356190849061404d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000808251604114156135f65760208301516040840151606085015160001a6135ea878285856137e7565b94509450505050610e49565b82516040141561362057602083015160408401516136158683836138d4565b935093505050610e49565b50600090506002610e49565b6000816004811115613640576136406142e6565b14156136495750565b600181600481111561365d5761365d6142e6565b14156136ab5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610bd8565b60028160048111156136bf576136bf6142e6565b141561370d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610bd8565b6003816004811115613721576137216142e6565b141561377a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610bd8565b600481600481111561378e5761378e6142e6565b1415611b235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610bd8565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561381e57506000905060036138cb565b8460ff16601b1415801561383657508460ff16601c14155b1561384757506000905060046138cb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561389b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166138c4576000600192509250506138cb565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016138f5878288856137e7565b935093505050935093915050565b6001600160e01b031981168114611b2357600080fd5b60006020828403121561392b57600080fd5b81356111ac81613903565b60005b83811015613951578181015183820152602001613939565b8381111561119a5750506000910152565b6000815180845261397a816020860160208601613936565b601f01601f19169290920160200192915050565b6020815260006111ac6020830184613962565b6000602082840312156139b357600080fd5b5035919050565b6001600160a01b0381168114611b2357600080fd5b600080604083850312156139e257600080fd5b82356139ed816139ba565b946020939093013593505050565b600060208284031215613a0d57600080fd5b81356111ac816139ba565b600080600060608486031215613a2d57600080fd5b8335613a38816139ba565b92506020840135613a48816139ba565b929592945050506040919091013590565b60008060408385031215613a6c57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715613ab457613ab4613a7b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613ae357613ae3613a7b565b604052919050565b8015158114611b2357600080fd5b8035613b0481613aeb565b919050565b600060e08284031215613b1b57600080fd5b613b23613a91565b82358152602080840135908201526040808401359082015260608301356001600160f81b0381168114613b5557600080fd5b6060820152613b6660808401613af9565b6080820152613b7760a08401613af9565b60a0820152613b8860c08401613af9565b60c08201529392505050565b60008083601f840112613ba657600080fd5b50813567ffffffffffffffff811115613bbe57600080fd5b6020830191508360208260051b8501011115610e4957600080fd5b60008060008060408587031215613bef57600080fd5b843567ffffffffffffffff80821115613c0757600080fd5b613c1388838901613b94565b90965094506020870135915080821115613c2c57600080fd5b50613c3987828801613b94565b95989497509550505050565b600080600080600060808688031215613c5d57600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff80821115613c8a57600080fd5b818801915088601f830112613c9e57600080fd5b813581811115613cad57600080fd5b896020828501011115613cbf57600080fd5b9699959850939650602001949392505050565b60008060408385031215613ce557600080fd5b8235613cf0816139ba565b91506020830135613d0081613aeb565b809150509250929050565b600067ffffffffffffffff821115613d2557613d25613a7b565b50601f01601f191660200190565b60008060008060808587031215613d4957600080fd5b8435613d54816139ba565b93506020850135613d64816139ba565b925060408501359150606085013567ffffffffffffffff811115613d8757600080fd5b8501601f81018713613d9857600080fd5b8035613dab613da682613d0b565b613aba565b818152886020838501011115613dc057600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215613df557600080fd5b8235613e00816139ba565b91506020830135613d00816139ba565b600060208284031215613e2257600080fd5b81356111ac81613aeb565b600181811c90821680613e4157607f821691505b602082108114156118ee57634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613f1857613f18613ee8565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613f4257613f42613f1d565b500490565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b600082821015613f8357613f83613ee8565b500390565b634e487b7160e01b600052600160045260246000fd5b60208082526021908201527f455243373231436f6d6d6f6e3a20546f6b656e20646f65736e277420657869736040820152601d60fa1b606082015260800190565b600060208284031215613ff157600080fd5b815167ffffffffffffffff81111561400857600080fd5b8201601f8101841361401957600080fd5b8051614027613da682613d0b565b81815285602083850101111561403c57600080fd5b612806826020830160208601613936565b6000821982111561406057614060613ee8565b500190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561408d57600080fd5b81516111ac816139ba565b60006000198214156140ac576140ac613ee8565b5060010190565b6d029b2b63632b91d1021b7b9ba39960951b8152600082516140dc81600e850160208701613936565b64204757656960d81b600e939091019283015250601301919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161415c818460208801613936565b9190910191825250602001919050565b634e487b7160e01b600052603160045260246000fd5b60008351614194818460208801613936565b600160fd1b90830190815283516141b2816001840160208801613936565b01600101949350505050565b67029b2b63632b91d160c51b8152600082516141e1816008850160208701613936565b9190910160080192915050565b6000826141fd576141fd613f1d565b500690565b60008251614214818460208701613936565b9190910192915050565b60006020828403121561423057600080fd5b81516111ac81613aeb565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061210e90830184613962565b60006020828403121561428057600080fd5b81516111ac81613903565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516142c381601a850160208801613936565b8351908301906142da81601a840160208801613936565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe45524337323152656465656d65723a206e6f7420617070726f766564206e6f72206f776e6572206f6645524337323152656465656d65723a206f76657220616c6c6f77616e636520666f72a26469706673582212200d95baee1b5e229bb31530e91708cee8aaed6e187d578914d4bf09b99808a71464736f6c634300080b00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572000000000000000000000000d119e58b5761932a39c0d15103539b5dfec2386500000000000000000000000047ccad36ae77ab963746c8db8ad301d48235ce81000000000000000000000000d31fc221d2b0e0321c43e9f6824b26ebfff01d7d
Deployed Bytecode
0x6080604052600436106103505760003560e01c806376997548116101c6578063a945bf80116100f7578063d6c878c511610095578063ec9e1c331161006f578063ec9e1c3314610a19578063f0503e8014610a39578063f2fde38b14610a66578063f7d9757714610a8657600080fd5b8063d6c878c5146109b9578063e985e9c5146109d9578063eb12d61e146109f957600080fd5b8063bf62e21d116100d1578063bf62e21d14610925578063c4ec98cc14610945578063c87b56dd14610965578063cc70813b1461098557600080fd5b8063a945bf8014610864578063b88d4fde1461087a578063bb69b7ef1461089a57600080fd5b80639560a90e116101645780639f93f7791161013e5780639f93f779146107dc578063a22cb465146107ef578063a3246b8d1461080f578063a52526991461084357600080fd5b80639560a90e1461079c57806395d89b41146107b25780639c8a2bfd146107c757600080fd5b8063891c77ec116101a0578063891c77ec1461072f5780638ada6b0f146107445780638da5cb5b146107695780639106d7ba1461078757600080fd5b806376997548146106e7578063774a2f6f146106fa5780638456cb591461071a57600080fd5b806338af3eed116102a05780635a0284001161023e5780636352211e116102185780636352211e146106725780636e6ca9581461069257806370a08231146106b2578063715018a6146106d257600080fd5b80635a028400146106025780635c975abb146106325780636094a0701461065157600080fd5b806342260b5d1161027a57806342260b5d1461059257806342842e0e146105a8578063551ba053146105c857806356d3163d146105e257600080fd5b806338af3eed1461053d5780633ec02e141461055d5780633f4ba83a1461057d57600080fd5b806318160ddd1161030d5780632a55205a116102e75780632a55205a146104ab5780632b80183f146104ea5780632f274bd41461050a578063368412ee1461052a57600080fd5b806318160ddd146104465780631c31f7101461046b57806323b872dd1461048b57600080fd5b806301ffc9a71461035557806306fdde031461038a578063081812fc146103ac578063095ea7b3146103e45780630e316ab71461040657806313e7c1d514610426575b600080fd5b34801561036157600080fd5b50610375610370366004613919565b610aa6565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b5061039f610ad1565b604051610381919061398e565b3480156103b857600080fd5b506103cc6103c73660046139a1565b610b63565b6040516001600160a01b039091168152602001610381565b3480156103f057600080fd5b506104046103ff3660046139cf565b610bfd565b005b34801561041257600080fd5b506104046104213660046139fb565b610d13565b34801561043257600080fd5b506104046104413660046139fb565b610d4c565b34801561045257600080fd5b5060195461045d9081565b604051908152602001610381565b34801561047757600080fd5b506104046104863660046139fb565b610d98565b34801561049757600080fd5b506104046104a6366004613a18565b610de4565b3480156104b757600080fd5b506104cb6104c6366004613a59565b610e15565b604080516001600160a01b039093168352602083019190915201610381565b3480156104f657600080fd5b506104046105053660046139a1565b610e50565b34801561051657600080fd5b50610404610525366004613b09565b610eb9565b610404610538366004613bd9565b6110a7565b34801561054957600080fd5b50600d546103cc906001600160a01b031681565b34801561056957600080fd5b5061045d610578366004613a59565b6111a0565b34801561058957600080fd5b506104046111b3565b34801561059e57600080fd5b5061045d601c5481565b3480156105b457600080fd5b506104046105c3366004613a18565b6111e7565b3480156105d457600080fd5b50601b546103759060ff1681565b3480156105ee57600080fd5b506104046105fd3660046139fb565b611202565b34801561060e57600080fd5b5061037561061d3660046139a1565b60186020526000908152604090205460ff1681565b34801561063e57600080fd5b50600654600160a01b900460ff16610375565b34801561065d57600080fd5b50601b5461037590600160a81b900460ff1681565b34801561067e57600080fd5b506103cc61068d3660046139a1565b6112a0565b34801561069e57600080fd5b506013546103cc906001600160a01b031681565b3480156106be57600080fd5b5061045d6106cd3660046139fb565b611317565b3480156106de57600080fd5b5061040461139e565b6104046106f5366004613c45565b6113d2565b34801561070657600080fd5b5061045d6107153660046139a1565b611437565b34801561072657600080fd5b50610404611467565b34801561073b57600080fd5b50610404611499565b34801561075057600080fd5b50601b546103cc9061010090046001600160a01b031681565b34801561077557600080fd5b506006546001600160a01b03166103cc565b34801561079357600080fd5b5061045d6114d2565b3480156107a857600080fd5b5061045d60125481565b3480156107be57600080fd5b5061039f6114e2565b3480156107d357600080fd5b506104046114f1565b6104046107ea3660046139cf565b611592565b3480156107fb57600080fd5b5061040461080a366004613cd2565b6115f1565b34801561081b57600080fd5b506103cc7f000000000000000000000000d31fc221d2b0e0321c43e9f6824b26ebfff01d7d81565b34801561084f57600080fd5b5060135461037590600160a01b900460ff1681565b34801561087057600080fd5b5061045d60115481565b34801561088657600080fd5b50610404610895366004613d33565b6115fc565b3480156108a657600080fd5b50600854600954600a54600b54600c546108e2949392916001600160f81b0381169160ff600160f81b9092048216918181169161010090041687565b604080519788526020880196909652948601939093526001600160f81b03909116606085015215156080840152151560a0830152151560c082015260e001610381565b34801561093157600080fd5b506104046109403660046139cf565b61162e565b34801561095157600080fd5b5061045d6109603660046139a1565b6117a3565b34801561097157600080fd5b5061039f6109803660046139a1565b6117d3565b34801561099157600080fd5b506103cc7f00000000000000000000000047ccad36ae77ab963746c8db8ad301d48235ce8181565b3480156109c557600080fd5b506104046109d43660046139a1565b6118f4565b3480156109e557600080fd5b506103756109f4366004613de2565b6119d3565b348015610a0557600080fd5b50610404610a143660046139fb565b611a0e565b348015610a2557600080fd5b50610404610a34366004613e10565b611a43565b348015610a4557600080fd5b5061045d610a543660046139a1565b601a6020526000908152604090205481565b348015610a7257600080fd5b50610404610a813660046139fb565b611a8b565b348015610a9257600080fd5b50610404610aa1366004613a59565b611b26565b60006001600160e01b0319821663152a902d60e11b1480610acb5750610acb82611b5f565b92915050565b606060008054610ae090613e2d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0c90613e2d565b8015610b595780601f10610b2e57610100808354040283529160200191610b59565b820191906000526020600020905b815481529060010190602001808311610b3c57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610be15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c08826112a0565b9050806001600160a01b0316836001600160a01b03161415610c765760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bd8565b336001600160a01b0382161480610c925750610c9281336119d3565b610d045760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bd8565b610d0e8383611b6a565b505050565b6006546001600160a01b03163314610d3d5760405162461bcd60e51b8152600401610bd890613e62565b610d48601682611bd8565b5050565b6006546001600160a01b03163314610d765760405162461bcd60e51b8152600401610bd890613e62565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314610dc25760405162461bcd60e51b8152600401610bd890613e62565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b610dee3382611bed565b610e0a5760405162461bcd60e51b8152600401610bd890613e97565b610d0e838383611cc4565b600d54601c5460009182916001600160a01b039091169061271090610e3a9086613efe565b610e449190613f33565b915091505b9250929050565b6006546001600160a01b03163314610e7a5760405162461bcd60e51b8152600401610bd890613e62565b612710811115610eb45760405162461bcd60e51b81526020600482015260056024820152643e3130302560d81b6044820152606401610bd8565b601c55565b6006546001600160a01b03163314610ee35760405162461bcd60e51b8152600401610bd890613e62565b80606001516001600160f81b031681600001511015610f445760405162461bcd60e51b815260206004820152601c60248201527f53656c6c65723a2065786365737369766520667265652071756f7461000000006044820152606401610bd8565b600e5481511015610f975760405162461bcd60e51b815260206004820181905260248201527f53656c6c65723a20696e76656e746f7279203c20616c726561647920736f6c646044820152606401610bd8565b60105481606001516001600160f81b031610156110005760405162461bcd60e51b815260206004820152602160248201527f53656c6c65723a20667265652071756f7461203c20616c7265616479207573656044820152601960fa1b6064820152608401610bd8565b600c54610100900460ff161561101d57600160c082015260085481525b600c5460ff161561104157600160a0820152600b546001600160f81b031660608201525b805160085560208101516009556040810151600a55606081015160808201511515600160f81b026001600160f81b0390911617600b5560a0810151600c805460c09093015115156101000261ff00199215159290921661ffff1990931692909217179055565b601354600160a01b900460ff166111005760405162461bcd60e51b815260206004820152601860248201527f436f6c6c6563746f72206d696e74696e6720636c6f73656400000000000000006044820152606401610bd8565b821561115e576111593361113a60146001837f00000000000000000000000047ccad36ae77ab963746c8db8ad301d48235ce818a8a611e6f565b611145906002613efe565b60026012546111549190613f33565b612118565b61119a565b61119a3361119260156001837f000000000000000000000000d31fc221d2b0e0321c43e9f6824b26ebfff01d7d8888611e6f565b601254612118565b50505050565b60006111ac8284613efe565b9392505050565b6006546001600160a01b031633146111dd5760405162461bcd60e51b8152600401610bd890613e62565b6111e56125f6565b565b610d0e838383604051806020016040528060008152506115fc565b6006546001600160a01b0316331461122c5760405162461bcd60e51b8152600401610bd890613e62565b601b54600160a81b900460ff16156112785760405162461bcd60e51b815260206004820152600f60248201526e14995b99195c995c881b1bd8dad959608a1b6044820152606401610bd8565b601b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6000818152600260205260408120546001600160a01b031680610acb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bd8565b60006001600160a01b0382166113825760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bd8565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146113c85760405162461bcd60e51b8152600401610bd890613e62565b6111e56000612693565b6040516bffffffffffffffffffffffff193360601b1660208201526034810186905260548101859052607481018490526114259060940160408051601f19818403018152919052601690848460186126e5565b611430338686612118565b5050505050565b6000610acb7f00000000000000000000000047ccad36ae77ab963746c8db8ad301d48235ce81601460018561278e565b6006546001600160a01b031633146114915760405162461bcd60e51b8152600401610bd890613e62565b6111e561280f565b6006546001600160a01b031633146114c35760405162461bcd60e51b8152600401610bd890613e62565b601b805460ff19166001179055565b60006114dd600e5490565b905090565b606060018054610ae090613e2d565b6006546001600160a01b0316331461151b5760405162461bcd60e51b8152600401610bd890613e62565b601b5461153d9061010090046001600160a01b0316630e94d5cf60e21b612874565b61157d5760405162461bcd60e51b81526020600482015260116024820152702737ba1024a5b4b9b9a932b73232b932b960791b6044820152606401610bd8565b601b805460ff60a81b1916600160a81b179055565b6013546001600160a01b031633146115e45760405162461bcd60e51b8152602060048201526015602482015274446972656374207075626c6963206d696e74696e6760581b6044820152606401610bd8565b610d488282601154612118565b610d48338383612890565b6116063383611bed565b6116225760405162461bcd60e51b8152600401610bd890613e97565b61119a8484848461295f565b6006546001600160a01b031633146116585760405162461bcd60e51b8152600401610bd890613e62565b600654600160a01b900460ff16156116825760405162461bcd60e51b8152600401610bd890613f47565b600b546001600160f81b03166116aa8261169b60105490565b6116a59084613f71565b612992565b9150600082116116fc5760405162461bcd60e51b815260206004820152601b60248201527f53656c6c65723a20467265652071756f746120657863656564656400000000006044820152606401610bd8565b60085461170c8361169b600e5490565b9250600083116117515760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b6044820152606401610bd8565b61175d848460016129a8565b611768600e84612a74565b611773601084612a74565b8061177d600e5490565b111561178b5761178b613f88565b8161179560105490565b111561119a5761119a613f88565b6000610acb7f000000000000000000000000d31fc221d2b0e0321c43e9f6824b26ebfff01d7d601560018561278e565b6060816117f7816000908152600260205260409020546001600160a01b0316151590565b6118135760405162461bcd60e51b8152600401610bd890613f9e565b601b5461010090046001600160a01b031661185e5760405162461bcd60e51b815260206004820152600b60248201526a2737903932b73232b932b960a91b6044820152606401610bd8565b601b546000848152601a602052604090819020549051631ecf701b60e31b81526004810186905260248101919091526101009091046001600160a01b03169063f67b80d890604401600060405180830381865afa1580156118c3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118eb9190810190613fdf565b91505b50919050565b60008181526002602052604090205481906001600160a01b031661192a5760405162461bcd60e51b8152600401610bd890613f9e565b6006546001600160a01b031633146119545760405162461bcd60e51b8152600401610bd890613e62565b601b5460ff16156119965760405162461bcd60e51b815260206004820152600c60248201526b14d959591cc81b1bd8dad95960a21b6044820152606401610bd8565b506000818152601a602081815260408084208054825180850191909152825180820385018152908301909252815191830191909120949093525255565b6001600160a01b03808316600090815260056020908152604080832093851683529290529081205460ff16806111ac57506111ac8383612a91565b6006546001600160a01b03163314611a385760405162461bcd60e51b8152600401610bd890613e62565b610d48601682612ad0565b6006546001600160a01b03163314611a6d5760405162461bcd60e51b8152600401610bd890613e62565b60138054911515600160a01b0260ff60a01b19909216919091179055565b6006546001600160a01b03163314611ab55760405162461bcd60e51b8152600401610bd890613e62565b6001600160a01b038116611b1a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bd8565b611b2381612693565b50565b6006546001600160a01b03163314611b505760405162461bcd60e51b8152600401610bd890613e62565b601191909155601255565b5490565b6000610acb82612ae5565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611b9f826112a0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006111ac836001600160a01b038416612b35565b6000818152600260205260408120546001600160a01b0316611c665760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bd8565b6000611c71836112a0565b9050806001600160a01b0316846001600160a01b03161480611cac5750836001600160a01b0316611ca184610b63565b6001600160a01b0316145b80611cbc5750611cbc81856119d3565b949350505050565b826001600160a01b0316611cd7826112a0565b6001600160a01b031614611d3f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610bd8565b6001600160a01b038216611da15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bd8565b611dac838383612c28565b611db7600082611b6a565b6001600160a01b0383166000908152600360205260408120805460019290611de0908490613f71565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e0e90849061404d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000851580611e7c575081155b15611e895750600061210e565b6001861160005b83811015612108576000858583818110611eac57611eac614065565b905060200201359050876001600160a01b0316876001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401611eed91815260200190565b602060405180830381865afa158015611f0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2e919061407b565b6001600160a01b031614158015611fba575060405163020604bf60e21b8152600481018290526001600160a01b03808a16919089169063081812fc90602401602060405180830381865afa158015611f8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fae919061407b565b6001600160a01b031614155b15611fe157611fe16040518060600160405280602981526020016142fd6029913982612c33565b60018315612044576000611ff684600161404d565b90505b868110801561201f57508288888381811061201657612016614065565b90506020020135145b15612036578061202e81614098565b915050611ff9565b6120408482613f71565b9150505b600082815260208c905260408120805483929061206290849061404d565b9091555050600082815260208c905260409020548a101561209f5761209f6040518060600160405280602281526020016143266022913983612c33565b6120a9818461404d565b9250886001600160a01b0316886001600160a01b03167fa28d80c9910787c0c058ed9b50c577f1389264bf61563fa45529e0771976f56284846040516120f9929190918252602082015260400190565b60405180910390a35050611e90565b50829150505b9695505050505050565b6002600754141561216b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bd8565b6002600755600654600160a01b900460ff161561219a5760405162461bcd60e51b8152600401610bd890613f47565b6040805160e08101825260085481526009546020820152600a54918101829052600b546001600160f81b038116606083015260ff600160f81b909104811615156080830152600c54808216151560a0840152610100900416151560c0820152906000901561221557612210848360400151612992565b612217565b835b905060008083608001511561225f5760608401518451612240916001600160f81b031690613f71565b915061224b60105490565b600e546122589190613f71565b905061226f565b8351915061226c600e5490565b90505b61227d836116a58385613f71565b9250600083116122c25760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b6044820152606401610bd8565b60208401511561241e57336001600160a01b0388168114159060009032148015906122f65750326001600160a01b038a1614155b9050612326858a6040518060400160405280600b81526020016a109d5e595c881b1a5b5a5d60aa1b815250612c4e565b945081156123605761235d85336040518060400160405280600c81526020016b14d95b99195c881b1a5b5a5d60a21b815250612c4e565b94505b80156123985761239585326040518060400160405280600c81526020016b13dc9a59da5b881b1a5b5a5d60a21b815250612c4e565b94505b6001600160a01b0389166000908152600f6020526040812080548792906123c090849061404d565b909155505081156123f057336000908152600f6020526040812080548792906123ea90849061404d565b90915550505b801561241b57326000908152600f60205260408120805487929061241590849061404d565b90915550505b50505b600061242a84876111a0565b9050803410156124805761244a612445633b9aca0083613f33565b612c97565b60405160200161245a91906140b3565b60408051601f198184030181529082905262461bcd60e51b8252610bd89160040161398e565b61248c888560006129a8565b612497600e85612a74565b8451600e5411156124aa576124aa613f88565b801561250f57600d546124c6906001600160a01b031682612d95565b600d5460408051868152602081018490526001600160a01b03909216917f01f51b99bd1c3cca301836178e5dee13aadfe44eff06dc3ddcbf3c9d058454f8910160405180910390a25b803411156125e7573360006125248334613f71565b9050600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114612574576040519150601f19603f3d011682016040523d82523d6000602084013e612579565b606091505b509150915081819061259e5760405162461bcd60e51b8152600401610bd8919061398e565b50836001600160a01b03167fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d846040516125da91815260200190565b60405180910390a2505050505b50506001600755505050505050565b600654600160a01b900460ff166126465760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610bd8565b6006805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006126f085612eae565b60008181526020849052604090205490915060ff16156127615760405162461bcd60e51b815260206004820152602660248201527f5369676e6174757265436865636b65723a204d65737361676520616c726561646044820152651e481d5cd95960d21b6064820152608401610bd8565b6000818152602083905260409020805460ff1916600117905561278686828686612eb9565b505050505050565b6040516331a9108f60e11b8152600481018290526000906001600160a01b03861690636352211e90602401602060405180830381865afa1580156127d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127fa919061407b565b50612806848484612f1d565b95945050505050565b600654600160a01b900460ff16156128395760405162461bcd60e51b8152600401610bd890613f47565b6006805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126763390565b600061287f83612f36565b80156111ac57506111ac8383612f69565b816001600160a01b0316836001600160a01b031614156128f25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bd8565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61296a848484611cc4565b61297684848484613048565b61119a5760405162461bcd60e51b8152600401610bd8906140f8565b60008183106129a157816111ac565b5090919050565b60006129b360195490565b905060006129c1848361404d565b6040516bffffffffffffffffffffffff1930606090811b8216602084015241811b8216603484015243604884015288901b166068820152909150600090607c0160405160208183030381529060405290505b81831015612a6d57612a258684613143565b8083604051602001612a3892919061414a565b60408051601f1981840301815291815281516020928301206000868152601a909352912055612a6683614098565b9250612a13565b6127866019865b80826000016000828254612a88919061404d565b90915550505050565b600080612a9d8461315d565b90506001600160a01b03811615801590611cbc5750826001600160a01b0316816001600160a01b03161491505092915050565b60006111ac836001600160a01b0384166132b4565b60006001600160e01b031982166380ac58cd60e01b1480612b1657506001600160e01b03198216635b5e139f60e01b145b80610acb57506301ffc9a760e01b6001600160e01b0319831614610acb565b60008181526001830160205260408120548015612c1e576000612b59600183613f71565b8554909150600090612b6d90600190613f71565b9050818114612bd2576000866000018281548110612b8d57612b8d614065565b9060005260206000200154905080876000018481548110612bb057612bb0614065565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612be357612be361416c565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610acb565b6000915050610acb565b610d0e838383613303565b81612c3d82612c97565b60405160200161245a929190614182565b6001600160a01b0382166000908152600f60205260408120546009548291612c7591613f71565b905080612c8d578260405160200161245a91906141be565b6128068582612992565b606081612cbb5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ce55780612ccf81614098565b9150612cde9050600a83613f33565b9150612cbf565b60008167ffffffffffffffff811115612d0057612d00613a7b565b6040519080825280601f01601f191660200182016040528015612d2a576020820181803683370190505b5090505b8415611cbc57612d3f600183613f71565b9150612d4c600a866141ee565b612d5790603061404d565b60f81b818381518110612d6c57612d6c614065565b60200101906001600160f81b031916908160001a905350612d8e600a86613f33565b9450612d2e565b80471015612de55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bd8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612e32576040519150601f19603f3d011682016040523d82523d6000602084013e612e37565b606091505b5050905080610d0e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bd8565b6000610acb82613371565b612ec5848484846133ac565b61119a5760405162461bcd60e51b815260206004820152602360248201527f5369676e6174757265436865636b65723a20496e76616c6964207369676e617460448201526275726560e81b6064820152608401610bd8565b600081815260208490526040812054611cbc9084613f71565b6000612f49826301ffc9a760e01b612f69565b8015610acb5750612f62826001600160e01b0319612f69565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090612fd0908690614202565b6000604051808303818686fa925050503d806000811461300c576040519150601f19603f3d011682016040523d82523d6000602084013e613011565b606091505b509150915060208151101561302c5760009350505050610acb565b81801561210e57508080602001905181019061210e919061421e565b60006001600160a01b0384163b1561313b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061308c90339089908890889060040161423b565b6020604051808303816000875af19250505080156130c7575060408051601f3d908101601f191682019092526130c49181019061426e565b60015b613121573d8080156130f5576040519150601f19603f3d011682016040523d82523d6000602084013e6130fa565b606091505b5080516131195760405162461bcd60e51b8152600401610bd8906140f8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cbc565b506001611cbc565b610d488282604051806020016040528060008152506133f8565b60008046806001811461319257608981146131ae57600481146131ca576201388181146131e65761053981146132025761321a565b73a5409ec958c83c3f309868babaca7c86dcb077c1925061321a565b7358807bad0b376efc12f5ad86aac70e78ed67deae925061321a565b73f57b2c51ded3a29e6891aba85459d600256cf317925061321a565b73ff7ca10af37178bdd056628ef42fd7f799fac77c925061321a565b73e1a2bbc877b29adbc56d2659dbcb0ae14ee6207192505b506001600160a01b03821615806132315750806089145b8061323e57508062013881145b1561324a575092915050565b60405163c455279160e01b81526001600160a01b03858116600483015283169063c455279190602401602060405180830381865afa158015613290573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cbc919061407b565b60008181526001830160205260408120546132fb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610acb565b506000610acb565b600654600160a01b900460ff1615610d0e5760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610bd8565b600061337d8251612c97565b8260405160200161338f92919061428b565b604051602081830303815290604052805190602001209050919050565b60006128066133f18585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061342b92505050565b869061344f565b6134028383613471565b61340f6000848484613048565b610d0e5760405162461bcd60e51b8152600401610bd8906140f8565b600080600061343a85856135bf565b915091506134478161362c565b509392505050565b6001600160a01b038116600090815260018301602052604081205415156111ac565b6001600160a01b0382166134c75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bd8565b6000818152600260205260409020546001600160a01b03161561352c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bd8565b61353860008383612c28565b6001600160a01b038216600090815260036020526040812080546001929061356190849061404d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000808251604114156135f65760208301516040840151606085015160001a6135ea878285856137e7565b94509450505050610e49565b82516040141561362057602083015160408401516136158683836138d4565b935093505050610e49565b50600090506002610e49565b6000816004811115613640576136406142e6565b14156136495750565b600181600481111561365d5761365d6142e6565b14156136ab5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610bd8565b60028160048111156136bf576136bf6142e6565b141561370d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610bd8565b6003816004811115613721576137216142e6565b141561377a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610bd8565b600481600481111561378e5761378e6142e6565b1415611b235760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610bd8565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561381e57506000905060036138cb565b8460ff16601b1415801561383657508460ff16601c14155b1561384757506000905060046138cb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561389b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166138c4576000600192509250506138cb565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016138f5878288856137e7565b935093505050935093915050565b6001600160e01b031981168114611b2357600080fd5b60006020828403121561392b57600080fd5b81356111ac81613903565b60005b83811015613951578181015183820152602001613939565b8381111561119a5750506000910152565b6000815180845261397a816020860160208601613936565b601f01601f19169290920160200192915050565b6020815260006111ac6020830184613962565b6000602082840312156139b357600080fd5b5035919050565b6001600160a01b0381168114611b2357600080fd5b600080604083850312156139e257600080fd5b82356139ed816139ba565b946020939093013593505050565b600060208284031215613a0d57600080fd5b81356111ac816139ba565b600080600060608486031215613a2d57600080fd5b8335613a38816139ba565b92506020840135613a48816139ba565b929592945050506040919091013590565b60008060408385031215613a6c57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715613ab457613ab4613a7b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613ae357613ae3613a7b565b604052919050565b8015158114611b2357600080fd5b8035613b0481613aeb565b919050565b600060e08284031215613b1b57600080fd5b613b23613a91565b82358152602080840135908201526040808401359082015260608301356001600160f81b0381168114613b5557600080fd5b6060820152613b6660808401613af9565b6080820152613b7760a08401613af9565b60a0820152613b8860c08401613af9565b60c08201529392505050565b60008083601f840112613ba657600080fd5b50813567ffffffffffffffff811115613bbe57600080fd5b6020830191508360208260051b8501011115610e4957600080fd5b60008060008060408587031215613bef57600080fd5b843567ffffffffffffffff80821115613c0757600080fd5b613c1388838901613b94565b90965094506020870135915080821115613c2c57600080fd5b50613c3987828801613b94565b95989497509550505050565b600080600080600060808688031215613c5d57600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff80821115613c8a57600080fd5b818801915088601f830112613c9e57600080fd5b813581811115613cad57600080fd5b896020828501011115613cbf57600080fd5b9699959850939650602001949392505050565b60008060408385031215613ce557600080fd5b8235613cf0816139ba565b91506020830135613d0081613aeb565b809150509250929050565b600067ffffffffffffffff821115613d2557613d25613a7b565b50601f01601f191660200190565b60008060008060808587031215613d4957600080fd5b8435613d54816139ba565b93506020850135613d64816139ba565b925060408501359150606085013567ffffffffffffffff811115613d8757600080fd5b8501601f81018713613d9857600080fd5b8035613dab613da682613d0b565b613aba565b818152886020838501011115613dc057600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215613df557600080fd5b8235613e00816139ba565b91506020830135613d00816139ba565b600060208284031215613e2257600080fd5b81356111ac81613aeb565b600181811c90821680613e4157607f821691505b602082108114156118ee57634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613f1857613f18613ee8565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613f4257613f42613f1d565b500490565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b600082821015613f8357613f83613ee8565b500390565b634e487b7160e01b600052600160045260246000fd5b60208082526021908201527f455243373231436f6d6d6f6e3a20546f6b656e20646f65736e277420657869736040820152601d60fa1b606082015260800190565b600060208284031215613ff157600080fd5b815167ffffffffffffffff81111561400857600080fd5b8201601f8101841361401957600080fd5b8051614027613da682613d0b565b81815285602083850101111561403c57600080fd5b612806826020830160208601613936565b6000821982111561406057614060613ee8565b500190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561408d57600080fd5b81516111ac816139ba565b60006000198214156140ac576140ac613ee8565b5060010190565b6d029b2b63632b91d1021b7b9ba39960951b8152600082516140dc81600e850160208701613936565b64204757656960d81b600e939091019283015250601301919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161415c818460208801613936565b9190910191825250602001919050565b634e487b7160e01b600052603160045260246000fd5b60008351614194818460208801613936565b600160fd1b90830190815283516141b2816001840160208801613936565b01600101949350505050565b67029b2b63632b91d160c51b8152600082516141e1816008850160208701613936565b9190910160080192915050565b6000826141fd576141fd613f1d565b500690565b60008251614214818460208701613936565b9190910192915050565b60006020828403121561423057600080fd5b81516111ac81613aeb565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061210e90830184613962565b60006020828403121561428057600080fd5b81516111ac81613903565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516142c381601a850160208801613936565b8351908301906142da81601a840160208801613936565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe45524337323152656465656d65723a206e6f7420617070726f766564206e6f72206f776e6572206f6645524337323152656465656d65723a206f76657220616c6c6f77616e636520666f72a26469706673582212200d95baee1b5e229bb31530e91708cee8aaed6e187d578914d4bf09b99808a71464736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d119e58b5761932a39c0d15103539b5dfec2386500000000000000000000000047ccad36ae77ab963746c8db8ad301d48235ce81000000000000000000000000d31fc221d2b0e0321c43e9f6824b26ebfff01d7d
-----Decoded View---------------
Arg [0] : _renderer (address): 0xD119E58b5761932A39C0D15103539b5DfEc23865
Arg [1] : _poaw (address): 0x47CcAD36Ae77aB963746c8Db8aD301d48235cE81
Arg [2] : _brotchain (address): 0xd31fC221D2b0E0321C43E9F6824b26ebfFf01D7D
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d119e58b5761932a39c0d15103539b5dfec23865
Arg [1] : 00000000000000000000000047ccad36ae77ab963746c8db8ad301d48235ce81
Arg [2] : 000000000000000000000000d31fc221d2b0e0321c43e9f6824b26ebfff01d7d
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.