Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 6,926 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 21256817 | 2 days ago | IN | 0 ETH | 0.00042552 | ||||
Set Approval For... | 21256085 | 2 days ago | IN | 0 ETH | 0.00016806 | ||||
Set Approval For... | 21254363 | 2 days ago | IN | 0 ETH | 0.00051777 | ||||
Set Approval For... | 21241246 | 4 days ago | IN | 0 ETH | 0.00024275 | ||||
Safe Transfer Fr... | 21225367 | 7 days ago | IN | 0 ETH | 0.00073052 | ||||
Set Approval For... | 21223926 | 7 days ago | IN | 0 ETH | 0.00097761 | ||||
Safe Transfer Fr... | 21209487 | 9 days ago | IN | 0 ETH | 0.00077087 | ||||
Set Approval For... | 21209068 | 9 days ago | IN | 0 ETH | 0.00060793 | ||||
Safe Transfer Fr... | 21203292 | 10 days ago | IN | 0 ETH | 0.00050814 | ||||
Safe Transfer Fr... | 21203287 | 10 days ago | IN | 0 ETH | 0.00058138 | ||||
Safe Transfer Fr... | 21203283 | 10 days ago | IN | 0 ETH | 0.00058843 | ||||
Safe Transfer Fr... | 21203279 | 10 days ago | IN | 0 ETH | 0.0006129 | ||||
Safe Transfer Fr... | 21203272 | 10 days ago | IN | 0 ETH | 0.000769 | ||||
Set Approval For... | 21192309 | 11 days ago | IN | 0 ETH | 0.00065828 | ||||
Set Approval For... | 21189868 | 11 days ago | IN | 0 ETH | 0.00085954 | ||||
Set Approval For... | 21185857 | 12 days ago | IN | 0 ETH | 0.00117986 | ||||
Set Approval For... | 21183695 | 12 days ago | IN | 0 ETH | 0.00117998 | ||||
Set Approval For... | 21182689 | 12 days ago | IN | 0 ETH | 0.00123653 | ||||
Set Approval For... | 21179017 | 13 days ago | IN | 0 ETH | 0.00160825 | ||||
Set Approval For... | 21178523 | 13 days ago | IN | 0 ETH | 0.00111154 | ||||
Set Approval For... | 21178498 | 13 days ago | IN | 0 ETH | 0.00114183 | ||||
Set Approval For... | 21175306 | 14 days ago | IN | 0 ETH | 0.00112117 | ||||
Set Approval For... | 21175299 | 14 days ago | IN | 0 ETH | 0.00123922 | ||||
Set Approval For... | 21175219 | 14 days ago | IN | 0 ETH | 0.00077796 | ||||
Set Approval For... | 21175078 | 14 days ago | IN | 0 ETH | 0.00107852 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH | ||||
13785825 | 1081 days ago | 1 ETH |
Loading...
Loading
Contract Name:
PROOFCollective
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENCED // Copyright 2021 Arran Schlosberg (@divergencearran) pragma solidity 0.8.10; import "@divergencetech/ethier/contracts/erc721/ERC721Common.sol"; import "@divergencetech/ethier/contracts/sales/LinearDutchAuction.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /// @title PROOF Collective NFT /// @author @divergencearran contract PROOFCollective is ERC721Common, LinearDutchAuction { using Strings for uint256; constructor( string memory name, string memory symbol, address payable beneficiary ) ERC721Common(name, symbol) LinearDutchAuction( LinearDutchAuction.DutchAuctionConfig({ startPoint: 0, // disabled at deployment startPrice: 5 ether, unit: AuctionIntervalUnit.Time, decreaseInterval: 900, // 15 minutes decreaseSize: 0.5 ether, numDecreases: 9 }), 0.5 ether, Seller.SellerConfig({ totalInventory: 1000, lockTotalInventory: true, maxPerAddress: 2, maxPerTx: 1, freeQuota: 75, lockFreeQuota: true, reserveFreeQuota: true }), beneficiary ) {} /// @notice Entry point for purchase of a single token. function buy() external payable { Seller._purchase(msg.sender, 1); } /** @notice Internal override of Seller function for handling purchase (i.e. minting). */ function _handlePurchase( address to, uint256 num, bool ) internal override { for (uint256 i = 0; i < num; i++) { _safeMint(to, totalSold() + i); } } /// @notice Prefix for tokenURI return values. string public baseTokenURI; /// @notice Set the baseTokenURI. function setBaseTokenURI(string memory baseTokenURI_) external onlyOwner { baseTokenURI = baseTokenURI_; } /// @notice Returns the token's metadata URI. function tokenURI(uint256 tokenId) public view override tokenExists(tokenId) returns (string memory) { return string(abi.encodePacked(baseTokenURI, tokenId.toString())); } /** @notice Returns total number of existing tokens. @dev Using ERC721Enumerable is unnecessarily expensive wrt gas. However Etherscan uses totalSupply() so we provide it here. */ function totalSupply() external view returns (uint256) { return totalSold(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (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.0 (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.0 (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.0 (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.0 (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.0 (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.0 (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.0 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `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.0 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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.0 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: 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.0 (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.0 (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.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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; 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. */ function cost(uint256 n) 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 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(). */ function _purchase(address to, uint256 requested) internal nonReentrant whenNotPaused { /** * ##### CHECKS */ SellerConfig memory config = sellerConfig; uint256 n = config.maxPerTx == 0 ? requested : Math.min(requested, config.maxPerTx); uint256 maxAvailable = config.reserveFreeQuota ? config.totalInventory - config.freeQuota : config.totalInventory; n = Math.min(n, maxAvailable - _totalSold.current()); 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); 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) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "./Seller.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; /// @notice A Seller with a linearly decreasing price. abstract contract LinearDutchAuction is Seller { /** @param unit The unit of "time" used for decreasing prices, block number or timestamp. NOTE: See the comment on AuctionIntervalUnit re use of Time as a unit. @param startPoint The block or timestamp at which the auction opens. A value of zero disables the auction. See setAuctionStartPoint(). @param startPrice The price at `startPoint`. @param decreaseInterval The number of units to wait before decreasing the price. MUST be non-zero. @param decreaseSize The amount by which price decreases after every `decreaseInterval`. @param numDecreases The maximum number of price decreases before remaining constant. The reserve price is therefore implicit and equal to startPrice-numDecrease*decreaseSize. */ struct DutchAuctionConfig { uint256 startPoint; uint256 startPrice; uint256 decreaseInterval; uint256 decreaseSize; // From https://docs.soliditylang.org/en/v0.8.10/types.html#enums "Enums // cannot have more than 256 members"; presumably they take 8 bits, so // use some of the numDecreases space instead. uint248 numDecreases; AuctionIntervalUnit unit; } /** @notice The unit of "time" along which the cost decreases. @dev If no value is provided then the zero UNSPECIFIED will trigger an error. NOTE: The Block unit is more reliable as it has an explicit progression (simply incrementing). Miners are allowed to have a time drift into the future although which predisposes to unexpected behaviour by which "future" costs are encountered. See the ConsenSys 15-second rule: https://consensys.net/blog/developers/solidity-best-practices-for-smart-contract-security/ */ enum AuctionIntervalUnit { UNSPECIFIED, Block, Time } /// @param expectedReserve See setAuctionConfig(). constructor( DutchAuctionConfig memory config, uint256 expectedReserve, Seller.SellerConfig memory sellerConfig, address payable _beneficiary ) Seller(sellerConfig, _beneficiary) { setAuctionConfig(config, expectedReserve); } /// @notice Configuration of price changes. DutchAuctionConfig public dutchAuctionConfig; /** @notice Sets the auction config. @param expectedReserve A safety check that the reserve, as calculated from the config, is as expected. */ function setAuctionConfig( DutchAuctionConfig memory config, uint256 expectedReserve ) public onlyOwner { // Underflow might occur is size/num decreases is too large. unchecked { require( config.startPrice - config.decreaseSize * config.numDecreases == expectedReserve, "LinearDutchAuction: incorrect reserve" ); } require( config.unit != AuctionIntervalUnit.UNSPECIFIED, "LinearDutchAuction: unspecified unit" ); require( config.decreaseInterval > 0, "LinearDutchAuction: zero decrease interval" ); dutchAuctionConfig = config; } /** @notice Sets the config startPoint. A startPoint of zero disables the auction. @dev The auction can be toggle on and off with this function, without the cost of having to update the entire config. */ function setAuctionStartPoint(uint256 startPoint) public onlyOwner { dutchAuctionConfig.startPoint = startPoint; } /// @notice Override of Seller.cost() with Dutch-auction logic. function cost(uint256 n) public view override returns (uint256) { DutchAuctionConfig storage cfg = dutchAuctionConfig; uint256 current; if (cfg.unit == AuctionIntervalUnit.Block) { current = block.number; } else if (cfg.unit == AuctionIntervalUnit.Time) { current = block.timestamp; } require( cfg.startPoint != 0 && current >= cfg.startPoint, "LinearDutchAuction: Not started" ); uint256 decreases = Math.min( (current - cfg.startPoint) / cfg.decreaseInterval, cfg.numDecreases ); return n * (cfg.startPrice - decreases * cfg.decreaseSize); } }
// 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/ /// @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) { ProxyRegistry registry; assembly { switch chainid() case 1 { // mainnet registry := 0xa5409ec958c83c3f309868babaca7c86dcb077c1 } case 4 { // rinkeby registry := 0xf57b2c51ded3a29e6891aba85459d600256cf317 } } return address(registry) != address(0) && address(registry.proxies(owner)) == operator; } } contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0 <0.9.0; import "./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); } }
{ "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":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address payable","name":"beneficiary","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":"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":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuctionConfig","outputs":[{"internalType":"uint256","name":"startPoint","type":"uint256"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"decreaseInterval","type":"uint256"},{"internalType":"uint256","name":"decreaseSize","type":"uint256"},{"internalType":"uint248","name":"numDecreases","type":"uint248"},{"internalType":"enum LinearDutchAuction.AuctionIntervalUnit","name":"unit","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"purchaseFreeOfCharge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":[],"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":[{"components":[{"internalType":"uint256","name":"startPoint","type":"uint256"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"decreaseInterval","type":"uint256"},{"internalType":"uint256","name":"decreaseSize","type":"uint256"},{"internalType":"uint248","name":"numDecreases","type":"uint248"},{"internalType":"enum LinearDutchAuction.AuctionIntervalUnit","name":"unit","type":"uint8"}],"internalType":"struct LinearDutchAuction.DutchAuctionConfig","name":"config","type":"tuple"},{"internalType":"uint256","name":"expectedReserve","type":"uint256"}],"name":"setAuctionConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startPoint","type":"uint256"}],"name":"setAuctionStartPoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenURI_","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"}],"name":"setBeneficiary","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":"","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"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620038323803806200383283398101604081905262000034916200080d565b6040805160c08101825260008152674563918244f400006020820152610384918101919091526706f05b59d3b2000060608201526009608082015260a0810160028152506706f05b59d3b200006040518060e001604052806103e881526020016002815260200160018152602001604b6001600160f81b0316815260200160011515815260200160011515815260200160011515815250838181888881818160009080519060200190620000ea9291906200069a565b508051620001009060019060208401906200069a565b5050506200011d620001176200016360201b60201c565b62000167565b50506006805460ff60a01b1916905560016007556200013c82620001b9565b6200014781620003fc565b50620001569050848462000469565b50505050505050620008ed565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6006546001600160a01b03163314620002085760405162461bcd60e51b815260206004820181905260248201526000805160206200381283398151915260448201526064015b60405180910390fd5b80606001516001600160f81b0316816000015110156200026b5760405162461bcd60e51b815260206004820152601c60248201527f53656c6c65723a2065786365737369766520667265652071756f7461000000006044820152606401620001ff565b62000282600e6200069660201b620014761760201c565b81511015620002d45760405162461bcd60e51b815260206004820181905260248201527f53656c6c65723a20696e76656e746f7279203c20616c726561647920736f6c646044820152606401620001ff565b620002eb60106200069660201b620014761760201c565b81606001516001600160f81b03161015620003535760405162461bcd60e51b815260206004820152602160248201527f53656c6c65723a20667265652071756f7461203c20616c7265616479207573656044820152601960fa1b6064820152608401620001ff565b600c54610100900460ff16156200037157600160c082015260085481525b600c5460ff16156200039657600160a0820152600b546001600160f81b031660608201525b805160085560208101516009556040810151600a55606081015160808201511515600160f81b026001600160f81b0390911617600b5560a0810151600c805460c09093015115156101000261ff00199215159290921661ffff1990931692909217179055565b6006546001600160a01b03163314620004475760405162461bcd60e51b81526020600482018190526024820152600080516020620038128339815191526044820152606401620001ff565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6006546001600160a01b03163314620004b45760405162461bcd60e51b81526020600482018190526024820152600080516020620038128339815191526044820152606401620001ff565b8082608001516001600160f81b0316836060015102836020015103146200052c5760405162461bcd60e51b815260206004820152602560248201527f4c696e656172447574636841756374696f6e3a20696e636f7272656374207265604482015264736572766560d81b6064820152608401620001ff565b60008260a0015160028111156200054757620005476200089a565b1415620005a35760405162461bcd60e51b8152602060048201526024808201527f4c696e656172447574636841756374696f6e3a20756e737065636966696564206044820152631d5b9a5d60e21b6064820152608401620001ff565b60008260400151116200060c5760405162461bcd60e51b815260206004820152602a60248201527f4c696e656172447574636841756374696f6e3a207a65726f206465637265617360448201526919481a5b9d195c9d985b60b21b6064820152608401620001ff565b815160119081556020830151601255604083015160135560608301516014556080830151601580547fff00000000000000000000000000000000000000000000000000000000000000166001600160f81b03909216918217815560a0850151859392909190600160f81b8360028111156200068b576200068b6200089a565b021790555050505050565b5490565b828054620006a890620008b0565b90600052602060002090601f016020900481019282620006cc576000855562000717565b82601f10620006e757805160ff191683800117855562000717565b8280016001018555821562000717579182015b8281111562000717578251825591602001919060010190620006fa565b506200072592915062000729565b5090565b5b808211156200072557600081556001016200072a565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200076857600080fd5b81516001600160401b038082111562000785576200078562000740565b604051601f8301601f19908116603f01168101908282118183101715620007b057620007b062000740565b81604052838152602092508683858801011115620007cd57600080fd5b600091505b83821015620007f15785820183015181830184015290820190620007d2565b83821115620008035760008385830101525b9695505050505050565b6000806000606084860312156200082357600080fd5b83516001600160401b03808211156200083b57600080fd5b620008498783880162000756565b945060208601519150808211156200086057600080fd5b506200086f8682870162000756565b604086015190935090506001600160a01b03811681146200088f57600080fd5b809150509250925092565b634e487b7160e01b600052602160045260246000fd5b600181811c90821680620008c557607f821691505b60208210811415620008e757634e487b7160e01b600052602260045260246000fd5b50919050565b612f1580620008fd6000396000f3fe6080604052600436106101ee5760003560e01c80637bd07f8b1161010d578063b88d4fde116100a0578063c87b56dd1161006f578063c87b56dd146105ee578063d547cfb71461060e578063e0c5b0ed14610623578063e985e9c514610643578063f2fde38b1461066357600080fd5b8063b88d4fde14610503578063bb69b7ef14610523578063bf62e21d146105ae578063c85b380d146105ce57600080fd5b80639106d7ba116100dc5780639106d7ba146104b157806395d89b41146104c6578063a22cb465146104db578063a6f2ae3a146104fb57600080fd5b80637bd07f8b146104105780638456cb591461045e5780638da5cb5b146104735780639097548d1461049157600080fd5b806330176e13116101855780635c975abb116101545780635c975abb1461039c5780636352211e146103bb57806370a08231146103db578063715018a6146103fb57600080fd5b806330176e131461032757806338af3eed146103475780633f4ba83a1461036757806342842e0e1461037c57600080fd5b806318160ddd116101c157806318160ddd146102a45780631c31f710146102c757806323b872dd146102e75780632f274bd41461030757600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e366004612631565b610683565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d610694565b60405161021f91906126a6565b34801561025657600080fd5b5061026a6102653660046126b9565b610726565b6040516001600160a01b03909116815260200161021f565b34801561028e57600080fd5b506102a261029d3660046126e7565b6107c0565b005b3480156102b057600080fd5b506102b96108d6565b60405190815260200161021f565b3480156102d357600080fd5b506102a26102e2366004612713565b6108e5565b3480156102f357600080fd5b506102a2610302366004612730565b610931565b34801561031357600080fd5b506102a26103223660046127dc565b610962565b34801561033357600080fd5b506102a26103423660046128ef565b610b50565b34801561035357600080fd5b50600d5461026a906001600160a01b031681565b34801561037357600080fd5b506102a2610b91565b34801561038857600080fd5b506102a2610397366004612730565b610bc5565b3480156103a857600080fd5b50600654600160a01b900460ff16610213565b3480156103c757600080fd5b5061026a6103d63660046126b9565b610be0565b3480156103e757600080fd5b506102b96103f6366004612713565b610c57565b34801561040757600080fd5b506102a2610cde565b34801561041c57600080fd5b5060115460125460135460145460155461044c94939291906001600160f81b03811690600160f81b900460ff1686565b60405161021f9695949392919061294e565b34801561046a57600080fd5b506102a2610d12565b34801561047f57600080fd5b506006546001600160a01b031661026a565b34801561049d57600080fd5b506102b96104ac3660046126b9565b610d44565b3480156104bd57600080fd5b506102b9610e69565b3480156104d257600080fd5b5061023d610e74565b3480156104e757600080fd5b506102a26104f63660046129a8565b610e83565b6102a2610e8e565b34801561050f57600080fd5b506102a261051e3660046129dd565b610e99565b34801561052f57600080fd5b50600854600954600a54600b54600c5461056b949392916001600160f81b0381169160ff600160f81b9092048216918181169161010090041687565b604080519788526020880196909652948601939093526001600160f81b03909116606085015215156080840152151560a0830152151560c082015260e00161021f565b3480156105ba57600080fd5b506102a26105c93660046126e7565b610ed1565b3480156105da57600080fd5b506102a26105e9366004612a5d565b611046565b3480156105fa57600080fd5b5061023d6106093660046126b9565b61122e565b34801561061a57600080fd5b5061023d6112dc565b34801561062f57600080fd5b506102a261063e3660046126b9565b61136a565b34801561064f57600080fd5b5061021361065e366004612ae0565b611399565b34801561066f57600080fd5b506102a261067e366004612713565b6113db565b600061068e8261147a565b92915050565b6060600080546106a390612b19565b80601f01602080910402602001604051908101604052809291908181526020018280546106cf90612b19565b801561071c5780601f106106f15761010080835404028352916020019161071c565b820191906000526020600020905b8154815290600101906020018083116106ff57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166107a45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006107cb82610be0565b9050806001600160a01b0316836001600160a01b031614156108395760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161079b565b336001600160a01b038216148061085557506108558133611399565b6108c75760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161079b565b6108d183836114ca565b505050565b60006108e0610e69565b905090565b6006546001600160a01b0316331461090f5760405162461bcd60e51b815260040161079b90612b4e565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b61093b3382611538565b6109575760405162461bcd60e51b815260040161079b90612b83565b6108d183838361160f565b6006546001600160a01b0316331461098c5760405162461bcd60e51b815260040161079b90612b4e565b80606001516001600160f81b0316816000015110156109ed5760405162461bcd60e51b815260206004820152601c60248201527f53656c6c65723a2065786365737369766520667265652071756f746100000000604482015260640161079b565b600e5481511015610a405760405162461bcd60e51b815260206004820181905260248201527f53656c6c65723a20696e76656e746f7279203c20616c726561647920736f6c64604482015260640161079b565b60105481606001516001600160f81b03161015610aa95760405162461bcd60e51b815260206004820152602160248201527f53656c6c65723a20667265652071756f7461203c20616c7265616479207573656044820152601960fa1b606482015260840161079b565b600c54610100900460ff1615610ac657600160c082015260085481525b600c5460ff1615610aea57600160a0820152600b546001600160f81b031660608201525b805160085560208101516009556040810151600a55606081015160808201511515600160f81b026001600160f81b0390911617600b5560a0810151600c805460c09093015115156101000261ff00199215159290921661ffff1990931692909217179055565b6006546001600160a01b03163314610b7a5760405162461bcd60e51b815260040161079b90612b4e565b8051610b8d906016906020840190612582565b5050565b6006546001600160a01b03163314610bbb5760405162461bcd60e51b815260040161079b90612b4e565b610bc36117ba565b565b6108d183838360405180602001604052806000815250610e99565b6000818152600260205260408120546001600160a01b03168061068e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161079b565b60006001600160a01b038216610cc25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161079b565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610d085760405162461bcd60e51b815260040161079b90612b4e565b610bc36000611857565b6006546001600160a01b03163314610d3c5760405162461bcd60e51b815260040161079b90612b4e565b610bc36118a9565b600060118160016004830154600160f81b900460ff166002811115610d6b57610d6b612938565b1415610d78575043610da3565b60026004830154600160f81b900460ff166002811115610d9a57610d9a612938565b1415610da35750425b815415801590610db4575081548110155b610e005760405162461bcd60e51b815260206004820152601f60248201527f4c696e656172447574636841756374696f6e3a204e6f74207374617274656400604482015260640161079b565b60028201548254600091610e3591610e189085612bea565b610e229190612c17565b60048501546001600160f81b031661190e565b9050826003015481610e479190612c2b565b8360010154610e569190612bea565b610e609086612c2b565b95945050505050565b60006108e0600e5490565b6060600180546106a390612b19565b610b8d338383611924565b610bc33360016119f3565b610ea33383611538565b610ebf5760405162461bcd60e51b815260040161079b90612b83565b610ecb84848484611ea5565b50505050565b6006546001600160a01b03163314610efb5760405162461bcd60e51b815260040161079b90612b4e565b600654600160a01b900460ff1615610f255760405162461bcd60e51b815260040161079b90612c4a565b600b546001600160f81b0316610f4d82610f3e60105490565b610f489084612bea565b61190e565b915060008211610f9f5760405162461bcd60e51b815260206004820152601b60248201527f53656c6c65723a20467265652071756f74612065786365656465640000000000604482015260640161079b565b600854610faf83610f3e600e5490565b925060008311610ff45760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b604482015260640161079b565b61100084846001611ed8565b61100b600e84611f11565b611016601084611f11565b80611020600e5490565b111561102e5761102e612c74565b8161103860105490565b1115610ecb57610ecb612c74565b6006546001600160a01b031633146110705760405162461bcd60e51b815260040161079b90612b4e565b8082608001516001600160f81b0316836060015102836020015103146110e65760405162461bcd60e51b815260206004820152602560248201527f4c696e656172447574636841756374696f6e3a20696e636f7272656374207265604482015264736572766560d81b606482015260840161079b565b60008260a0015160028111156110fe576110fe612938565b14156111585760405162461bcd60e51b8152602060048201526024808201527f4c696e656172447574636841756374696f6e3a20756e737065636966696564206044820152631d5b9a5d60e21b606482015260840161079b565b60008260400151116111bf5760405162461bcd60e51b815260206004820152602a60248201527f4c696e656172447574636841756374696f6e3a207a65726f206465637265617360448201526919481a5b9d195c9d985b60b21b606482015260840161079b565b815160119081556020830151601255604083015160135560608301516014556080830151601580546001600160f81b0319166001600160f81b03909216918217815560a0850151859392909190600160f81b83600281111561122357611223612938565b021790555050505050565b606081611252816000908152600260205260409020546001600160a01b0316151590565b6112a85760405162461bcd60e51b815260206004820152602160248201527f455243373231436f6d6d6f6e3a20546f6b656e20646f65736e277420657869736044820152601d60fa1b606482015260840161079b565b60166112b384611f2e565b6040516020016112c4929190612ca6565b60405160208183030381529060405291505b50919050565b601680546112e990612b19565b80601f016020809104026020016040519081016040528092919081815260200182805461131590612b19565b80156113625780601f1061133757610100808354040283529160200191611362565b820191906000526020600020905b81548152906001019060200180831161134557829003601f168201915b505050505081565b6006546001600160a01b031633146113945760405162461bcd60e51b815260040161079b90612b4e565b601155565b6001600160a01b03808316600090815260056020908152604080832093851683529290529081205460ff16806113d457506113d4838361202c565b9392505050565b6006546001600160a01b031633146114055760405162461bcd60e51b815260040161079b90612b4e565b6001600160a01b03811661146a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161079b565b61147381611857565b50565b5490565b60006001600160e01b031982166380ac58cd60e01b14806114ab57506001600160e01b03198216635b5e139f60e01b145b8061068e57506301ffc9a760e01b6001600160e01b031983161461068e565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114ff82610be0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166115b15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161079b565b60006115bc83610be0565b9050806001600160a01b0316846001600160a01b031614806115f75750836001600160a01b03166115ec84610726565b6001600160a01b0316145b8061160757506116078185611399565b949350505050565b826001600160a01b031661162282610be0565b6001600160a01b03161461168a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161079b565b6001600160a01b0382166116ec5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161079b565b6116f783838361210e565b6117026000826114ca565b6001600160a01b038316600090815260036020526040812080546001929061172b908490612bea565b90915550506001600160a01b0382166000908152600360205260408120805460019290611759908490612d44565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600654600160a01b900460ff1661180a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161079b565b6006805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600654600160a01b900460ff16156118d35760405162461bcd60e51b815260040161079b90612c4a565b6006805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861183a3390565b600081831061191d57816113d4565b5090919050565b816001600160a01b0316836001600160a01b031614156119865760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161079b565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60026007541415611a465760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161079b565b6002600755600654600160a01b900460ff1615611a755760405162461bcd60e51b815260040161079b90612c4a565b6040805160e08101825260085481526009546020820152600a54918101829052600b546001600160f81b038116606083015260ff600160f81b909104811615156080830152600c54808216151560a0840152610100900416151560c08201529060009015611af057611aeb83836040015161190e565b611af2565b825b905060008260800151611b06578251611b20565b60608301518351611b20916001600160f81b031690612bea565b9050611b2f82610f3e600e5490565b915060008211611b745760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b604482015260640161079b565b602083015115611cd057336001600160a01b038616811415906000903214801590611ba85750326001600160a01b03881614155b9050611bd884886040518060400160405280600b81526020016a109d5e595c881b1a5b5a5d60aa1b815250612119565b93508115611c1257611c0f84336040518060400160405280600c81526020016b14d95b99195c881b1a5b5a5d60a21b815250612119565b93505b8015611c4a57611c4784326040518060400160405280600c81526020016b13dc9a59da5b881b1a5b5a5d60a21b815250612119565b93505b6001600160a01b0387166000908152600f602052604081208054869290611c72908490612d44565b90915550508115611ca257336000908152600f602052604081208054869290611c9c908490612d44565b90915550505b8015611ccd57326000908152600f602052604081208054869290611cc7908490612d44565b90915550505b50505b6000611cdb83610d44565b905080341015611d3157611cfb611cf6633b9aca0083612c17565b611f2e565b604051602001611d0b9190612d5c565b60408051601f198184030181529082905262461bcd60e51b825261079b916004016126a6565b611d3d86846000611ed8565b611d48600e84611f11565b8351600e541115611d5b57611d5b612c74565b8015611dc057600d54611d77906001600160a01b031682612162565b600d5460408051858152602081018490526001600160a01b03909216917f01f51b99bd1c3cca301836178e5dee13aadfe44eff06dc3ddcbf3c9d058454f8910160405180910390a25b80341115611e9857336000611dd58334612bea565b9050600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611e25576040519150601f19603f3d011682016040523d82523d6000602084013e611e2a565b606091505b5091509150818190611e4f5760405162461bcd60e51b815260040161079b91906126a6565b50836001600160a01b03167fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d84604051611e8b91815260200190565b60405180910390a2505050505b5050600160075550505050565b611eb084848461160f565b611ebc8484848461227b565b610ecb5760405162461bcd60e51b815260040161079b90612da1565b60005b82811015610ecb57611eff8482611ef0610e69565b611efa9190612d44565b612379565b80611f0981612df3565b915050611edb565b80826000016000828254611f259190612d44565b90915550505050565b606081611f525750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611f7c5780611f6681612df3565b9150611f759050600a83612c17565b9150611f56565b60008167ffffffffffffffff811115611f9757611f97612771565b6040519080825280601f01601f191660200182016040528015611fc1576020820181803683370190505b5090505b841561160757611fd6600183612bea565b9150611fe3600a86612e0e565b611fee906030612d44565b60f81b81838151811061200357612003612e22565b60200101906001600160f81b031916908160001a905350612025600a86612c17565b9450611fc5565b6000804660018114612045576004811461206157612079565b73a5409ec958c83c3f309868babaca7c86dcb077c19150612079565b73f57b2c51ded3a29e6891aba85459d600256cf31791505b506001600160a01b03811615801590611607575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c455279190602401602060405180830381865afa1580156120d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fc9190612e38565b6001600160a01b031614949350505050565b6108d1838383612393565b6001600160a01b0382166000908152600f6020526040812054600954829161214091612bea565b9050806121585782604051602001611d0b9190612e55565b610e60858261190e565b804710156121b25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161079b565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146121ff576040519150601f19603f3d011682016040523d82523d6000602084013e612204565b606091505b50509050806108d15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161079b565b60006001600160a01b0384163b1561236e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906122bf903390899088908890600401612e85565b6020604051808303816000875af19250505080156122fa575060408051601f3d908101601f191682019092526122f791810190612ec2565b60015b612354573d808015612328576040519150601f19603f3d011682016040523d82523d6000602084013e61232d565b606091505b50805161234c5760405162461bcd60e51b815260040161079b90612da1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611607565b506001949350505050565b610b8d828260405180602001604052806000815250612401565b600654600160a01b900460ff16156108d15760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b606482015260840161079b565b61240b8383612434565b612418600084848461227b565b6108d15760405162461bcd60e51b815260040161079b90612da1565b6001600160a01b03821661248a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161079b565b6000818152600260205260409020546001600160a01b0316156124ef5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161079b565b6124fb6000838361210e565b6001600160a01b0382166000908152600360205260408120805460019290612524908490612d44565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461258e90612b19565b90600052602060002090601f0160209004810192826125b057600085556125f6565b82601f106125c957805160ff19168380011785556125f6565b828001600101855582156125f6579182015b828111156125f65782518255916020019190600101906125db565b50612602929150612606565b5090565b5b808211156126025760008155600101612607565b6001600160e01b03198116811461147357600080fd5b60006020828403121561264357600080fd5b81356113d48161261b565b60005b83811015612669578181015183820152602001612651565b83811115610ecb5750506000910152565b6000815180845261269281602086016020860161264e565b601f01601f19169290920160200192915050565b6020815260006113d4602083018461267a565b6000602082840312156126cb57600080fd5b5035919050565b6001600160a01b038116811461147357600080fd5b600080604083850312156126fa57600080fd5b8235612705816126d2565b946020939093013593505050565b60006020828403121561272557600080fd5b81356113d4816126d2565b60008060006060848603121561274557600080fd5b8335612750816126d2565b92506020840135612760816126d2565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156127aa576127aa612771565b60405290565b80356001600160f81b03811681146127c757600080fd5b919050565b803580151581146127c757600080fd5b600060e082840312156127ee57600080fd5b60405160e0810181811067ffffffffffffffff8211171561281157612811612771565b806040525082358152602083013560208201526040830135604082015261283a606084016127b0565b606082015261284b608084016127cc565b608082015261285c60a084016127cc565b60a082015261286d60c084016127cc565b60c08201529392505050565b600067ffffffffffffffff8084111561289457612894612771565b604051601f8501601f19908116603f011681019082821181831017156128bc576128bc612771565b816040528093508581528686860111156128d557600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561290157600080fd5b813567ffffffffffffffff81111561291857600080fd5b8201601f8101841361292957600080fd5b61160784823560208401612879565b634e487b7160e01b600052602160045260246000fd5b8681526020810186905260408101859052606081018490526001600160f81b038316608082015260c081016003831061299757634e487b7160e01b600052602160045260246000fd5b8260a0830152979650505050505050565b600080604083850312156129bb57600080fd5b82356129c6816126d2565b91506129d4602084016127cc565b90509250929050565b600080600080608085870312156129f357600080fd5b84356129fe816126d2565b93506020850135612a0e816126d2565b925060408501359150606085013567ffffffffffffffff811115612a3157600080fd5b8501601f81018713612a4257600080fd5b612a5187823560208401612879565b91505092959194509250565b60008082840360e0811215612a7157600080fd5b60c0811215612a7f57600080fd5b50612a88612787565b83358152602084013560208201526040840135604082015260608401356060820152612ab6608085016127b0565b608082015260a084013560038110612acd57600080fd5b60a08201529460c0939093013593505050565b60008060408385031215612af357600080fd5b8235612afe816126d2565b91506020830135612b0e816126d2565b809150509250929050565b600181811c90821680612b2d57607f821691505b602082108114156112d657634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015612bfc57612bfc612bd4565b500390565b634e487b7160e01b600052601260045260246000fd5b600082612c2657612c26612c01565b500490565b6000816000190483118215151615612c4557612c45612bd4565b500290565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052600160045260246000fd5b60008151612c9c81856020860161264e565b9290920192915050565b600080845481600182811c915080831680612cc257607f831692505b6020808410821415612ce257634e487b7160e01b86526022600452602486fd5b818015612cf65760018114612d0757612d34565b60ff19861689528489019650612d34565b60008b81526020902060005b86811015612d2c5781548b820152908501908301612d13565b505084890196505b505050505050610e608185612c8a565b60008219821115612d5757612d57612bd4565b500190565b6d029b2b63632b91d1021b7b9ba39960951b815260008251612d8581600e85016020870161264e565b64204757656960d81b600e939091019283015250601301919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000600019821415612e0757612e07612bd4565b5060010190565b600082612e1d57612e1d612c01565b500690565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612e4a57600080fd5b81516113d4816126d2565b67029b2b63632b91d160c51b815260008251612e7881600885016020870161264e565b9190910160080192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612eb89083018461267a565b9695505050505050565b600060208284031215612ed457600080fd5b81516113d48161261b56fea2646970667358221220fca7fa1394d1d2573416174e0038e6790e5c4267fe99f086b735880a32fe2e9b64736f6c634300080a00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000005cd9665b52049a00e0c364c727f968d992714111000000000000000000000000000000000000000000000000000000000000001050524f4f4620436f6c6c65637469766500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000550524f4f46000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101ee5760003560e01c80637bd07f8b1161010d578063b88d4fde116100a0578063c87b56dd1161006f578063c87b56dd146105ee578063d547cfb71461060e578063e0c5b0ed14610623578063e985e9c514610643578063f2fde38b1461066357600080fd5b8063b88d4fde14610503578063bb69b7ef14610523578063bf62e21d146105ae578063c85b380d146105ce57600080fd5b80639106d7ba116100dc5780639106d7ba146104b157806395d89b41146104c6578063a22cb465146104db578063a6f2ae3a146104fb57600080fd5b80637bd07f8b146104105780638456cb591461045e5780638da5cb5b146104735780639097548d1461049157600080fd5b806330176e13116101855780635c975abb116101545780635c975abb1461039c5780636352211e146103bb57806370a08231146103db578063715018a6146103fb57600080fd5b806330176e131461032757806338af3eed146103475780633f4ba83a1461036757806342842e0e1461037c57600080fd5b806318160ddd116101c157806318160ddd146102a45780631c31f710146102c757806323b872dd146102e75780632f274bd41461030757600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e366004612631565b610683565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d610694565b60405161021f91906126a6565b34801561025657600080fd5b5061026a6102653660046126b9565b610726565b6040516001600160a01b03909116815260200161021f565b34801561028e57600080fd5b506102a261029d3660046126e7565b6107c0565b005b3480156102b057600080fd5b506102b96108d6565b60405190815260200161021f565b3480156102d357600080fd5b506102a26102e2366004612713565b6108e5565b3480156102f357600080fd5b506102a2610302366004612730565b610931565b34801561031357600080fd5b506102a26103223660046127dc565b610962565b34801561033357600080fd5b506102a26103423660046128ef565b610b50565b34801561035357600080fd5b50600d5461026a906001600160a01b031681565b34801561037357600080fd5b506102a2610b91565b34801561038857600080fd5b506102a2610397366004612730565b610bc5565b3480156103a857600080fd5b50600654600160a01b900460ff16610213565b3480156103c757600080fd5b5061026a6103d63660046126b9565b610be0565b3480156103e757600080fd5b506102b96103f6366004612713565b610c57565b34801561040757600080fd5b506102a2610cde565b34801561041c57600080fd5b5060115460125460135460145460155461044c94939291906001600160f81b03811690600160f81b900460ff1686565b60405161021f9695949392919061294e565b34801561046a57600080fd5b506102a2610d12565b34801561047f57600080fd5b506006546001600160a01b031661026a565b34801561049d57600080fd5b506102b96104ac3660046126b9565b610d44565b3480156104bd57600080fd5b506102b9610e69565b3480156104d257600080fd5b5061023d610e74565b3480156104e757600080fd5b506102a26104f63660046129a8565b610e83565b6102a2610e8e565b34801561050f57600080fd5b506102a261051e3660046129dd565b610e99565b34801561052f57600080fd5b50600854600954600a54600b54600c5461056b949392916001600160f81b0381169160ff600160f81b9092048216918181169161010090041687565b604080519788526020880196909652948601939093526001600160f81b03909116606085015215156080840152151560a0830152151560c082015260e00161021f565b3480156105ba57600080fd5b506102a26105c93660046126e7565b610ed1565b3480156105da57600080fd5b506102a26105e9366004612a5d565b611046565b3480156105fa57600080fd5b5061023d6106093660046126b9565b61122e565b34801561061a57600080fd5b5061023d6112dc565b34801561062f57600080fd5b506102a261063e3660046126b9565b61136a565b34801561064f57600080fd5b5061021361065e366004612ae0565b611399565b34801561066f57600080fd5b506102a261067e366004612713565b6113db565b600061068e8261147a565b92915050565b6060600080546106a390612b19565b80601f01602080910402602001604051908101604052809291908181526020018280546106cf90612b19565b801561071c5780601f106106f15761010080835404028352916020019161071c565b820191906000526020600020905b8154815290600101906020018083116106ff57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166107a45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006107cb82610be0565b9050806001600160a01b0316836001600160a01b031614156108395760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161079b565b336001600160a01b038216148061085557506108558133611399565b6108c75760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161079b565b6108d183836114ca565b505050565b60006108e0610e69565b905090565b6006546001600160a01b0316331461090f5760405162461bcd60e51b815260040161079b90612b4e565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b61093b3382611538565b6109575760405162461bcd60e51b815260040161079b90612b83565b6108d183838361160f565b6006546001600160a01b0316331461098c5760405162461bcd60e51b815260040161079b90612b4e565b80606001516001600160f81b0316816000015110156109ed5760405162461bcd60e51b815260206004820152601c60248201527f53656c6c65723a2065786365737369766520667265652071756f746100000000604482015260640161079b565b600e5481511015610a405760405162461bcd60e51b815260206004820181905260248201527f53656c6c65723a20696e76656e746f7279203c20616c726561647920736f6c64604482015260640161079b565b60105481606001516001600160f81b03161015610aa95760405162461bcd60e51b815260206004820152602160248201527f53656c6c65723a20667265652071756f7461203c20616c7265616479207573656044820152601960fa1b606482015260840161079b565b600c54610100900460ff1615610ac657600160c082015260085481525b600c5460ff1615610aea57600160a0820152600b546001600160f81b031660608201525b805160085560208101516009556040810151600a55606081015160808201511515600160f81b026001600160f81b0390911617600b5560a0810151600c805460c09093015115156101000261ff00199215159290921661ffff1990931692909217179055565b6006546001600160a01b03163314610b7a5760405162461bcd60e51b815260040161079b90612b4e565b8051610b8d906016906020840190612582565b5050565b6006546001600160a01b03163314610bbb5760405162461bcd60e51b815260040161079b90612b4e565b610bc36117ba565b565b6108d183838360405180602001604052806000815250610e99565b6000818152600260205260408120546001600160a01b03168061068e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161079b565b60006001600160a01b038216610cc25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161079b565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610d085760405162461bcd60e51b815260040161079b90612b4e565b610bc36000611857565b6006546001600160a01b03163314610d3c5760405162461bcd60e51b815260040161079b90612b4e565b610bc36118a9565b600060118160016004830154600160f81b900460ff166002811115610d6b57610d6b612938565b1415610d78575043610da3565b60026004830154600160f81b900460ff166002811115610d9a57610d9a612938565b1415610da35750425b815415801590610db4575081548110155b610e005760405162461bcd60e51b815260206004820152601f60248201527f4c696e656172447574636841756374696f6e3a204e6f74207374617274656400604482015260640161079b565b60028201548254600091610e3591610e189085612bea565b610e229190612c17565b60048501546001600160f81b031661190e565b9050826003015481610e479190612c2b565b8360010154610e569190612bea565b610e609086612c2b565b95945050505050565b60006108e0600e5490565b6060600180546106a390612b19565b610b8d338383611924565b610bc33360016119f3565b610ea33383611538565b610ebf5760405162461bcd60e51b815260040161079b90612b83565b610ecb84848484611ea5565b50505050565b6006546001600160a01b03163314610efb5760405162461bcd60e51b815260040161079b90612b4e565b600654600160a01b900460ff1615610f255760405162461bcd60e51b815260040161079b90612c4a565b600b546001600160f81b0316610f4d82610f3e60105490565b610f489084612bea565b61190e565b915060008211610f9f5760405162461bcd60e51b815260206004820152601b60248201527f53656c6c65723a20467265652071756f74612065786365656465640000000000604482015260640161079b565b600854610faf83610f3e600e5490565b925060008311610ff45760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b604482015260640161079b565b61100084846001611ed8565b61100b600e84611f11565b611016601084611f11565b80611020600e5490565b111561102e5761102e612c74565b8161103860105490565b1115610ecb57610ecb612c74565b6006546001600160a01b031633146110705760405162461bcd60e51b815260040161079b90612b4e565b8082608001516001600160f81b0316836060015102836020015103146110e65760405162461bcd60e51b815260206004820152602560248201527f4c696e656172447574636841756374696f6e3a20696e636f7272656374207265604482015264736572766560d81b606482015260840161079b565b60008260a0015160028111156110fe576110fe612938565b14156111585760405162461bcd60e51b8152602060048201526024808201527f4c696e656172447574636841756374696f6e3a20756e737065636966696564206044820152631d5b9a5d60e21b606482015260840161079b565b60008260400151116111bf5760405162461bcd60e51b815260206004820152602a60248201527f4c696e656172447574636841756374696f6e3a207a65726f206465637265617360448201526919481a5b9d195c9d985b60b21b606482015260840161079b565b815160119081556020830151601255604083015160135560608301516014556080830151601580546001600160f81b0319166001600160f81b03909216918217815560a0850151859392909190600160f81b83600281111561122357611223612938565b021790555050505050565b606081611252816000908152600260205260409020546001600160a01b0316151590565b6112a85760405162461bcd60e51b815260206004820152602160248201527f455243373231436f6d6d6f6e3a20546f6b656e20646f65736e277420657869736044820152601d60fa1b606482015260840161079b565b60166112b384611f2e565b6040516020016112c4929190612ca6565b60405160208183030381529060405291505b50919050565b601680546112e990612b19565b80601f016020809104026020016040519081016040528092919081815260200182805461131590612b19565b80156113625780601f1061133757610100808354040283529160200191611362565b820191906000526020600020905b81548152906001019060200180831161134557829003601f168201915b505050505081565b6006546001600160a01b031633146113945760405162461bcd60e51b815260040161079b90612b4e565b601155565b6001600160a01b03808316600090815260056020908152604080832093851683529290529081205460ff16806113d457506113d4838361202c565b9392505050565b6006546001600160a01b031633146114055760405162461bcd60e51b815260040161079b90612b4e565b6001600160a01b03811661146a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161079b565b61147381611857565b50565b5490565b60006001600160e01b031982166380ac58cd60e01b14806114ab57506001600160e01b03198216635b5e139f60e01b145b8061068e57506301ffc9a760e01b6001600160e01b031983161461068e565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114ff82610be0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166115b15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161079b565b60006115bc83610be0565b9050806001600160a01b0316846001600160a01b031614806115f75750836001600160a01b03166115ec84610726565b6001600160a01b0316145b8061160757506116078185611399565b949350505050565b826001600160a01b031661162282610be0565b6001600160a01b03161461168a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161079b565b6001600160a01b0382166116ec5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161079b565b6116f783838361210e565b6117026000826114ca565b6001600160a01b038316600090815260036020526040812080546001929061172b908490612bea565b90915550506001600160a01b0382166000908152600360205260408120805460019290611759908490612d44565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600654600160a01b900460ff1661180a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161079b565b6006805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600654600160a01b900460ff16156118d35760405162461bcd60e51b815260040161079b90612c4a565b6006805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861183a3390565b600081831061191d57816113d4565b5090919050565b816001600160a01b0316836001600160a01b031614156119865760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161079b565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60026007541415611a465760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161079b565b6002600755600654600160a01b900460ff1615611a755760405162461bcd60e51b815260040161079b90612c4a565b6040805160e08101825260085481526009546020820152600a54918101829052600b546001600160f81b038116606083015260ff600160f81b909104811615156080830152600c54808216151560a0840152610100900416151560c08201529060009015611af057611aeb83836040015161190e565b611af2565b825b905060008260800151611b06578251611b20565b60608301518351611b20916001600160f81b031690612bea565b9050611b2f82610f3e600e5490565b915060008211611b745760405162461bcd60e51b815260206004820152601060248201526f14d95b1b195c8e8814dbdb19081bdd5d60821b604482015260640161079b565b602083015115611cd057336001600160a01b038616811415906000903214801590611ba85750326001600160a01b03881614155b9050611bd884886040518060400160405280600b81526020016a109d5e595c881b1a5b5a5d60aa1b815250612119565b93508115611c1257611c0f84336040518060400160405280600c81526020016b14d95b99195c881b1a5b5a5d60a21b815250612119565b93505b8015611c4a57611c4784326040518060400160405280600c81526020016b13dc9a59da5b881b1a5b5a5d60a21b815250612119565b93505b6001600160a01b0387166000908152600f602052604081208054869290611c72908490612d44565b90915550508115611ca257336000908152600f602052604081208054869290611c9c908490612d44565b90915550505b8015611ccd57326000908152600f602052604081208054869290611cc7908490612d44565b90915550505b50505b6000611cdb83610d44565b905080341015611d3157611cfb611cf6633b9aca0083612c17565b611f2e565b604051602001611d0b9190612d5c565b60408051601f198184030181529082905262461bcd60e51b825261079b916004016126a6565b611d3d86846000611ed8565b611d48600e84611f11565b8351600e541115611d5b57611d5b612c74565b8015611dc057600d54611d77906001600160a01b031682612162565b600d5460408051858152602081018490526001600160a01b03909216917f01f51b99bd1c3cca301836178e5dee13aadfe44eff06dc3ddcbf3c9d058454f8910160405180910390a25b80341115611e9857336000611dd58334612bea565b9050600080836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611e25576040519150601f19603f3d011682016040523d82523d6000602084013e611e2a565b606091505b5091509150818190611e4f5760405162461bcd60e51b815260040161079b91906126a6565b50836001600160a01b03167fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d84604051611e8b91815260200190565b60405180910390a2505050505b5050600160075550505050565b611eb084848461160f565b611ebc8484848461227b565b610ecb5760405162461bcd60e51b815260040161079b90612da1565b60005b82811015610ecb57611eff8482611ef0610e69565b611efa9190612d44565b612379565b80611f0981612df3565b915050611edb565b80826000016000828254611f259190612d44565b90915550505050565b606081611f525750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611f7c5780611f6681612df3565b9150611f759050600a83612c17565b9150611f56565b60008167ffffffffffffffff811115611f9757611f97612771565b6040519080825280601f01601f191660200182016040528015611fc1576020820181803683370190505b5090505b841561160757611fd6600183612bea565b9150611fe3600a86612e0e565b611fee906030612d44565b60f81b81838151811061200357612003612e22565b60200101906001600160f81b031916908160001a905350612025600a86612c17565b9450611fc5565b6000804660018114612045576004811461206157612079565b73a5409ec958c83c3f309868babaca7c86dcb077c19150612079565b73f57b2c51ded3a29e6891aba85459d600256cf31791505b506001600160a01b03811615801590611607575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c455279190602401602060405180830381865afa1580156120d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fc9190612e38565b6001600160a01b031614949350505050565b6108d1838383612393565b6001600160a01b0382166000908152600f6020526040812054600954829161214091612bea565b9050806121585782604051602001611d0b9190612e55565b610e60858261190e565b804710156121b25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161079b565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146121ff576040519150601f19603f3d011682016040523d82523d6000602084013e612204565b606091505b50509050806108d15760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161079b565b60006001600160a01b0384163b1561236e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906122bf903390899088908890600401612e85565b6020604051808303816000875af19250505080156122fa575060408051601f3d908101601f191682019092526122f791810190612ec2565b60015b612354573d808015612328576040519150601f19603f3d011682016040523d82523d6000602084013e61232d565b606091505b50805161234c5760405162461bcd60e51b815260040161079b90612da1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611607565b506001949350505050565b610b8d828260405180602001604052806000815250612401565b600654600160a01b900460ff16156108d15760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b606482015260840161079b565b61240b8383612434565b612418600084848461227b565b6108d15760405162461bcd60e51b815260040161079b90612da1565b6001600160a01b03821661248a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161079b565b6000818152600260205260409020546001600160a01b0316156124ef5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161079b565b6124fb6000838361210e565b6001600160a01b0382166000908152600360205260408120805460019290612524908490612d44565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461258e90612b19565b90600052602060002090601f0160209004810192826125b057600085556125f6565b82601f106125c957805160ff19168380011785556125f6565b828001600101855582156125f6579182015b828111156125f65782518255916020019190600101906125db565b50612602929150612606565b5090565b5b808211156126025760008155600101612607565b6001600160e01b03198116811461147357600080fd5b60006020828403121561264357600080fd5b81356113d48161261b565b60005b83811015612669578181015183820152602001612651565b83811115610ecb5750506000910152565b6000815180845261269281602086016020860161264e565b601f01601f19169290920160200192915050565b6020815260006113d4602083018461267a565b6000602082840312156126cb57600080fd5b5035919050565b6001600160a01b038116811461147357600080fd5b600080604083850312156126fa57600080fd5b8235612705816126d2565b946020939093013593505050565b60006020828403121561272557600080fd5b81356113d4816126d2565b60008060006060848603121561274557600080fd5b8335612750816126d2565b92506020840135612760816126d2565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156127aa576127aa612771565b60405290565b80356001600160f81b03811681146127c757600080fd5b919050565b803580151581146127c757600080fd5b600060e082840312156127ee57600080fd5b60405160e0810181811067ffffffffffffffff8211171561281157612811612771565b806040525082358152602083013560208201526040830135604082015261283a606084016127b0565b606082015261284b608084016127cc565b608082015261285c60a084016127cc565b60a082015261286d60c084016127cc565b60c08201529392505050565b600067ffffffffffffffff8084111561289457612894612771565b604051601f8501601f19908116603f011681019082821181831017156128bc576128bc612771565b816040528093508581528686860111156128d557600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561290157600080fd5b813567ffffffffffffffff81111561291857600080fd5b8201601f8101841361292957600080fd5b61160784823560208401612879565b634e487b7160e01b600052602160045260246000fd5b8681526020810186905260408101859052606081018490526001600160f81b038316608082015260c081016003831061299757634e487b7160e01b600052602160045260246000fd5b8260a0830152979650505050505050565b600080604083850312156129bb57600080fd5b82356129c6816126d2565b91506129d4602084016127cc565b90509250929050565b600080600080608085870312156129f357600080fd5b84356129fe816126d2565b93506020850135612a0e816126d2565b925060408501359150606085013567ffffffffffffffff811115612a3157600080fd5b8501601f81018713612a4257600080fd5b612a5187823560208401612879565b91505092959194509250565b60008082840360e0811215612a7157600080fd5b60c0811215612a7f57600080fd5b50612a88612787565b83358152602084013560208201526040840135604082015260608401356060820152612ab6608085016127b0565b608082015260a084013560038110612acd57600080fd5b60a08201529460c0939093013593505050565b60008060408385031215612af357600080fd5b8235612afe816126d2565b91506020830135612b0e816126d2565b809150509250929050565b600181811c90821680612b2d57607f821691505b602082108114156112d657634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015612bfc57612bfc612bd4565b500390565b634e487b7160e01b600052601260045260246000fd5b600082612c2657612c26612c01565b500490565b6000816000190483118215151615612c4557612c45612bd4565b500290565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052600160045260246000fd5b60008151612c9c81856020860161264e565b9290920192915050565b600080845481600182811c915080831680612cc257607f831692505b6020808410821415612ce257634e487b7160e01b86526022600452602486fd5b818015612cf65760018114612d0757612d34565b60ff19861689528489019650612d34565b60008b81526020902060005b86811015612d2c5781548b820152908501908301612d13565b505084890196505b505050505050610e608185612c8a565b60008219821115612d5757612d57612bd4565b500190565b6d029b2b63632b91d1021b7b9ba39960951b815260008251612d8581600e85016020870161264e565b64204757656960d81b600e939091019283015250601301919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000600019821415612e0757612e07612bd4565b5060010190565b600082612e1d57612e1d612c01565b500690565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612e4a57600080fd5b81516113d4816126d2565b67029b2b63632b91d160c51b815260008251612e7881600885016020870161264e565b9190910160080192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612eb89083018461267a565b9695505050505050565b600060208284031215612ed457600080fd5b81516113d48161261b56fea2646970667358221220fca7fa1394d1d2573416174e0038e6790e5c4267fe99f086b735880a32fe2e9b64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000005cd9665b52049a00e0c364c727f968d992714111000000000000000000000000000000000000000000000000000000000000001050524f4f4620436f6c6c65637469766500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000550524f4f46000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): PROOF Collective
Arg [1] : symbol (string): PROOF
Arg [2] : beneficiary (address): 0x5CD9665B52049A00e0C364C727f968D992714111
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000005cd9665b52049a00e0c364c727f968d992714111
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [4] : 50524f4f4620436f6c6c65637469766500000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 50524f4f46000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
OVERVIEW
A private group of 1000 dedicated NFT collectors and artists. Membership to the collective and all of the benefits come from holding the PROOF Collective NFT.Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.