ERC-721
Overview
Max Total Supply
0 ████████
Holders
29,246
Market
Volume (24H)
0.0031 ETH
Min Price (24H)
$10.29 @ 0.003100 ETH
Max Price (24H)
$10.29 @ 0.003100 ETH
Other Info
Token Contract
Balance
1 ████████Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Censored
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @creator: Pak /// @author: manifold.xyz //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // // // ,ad8888ba, 88888888888 888b 88 ad88888ba ,ad8888ba, 88888888ba 88888888888 88888888ba, // // d8"' `"8b 88 8888b 88 d8" "8b d8"' `"8b 88 "8b 88 88 `"8b // // ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ // // ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ // // ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ // // ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ // // Y8a. .a8P 88 88 `8888 Y8a a8P Y8a. .a8P 88 `8b 88 88 .a8P // // `"Y8888Y"' 88888888888 88 `888 "Y88888P" `"Y8888Y"' 88 `8b 88888888888 88888888Y"' // // // // // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface IClock { function metadata() view external returns(string memory); } interface ICensor { function metadata(uint256 tokenId, string memory message, uint256 value) view external returns(string memory); } contract Censored is ReentrancyGuard, AdminControl, ERC721 { uint256 private _tokenIndex; mapping (uint256 => string) private _tokenMessages; mapping (uint256 => uint256) private _tokenValues; mapping (bytes32 => bool) private _messageHashes; uint256 public messageStartTime; uint256 public messageEndTime; bool private _freedom; address _clockAddress; address _censorAddress; mapping (uint256 => bool) private _tokenFreedom; mapping (uint256 => address) private _tokenCensorAddress; uint256 private _royaltyBps; address payable private _royaltyRecipient; bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6; bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a; bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584; constructor() ERC721("Censored", unicode"████████") {} /** * @dev Activate this contract */ function activate(uint256 messageStartTime_, uint256 messageEndTime_, address clockAddress, address censorAddress) external adminRequired { require(_tokenIndex == 0, "Already activated"); _tokenIndex++; messageStartTime = messageStartTime_; messageEndTime = messageEndTime_; _clockAddress = clockAddress; _censorAddress = censorAddress; _mint(msg.sender, _tokenIndex); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, ERC721) returns (bool) { return interfaceId == type(IERC721).interfaceId || AdminControl.supportsInterface(interfaceId) || ERC721.supportsInterface(interfaceId) || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == _INTERFACE_ID_ROYALTIES_CREATORCORE || interfaceId == _INTERFACE_ID_ROYALTIES_EIP2981 || interfaceId == _INTERFACE_ID_ROYALTIES_RARIBLE; } function withdraw(address payable recipient, uint256 amount) external adminRequired { (bool success,) = recipient.call{value:amount}(""); require(success); } function withdraw(address recipient, address erc20, uint256 amount) external adminRequired { IERC20(erc20).transfer(recipient, amount); } /** * Set the freedom state */ function setFreedom(uint256[] calldata tokenIds, bool freedom) public adminRequired { if (tokenIds.length == 0) { _freedom = freedom; } else { for (uint i = 0; i < tokenIds.length; i++) { _tokenFreedom[tokenIds[i]] = freedom; } } } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); if (tokenId == 1) { return IClock(_clockAddress).metadata(); } else { if (_tokenCensorAddress[tokenId] != address(0)) { return ICensor(_tokenCensorAddress[tokenId]).metadata(tokenId, _tokenMessages[tokenId], _tokenValues[tokenId]); } else { return ICensor(_censorAddress).metadata(tokenId, _tokenMessages[tokenId], _tokenValues[tokenId]); } } } /** * @dev See {ERC721-_beforeTokenTranfser}. */ function _beforeTokenTransfer(address from, address, uint256 tokenId) internal view override { require(from == address(0) || tokenId == 1 || _tokenFreedom[tokenId] || _freedom, "ERC721: transfer not permitted"); } /** * @dev Validate that a message can be written */ function validateMessage(string memory message_) public view returns(bool) { // Max length 72, a-z only bytes memory messageBytes = bytes(message_); require(messageBytes.length > 0 && messageBytes[0] != 0x20 && messageBytes[messageBytes.length-1] != 0x20, "Invalid characters"); require(messageBytes.length <= 72, "Message too long"); bytes32 messageHash = keccak256(messageBytes); require(!_messageHashes[messageHash], "Message already exists"); for (uint i = 0; i < messageBytes.length; i++) { bytes1 char = messageBytes[i]; if (!(char >= 0x61 && char <= 0x7A) && char != 0x20) { revert("Invalid character"); } else if (i >= 1 && char == 0x20 && messageBytes[i-1] == 0x20) { revert("Cannot have multiple sequential spaces"); } } return true; } /** * @dev Write a message and get an NFT. */ function message(string memory message_) external nonReentrant payable { require((block.timestamp >= messageStartTime && block.timestamp <= messageEndTime && _tokenIndex >= 2) || (msg.sender == owner() && _tokenIndex > 0), "Cannot message"); require(balanceOf(msg.sender) == 0, "You have already sent a message"); validateMessage(message_); _tokenIndex++; _tokenMessages[_tokenIndex] = message_; _tokenValues[_tokenIndex] = msg.value; _messageHashes[keccak256(bytes(message_))] = true; _mint(msg.sender, _tokenIndex); } /** * @dev Update metadata */ function updateMetadata(address clockAddress, address censorAddress) external adminRequired { _clockAddress = clockAddress; _censorAddress = censorAddress; } /** * @dev Update metadata for specific tokens */ function updateTokenMetadata(uint256[] calldata tokenIds, address censorAddress) external adminRequired { for (uint i = 0; i < tokenIds.length; i++) { require(tokenIds[i] > 1 && tokenIds[i] <= _tokenIndex, "Invalid token id"); _tokenCensorAddress[tokenIds[i]] = censorAddress; } } /** * @dev Update royalties */ function updateRoyalties(address payable recipient, uint256 bps) external adminRequired { _royaltyRecipient = recipient; _royaltyBps = bps; } /** * ROYALTY FUNCTIONS */ function getRoyalties(uint256) external view returns (address payable[] memory recipients, uint256[] memory bps) { if (_royaltyRecipient != address(0x0)) { recipients = new address payable[](1); recipients[0] = _royaltyRecipient; bps = new uint256[](1); bps[0] = _royaltyBps; } return (recipients, bps); } function getFeeRecipients(uint256) external view returns (address payable[] memory recipients) { if (_royaltyRecipient != address(0x0)) { recipients = new address payable[](1); recipients[0] = _royaltyRecipient; } return recipients; } function getFeeBps(uint256) external view returns (uint[] memory bps) { if (_royaltyRecipient != address(0x0)) { bps = new uint256[](1); bps[0] = _royaltyBps; } return bps; } function royaltyInfo(uint256, uint256 value) external view returns (address, uint256) { return (_royaltyRecipient, value*_royaltyBps/10000); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IAdminControl.sol"; abstract contract AdminControl is Ownable, IAdminControl, ERC165 { using EnumerableSet for EnumerableSet.AddressSet; // Track registered admins EnumerableSet.AddressSet private _admins; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IAdminControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Only allows approved admins to call the specified function */ modifier adminRequired() { require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin"); _; } /** * @dev See {IAdminControl-getAdmins}. */ function getAdmins() external view override returns (address[] memory admins) { admins = new address[](_admins.length()); for (uint i = 0; i < _admins.length(); i++) { admins[i] = _admins.at(i); } return admins; } /** * @dev See {IAdminControl-approveAdmin}. */ function approveAdmin(address admin) external override onlyOwner { if (!_admins.contains(admin)) { emit AdminApproved(admin, msg.sender); _admins.add(admin); } } /** * @dev See {IAdminControl-revokeAdmin}. */ function revokeAdmin(address admin) external override onlyOwner { if (_admins.contains(admin)) { emit AdminRevoked(admin, msg.sender); _admins.remove(admin); } } /** * @dev See {IAdminControl-isAdmin}. */ function isAdmin(address admin) public override view returns (bool) { return (owner() == admin || _admins.contains(admin)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Interface for admin control */ interface IAdminControl is IERC165 { event AdminApproved(address indexed account, address indexed sender); event AdminRevoked(address indexed account, address indexed sender); /** * @dev gets address of all admins */ function getAdmins() external view returns (address[] memory); /** * @dev add an admin. Can only be called by contract owner. */ function approveAdmin(address admin) external; /** * @dev remove an admin. Can only be called by contract owner. */ function revokeAdmin(address admin) external; /** * @dev checks whether or not given address is an admin * Returns True if they are */ function isAdmin(address admin) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"messageStartTime_","type":"uint256"},{"internalType":"uint256","name":"messageEndTime_","type":"uint256"},{"internalType":"address","name":"clockAddress","type":"address"},{"internalType":"address","name":"censorAddress","type":"address"}],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","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":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"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":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"message_","type":"string"}],"name":"message","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"messageEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"freedom","type":"bool"}],"name":"setFreedom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"clockAddress","type":"address"},{"internalType":"address","name":"censorAddress","type":"address"}],"name":"updateMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"updateRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"censorAddress","type":"address"}],"name":"updateTokenMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"message_","type":"string"}],"name":"validateMessage","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"erc20","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604080518082018252600881526710d95b9cdbdc995960c21b6020808301919091528251808401909352601883527fe29688e29688e29688e29688e29688e29688e29688e296880000000000000000908301526001600055906200007633620000aa565b81516200008b906004906020850190620000fc565b508051620000a1906005906020840190620000fc565b505050620001df565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200010a90620001a2565b90600052602060002090601f0160209004810192826200012e576000855562000179565b82601f106200014957805160ff191683800117855562000179565b8280016001018555821562000179579182015b82811115620001795782518255916020019190600101906200015c565b50620001879291506200018b565b5090565b5b808211156200018757600081556001016200018c565b600181811c90821680620001b757607f821691505b60208210811415620001d957634e487b7160e01b600052602260045260246000fd5b50919050565b61341c80620001ef6000396000f3fe6080604052600436106102345760003560e01c80636d73e66911610138578063b88d4fde116100b0578063d03dd2c71161007f578063e985e9c511610064578063e985e9c514610688578063f2fde38b146106d1578063f3fef3a3146106f157600080fd5b8063d03dd2c714610648578063d9caed121461066857600080fd5b8063b88d4fde146105ad578063b9c4d9fb146105cd578063bb3bafd6146105fa578063c87b56dd1461062857600080fd5b80637b0c22251161010757806395d89b41116100ec57806395d89b4114610562578063a22cb46514610577578063a76241181461059757600080fd5b80637b0c2225146105245780638da5cb5b1461054457600080fd5b80636d73e669146104ab57806370a08231146104cb57806370fa239a146104f9578063715018a61461050f57600080fd5b80632a55205a116101cb57806342842e0e1161019a5780636352211e1161017f5780636352211e1461044b57806363e800711461046b5780636c2f5acd1461048b57600080fd5b806342842e0e1461040b5780635cda79271461042b57600080fd5b80632a55205a1461036a5780632d345670146103a957806331ae450b146103c95780633ccfe0ab146103eb57600080fd5b8063095ea7b311610207578063095ea7b3146102dd5780630ebd4c7f146102fd57806323b872dd1461032a57806324d7806c1461034a57600080fd5b806301ffc9a71461023957806305c766d11461026e57806306fdde0314610283578063081812fc146102a5575b600080fd5b34801561024557600080fd5b50610259610254366004612bac565b610711565b60405190151581526020015b60405180910390f35b61028161027c366004612c76565b610802565b005b34801561028f57600080fd5b506102986109ce565b6040516102659190612d17565b3480156102b157600080fd5b506102c56102c0366004612d2a565b610a60565b6040516001600160a01b039091168152602001610265565b3480156102e957600080fd5b506102816102f8366004612d58565b610af5565b34801561030957600080fd5b5061031d610318366004612d2a565b610c45565b6040516102659190612dbf565b34801561033657600080fd5b50610281610345366004612dd2565b610ca1565b34801561035657600080fd5b50610259610365366004612e13565b610d28565b34801561037657600080fd5b5061038a610385366004612e30565b610d61565b604080516001600160a01b039093168352602083019190915201610265565b3480156103b557600080fd5b506102816103c4366004612e13565b610d9c565b3480156103d557600080fd5b506103de610e4c565b6040516102659190612e52565b3480156103f757600080fd5b50610281610406366004612e9f565b610efb565b34801561041757600080fd5b50610281610426366004612dd2565b610fc6565b34801561043757600080fd5b50610259610446366004612c76565b610fe1565b34801561045757600080fd5b506102c5610466366004612d2a565b61133f565b34801561047757600080fd5b50610281610486366004612f2b565b6113ca565b34801561049757600080fd5b506102816104a6366004612d58565b6114d1565b3480156104b757600080fd5b506102816104c6366004612e13565b61157d565b3480156104d757600080fd5b506104eb6104e6366004612e13565b611627565b604051908152602001610265565b34801561050557600080fd5b506104eb600f5481565b34801561051b57600080fd5b506102816116c1565b34801561053057600080fd5b5061028161053f366004612f82565b611727565b34801561055057600080fd5b506001546001600160a01b03166102c5565b34801561056e57600080fd5b50610298611876565b34801561058357600080fd5b50610281610592366004612fcc565b611885565b3480156105a357600080fd5b506104eb600e5481565b3480156105b957600080fd5b506102816105c8366004612ffa565b611890565b3480156105d957600080fd5b506105ed6105e8366004612d2a565b611918565b60405161026591906130b3565b34801561060657600080fd5b5061061a610615366004612d2a565b611991565b6040516102659291906130c6565b34801561063457600080fd5b50610298610643366004612d2a565b611a45565b34801561065457600080fd5b506102816106633660046130f4565b611c2c565b34801561067457600080fd5b50610281610683366004612dd2565b611dae565b34801561069457600080fd5b506102596106a3366004612e9f565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b3480156106dd57600080fd5b506102816106ec366004612e13565b611ec0565b3480156106fd57600080fd5b5061028161070c366004612d58565b611f9f565b60006001600160e01b031982166380ac58cd60e01b1480610736575061073682612085565b806107455750610745826120ec565b8061076057506001600160e01b03198216635b5e139f60e01b145b8061079457506001600160e01b031982167fbb3bafd600000000000000000000000000000000000000000000000000000000145b806107c857506001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000145b806107fc57506001600160e01b031982167fb779958400000000000000000000000000000000000000000000000000000000145b92915050565b6002600054141561085a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055600e5442108015906108735750600f544211155b801561088257506002600a5410155b806108a457506001546001600160a01b0316331480156108a457506000600a54115b6108f05760405162461bcd60e51b815260206004820152600e60248201527f43616e6e6f74206d6573736167650000000000000000000000000000000000006044820152606401610851565b6108f933611627565b156109465760405162461bcd60e51b815260206004820152601f60248201527f596f75206861766520616c72656164792073656e742061206d657373616765006044820152606401610851565b61094f81610fe1565b50600a805490600061096083613156565b9091555050600a546000908152600b60209081526040909120825161098792840190612b06565b50600a80546000908152600c602090815260408083203490558451858301208352600d9091529020805460ff19166001179055546109c690339061212c565b506001600055565b6060600480546109dd90613171565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0990613171565b8015610a565780601f10610a2b57610100808354040283529160200191610a56565b820191906000526020600020905b815481529060010190602001808311610a3957829003601f168201915b5050505050905090565b6000818152600660205260408120546001600160a01b0316610ad95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610851565b506000908152600860205260409020546001600160a01b031690565b6000610b008261133f565b9050806001600160a01b0316836001600160a01b03161415610b8a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610851565b336001600160a01b0382161480610bc457506001600160a01b038116600090815260096020908152604080832033845290915290205460ff165b610c365760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610851565b610c40838361227a565b505050565b6015546060906001600160a01b031615610c9c57604080516001808252818301909252906020808301908036833701905050905060145481600081518110610c8f57610c8f6131ac565b6020026020010181815250505b919050565b610cab33826122e8565b610d1d5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610851565b610c408383836123df565b6000816001600160a01b0316610d466001546001600160a01b031690565b6001600160a01b031614806107fc57506107fc6002836125b7565b60155460145460009182916001600160a01b039091169061271090610d8690866131c2565b610d9091906131e1565b915091505b9250929050565b6001546001600160a01b03163314610df65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b610e016002826125b7565b15610e495760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610e476002826125dc565b505b50565b6060610e5860026125f1565b67ffffffffffffffff811115610e7057610e70612bc9565b604051908082528060200260200182016040528015610e99578160200160208202803683370190505b50905060005b610ea960026125f1565b811015610ef757610ebb6002826125fb565b828281518110610ecd57610ecd6131ac565b6001600160a01b039092166020928302919091019091015280610eef81613156565b915050610e9f565b5090565b33610f0e6001546001600160a01b031690565b6001600160a01b03161480610f295750610f296002336125b7565b610f815760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b6010805474ffffffffffffffffffffffffffffffffffffffff0019166101006001600160a01b0394851602179055601180546001600160a01b03191691909216179055565b610c4083838360405180602001604052806000815250611890565b805160009082901580159061101c575080600081518110611004576110046131ac565b6020910101516001600160f81b031916600160fd1b14155b801561105a575080600182516110329190613203565b81518110611042576110426131ac565b6020910101516001600160f81b031916600160fd1b14155b6110a65760405162461bcd60e51b815260206004820152601260248201527f496e76616c6964206368617261637465727300000000000000000000000000006044820152606401610851565b6048815111156110f85760405162461bcd60e51b815260206004820152601060248201527f4d65737361676520746f6f206c6f6e67000000000000000000000000000000006044820152606401610851565b80516020808301919091206000818152600d90925260409091205460ff16156111635760405162461bcd60e51b815260206004820152601660248201527f4d65737361676520616c726561647920657869737473000000000000000000006044820152606401610851565b60005b8251811015611334576000838281518110611183576111836131ac565b01602001516001600160f81b03191690507f610000000000000000000000000000000000000000000000000000000000000081108015906111ee57507f7a000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821611155b1580156112095750600160fd1b6001600160f81b0319821614155b156112565760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206368617261637465720000000000000000000000000000006044820152606401610851565b600182101580156112745750600160fd1b6001600160f81b03198216145b80156112ae575083611287600184613203565b81518110611297576112976131ac565b6020910101516001600160f81b031916600160fd1b145b156113215760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f742068617665206d756c7469706c652073657175656e7469616c2060448201527f73706163657300000000000000000000000000000000000000000000000000006064820152608401610851565b508061132c81613156565b915050611166565b506001949350505050565b6000818152600660205260408120546001600160a01b0316806107fc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610851565b336113dd6001546001600160a01b031690565b6001600160a01b031614806113f857506113f86002336125b7565b6114505760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b8161146a576010805482151560ff19909116179055505050565b60005b828110156114cb57816012600086868581811061148c5761148c6131ac565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555080806114c390613156565b91505061146d565b50505050565b336114e46001546001600160a01b031690565b6001600160a01b031614806114ff57506114ff6002336125b7565b6115575760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b601580546001600160a01b0319166001600160a01b039390931692909217909155601455565b6001546001600160a01b031633146115d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b6115e26002826125b7565b610e495760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610e47600282612607565b60006001600160a01b0382166116a55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610851565b506001600160a01b031660009081526007602052604090205490565b6001546001600160a01b0316331461171b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b611725600061261c565b565b3361173a6001546001600160a01b031690565b6001600160a01b0316148061175557506117556002336125b7565b6117ad5760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b600a54156117fd5760405162461bcd60e51b815260206004820152601160248201527f416c7265616479206163746976617465640000000000000000000000000000006044820152606401610851565b600a805490600061180d83613156565b9091555050600e849055600f8390556010805474ffffffffffffffffffffffffffffffffffffffff0019166101006001600160a01b038581169190910291909117909155601180546001600160a01b031916918316919091179055600a546114cb90339061212c565b6060600580546109dd90613171565b610e4733838361266e565b61189a33836122e8565b61190c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610851565b6114cb8484848461273d565b6015546060906001600160a01b031615610c9c576040805160018082528183019092529060208083019080368337505060155482519293506001600160a01b03169183915060009061196c5761196c6131ac565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60155460609081906001600160a01b031615611a40576040805160018082528183019092529060208083019080368337505060155482519294506001600160a01b0316918491506000906119e7576119e76131ac565b6001600160a01b039290921660209283029190910182015260408051600180825281830190925291828101908036833701905050905060145481600081518110611a3357611a336131ac565b6020026020010181815250505b915091565b6000818152600660205260409020546060906001600160a01b0316611ad25760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610851565b8160011415611b5657601060019054906101000a90046001600160a01b03166001600160a01b031663392f37e96040518163ffffffff1660e01b8152600401600060405180830381865afa158015611b2e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107fc919081019061321a565b6000828152601360205260409020546001600160a01b031615611bdf57600082815260136020908152604080832054600b8352818420600c90935292819020549051633e3585fd60e01b81526001600160a01b0390931692633e3585fd92611bc2928792600401613288565b600060405180830381865afa158015611b2e573d6000803e3d6000fd5b6011546000838152600b60209081526040808320600c90925291829020549151633e3585fd60e01b81526001600160a01b0390931692633e3585fd92611bc2928792909190600401613288565b33611c3f6001546001600160a01b031690565b6001600160a01b03161480611c5a5750611c5a6002336125b7565b611cb25760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b60005b828110156114cb576001848483818110611cd157611cd16131ac565b90506020020135118015611cff5750600a54848483818110611cf557611cf56131ac565b9050602002013511155b611d4b5760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420746f6b656e206964000000000000000000000000000000006044820152606401610851565b8160136000868685818110611d6257611d626131ac565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055508080611da690613156565b915050611cb5565b33611dc16001546001600160a01b031690565b6001600160a01b03161480611ddc5750611ddc6002336125b7565b611e345760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015611e9c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cb9190613342565b6001546001600160a01b03163314611f1a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b6001600160a01b038116611f965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610851565b610e498161261c565b33611fb26001546001600160a01b031690565b6001600160a01b03161480611fcd5750611fcd6002336125b7565b6120255760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612072576040519150601f19603f3d011682016040523d82523d6000602084013e612077565b606091505b5050905080610c4057600080fd5b60006001600160e01b031982167f553e757e0000000000000000000000000000000000000000000000000000000014806107fc57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146107fc565b60006001600160e01b031982166380ac58cd60e01b148061211d57506001600160e01b03198216635b5e139f60e01b145b806107fc57506107fc82612085565b6001600160a01b0382166121825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610851565b6000818152600660205260409020546001600160a01b0316156121e75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610851565b6121f3600083836127c6565b6001600160a01b038216600090815260076020526040812080546001929061221c90849061335f565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081815260086020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122af8261133f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600660205260408120546001600160a01b03166123615760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610851565b600061236c8361133f565b9050806001600160a01b0316846001600160a01b031614806123a75750836001600160a01b031661239c84610a60565b6001600160a01b0316145b806123d757506001600160a01b0380821660009081526009602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166123f28261133f565b6001600160a01b03161461246e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610851565b6001600160a01b0382166124e95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610851565b6124f48383836127c6565b6124ff60008261227a565b6001600160a01b0383166000908152600760205260408120805460019290612528908490613203565b90915550506001600160a01b038216600090815260076020526040812080546001929061255690849061335f565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b60006125d5836001600160a01b03841661284e565b60006107fc825490565b60006125d58383612941565b60006125d5836001600160a01b03841661296b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156126d05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610851565b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6127488484846123df565b612754848484846129ba565b6114cb5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610851565b6001600160a01b03831615806127dc5750806001145b806127f5575060008181526012602052604090205460ff165b80612802575060105460ff165b610c405760405162461bcd60e51b815260206004820152601e60248201527f4552433732313a207472616e73666572206e6f74207065726d697474656400006044820152606401610851565b60008181526001830160205260408120548015612937576000612872600183613203565b855490915060009061288690600190613203565b90508181146128eb5760008660000182815481106128a6576128a66131ac565b90600052602060002001549050808760000184815481106128c9576128c96131ac565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806128fc576128fc613377565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107fc565b60009150506107fc565b6000826000018281548110612958576129586131ac565b9060005260206000200154905092915050565b60008181526001830160205260408120546129b2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107fc565b5060006107fc565b60006001600160a01b0384163b1561133457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906129fe90339089908890889060040161338d565b6020604051808303816000875af1925050508015612a39575060408051601f3d908101601f19168201909252612a36918101906133c9565b60015b612ae9573d808015612a67576040519150601f19603f3d011682016040523d82523d6000602084013e612a6c565b606091505b508051612ae15760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610851565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b828054612b1290613171565b90600052602060002090601f016020900481019282612b345760008555612b7a565b82601f10612b4d57805160ff1916838001178555612b7a565b82800160010185558215612b7a579182015b82811115612b7a578251825591602001919060010190612b5f565b50610ef79291505b80821115610ef75760008155600101612b82565b6001600160e01b031981168114610e4957600080fd5b600060208284031215612bbe57600080fd5b81356125d581612b96565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c0857612c08612bc9565b604052919050565b600067ffffffffffffffff821115612c2a57612c2a612bc9565b50601f01601f191660200190565b6000612c4b612c4684612c10565b612bdf565b9050828152838383011115612c5f57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612c8857600080fd5b813567ffffffffffffffff811115612c9f57600080fd5b8201601f81018413612cb057600080fd5b6123d784823560208401612c38565b60005b83811015612cda578181015183820152602001612cc2565b838111156114cb5750506000910152565b60008151808452612d03816020860160208601612cbf565b601f01601f19169290920160200192915050565b6020815260006125d56020830184612ceb565b600060208284031215612d3c57600080fd5b5035919050565b6001600160a01b0381168114610e4957600080fd5b60008060408385031215612d6b57600080fd5b8235612d7681612d43565b946020939093013593505050565b600081518084526020808501945080840160005b83811015612db457815187529582019590820190600101612d98565b509495945050505050565b6020815260006125d56020830184612d84565b600080600060608486031215612de757600080fd5b8335612df281612d43565b92506020840135612e0281612d43565b929592945050506040919091013590565b600060208284031215612e2557600080fd5b81356125d581612d43565b60008060408385031215612e4357600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015612e935783516001600160a01b031683529284019291840191600101612e6e565b50909695505050505050565b60008060408385031215612eb257600080fd5b8235612ebd81612d43565b91506020830135612ecd81612d43565b809150509250929050565b60008083601f840112612eea57600080fd5b50813567ffffffffffffffff811115612f0257600080fd5b6020830191508360208260051b8501011115610d9557600080fd5b8015158114610e4957600080fd5b600080600060408486031215612f4057600080fd5b833567ffffffffffffffff811115612f5757600080fd5b612f6386828701612ed8565b9094509250506020840135612f7781612f1d565b809150509250925092565b60008060008060808587031215612f9857600080fd5b84359350602085013592506040850135612fb181612d43565b91506060850135612fc181612d43565b939692955090935050565b60008060408385031215612fdf57600080fd5b8235612fea81612d43565b91506020830135612ecd81612f1d565b6000806000806080858703121561301057600080fd5b843561301b81612d43565b9350602085013561302b81612d43565b925060408501359150606085013567ffffffffffffffff81111561304e57600080fd5b8501601f8101871361305f57600080fd5b61306e87823560208401612c38565b91505092959194509250565b600081518084526020808501945080840160005b83811015612db45781516001600160a01b03168752958201959082019060010161308e565b6020815260006125d5602083018461307a565b6040815260006130d9604083018561307a565b82810360208401526130eb8185612d84565b95945050505050565b60008060006040848603121561310957600080fd5b833567ffffffffffffffff81111561312057600080fd5b61312c86828701612ed8565b9094509250506020840135612f7781612d43565b634e487b7160e01b600052601160045260246000fd5b600060001982141561316a5761316a613140565b5060010190565b600181811c9082168061318557607f821691505b602082108114156131a657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008160001904831182151516156131dc576131dc613140565b500290565b6000826131fe57634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561321557613215613140565b500390565b60006020828403121561322c57600080fd5b815167ffffffffffffffff81111561324357600080fd5b8201601f8101841361325457600080fd5b8051613262612c4682612c10565b81815285602083850101111561327757600080fd5b6130eb826020830160208601612cbf565b838152600060206060818401526000855481600182811c9150808316806132b057607f831692505b8583108114156132ce57634e487b7160e01b85526022600452602485fd5b60608801839052608088018180156132ed57600181146132fe57613329565b60ff19861682528782019650613329565b60008c81526020902060005b868110156133235781548482015290850190890161330a565b83019750505b5050505050508092505050826040830152949350505050565b60006020828403121561335457600080fd5b81516125d581612f1d565b6000821982111561337257613372613140565b500190565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b038087168352808616602084015250836040830152608060608301526133bf6080830184612ceb565b9695505050505050565b6000602082840312156133db57600080fd5b81516125d581612b9656fea26469706673582212207fe35e8b9351c0c64b3bacdcffea6ec4851896571c7f270ae784758d4b5de02264736f6c634300080b0033
Deployed Bytecode
0x6080604052600436106102345760003560e01c80636d73e66911610138578063b88d4fde116100b0578063d03dd2c71161007f578063e985e9c511610064578063e985e9c514610688578063f2fde38b146106d1578063f3fef3a3146106f157600080fd5b8063d03dd2c714610648578063d9caed121461066857600080fd5b8063b88d4fde146105ad578063b9c4d9fb146105cd578063bb3bafd6146105fa578063c87b56dd1461062857600080fd5b80637b0c22251161010757806395d89b41116100ec57806395d89b4114610562578063a22cb46514610577578063a76241181461059757600080fd5b80637b0c2225146105245780638da5cb5b1461054457600080fd5b80636d73e669146104ab57806370a08231146104cb57806370fa239a146104f9578063715018a61461050f57600080fd5b80632a55205a116101cb57806342842e0e1161019a5780636352211e1161017f5780636352211e1461044b57806363e800711461046b5780636c2f5acd1461048b57600080fd5b806342842e0e1461040b5780635cda79271461042b57600080fd5b80632a55205a1461036a5780632d345670146103a957806331ae450b146103c95780633ccfe0ab146103eb57600080fd5b8063095ea7b311610207578063095ea7b3146102dd5780630ebd4c7f146102fd57806323b872dd1461032a57806324d7806c1461034a57600080fd5b806301ffc9a71461023957806305c766d11461026e57806306fdde0314610283578063081812fc146102a5575b600080fd5b34801561024557600080fd5b50610259610254366004612bac565b610711565b60405190151581526020015b60405180910390f35b61028161027c366004612c76565b610802565b005b34801561028f57600080fd5b506102986109ce565b6040516102659190612d17565b3480156102b157600080fd5b506102c56102c0366004612d2a565b610a60565b6040516001600160a01b039091168152602001610265565b3480156102e957600080fd5b506102816102f8366004612d58565b610af5565b34801561030957600080fd5b5061031d610318366004612d2a565b610c45565b6040516102659190612dbf565b34801561033657600080fd5b50610281610345366004612dd2565b610ca1565b34801561035657600080fd5b50610259610365366004612e13565b610d28565b34801561037657600080fd5b5061038a610385366004612e30565b610d61565b604080516001600160a01b039093168352602083019190915201610265565b3480156103b557600080fd5b506102816103c4366004612e13565b610d9c565b3480156103d557600080fd5b506103de610e4c565b6040516102659190612e52565b3480156103f757600080fd5b50610281610406366004612e9f565b610efb565b34801561041757600080fd5b50610281610426366004612dd2565b610fc6565b34801561043757600080fd5b50610259610446366004612c76565b610fe1565b34801561045757600080fd5b506102c5610466366004612d2a565b61133f565b34801561047757600080fd5b50610281610486366004612f2b565b6113ca565b34801561049757600080fd5b506102816104a6366004612d58565b6114d1565b3480156104b757600080fd5b506102816104c6366004612e13565b61157d565b3480156104d757600080fd5b506104eb6104e6366004612e13565b611627565b604051908152602001610265565b34801561050557600080fd5b506104eb600f5481565b34801561051b57600080fd5b506102816116c1565b34801561053057600080fd5b5061028161053f366004612f82565b611727565b34801561055057600080fd5b506001546001600160a01b03166102c5565b34801561056e57600080fd5b50610298611876565b34801561058357600080fd5b50610281610592366004612fcc565b611885565b3480156105a357600080fd5b506104eb600e5481565b3480156105b957600080fd5b506102816105c8366004612ffa565b611890565b3480156105d957600080fd5b506105ed6105e8366004612d2a565b611918565b60405161026591906130b3565b34801561060657600080fd5b5061061a610615366004612d2a565b611991565b6040516102659291906130c6565b34801561063457600080fd5b50610298610643366004612d2a565b611a45565b34801561065457600080fd5b506102816106633660046130f4565b611c2c565b34801561067457600080fd5b50610281610683366004612dd2565b611dae565b34801561069457600080fd5b506102596106a3366004612e9f565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b3480156106dd57600080fd5b506102816106ec366004612e13565b611ec0565b3480156106fd57600080fd5b5061028161070c366004612d58565b611f9f565b60006001600160e01b031982166380ac58cd60e01b1480610736575061073682612085565b806107455750610745826120ec565b8061076057506001600160e01b03198216635b5e139f60e01b145b8061079457506001600160e01b031982167fbb3bafd600000000000000000000000000000000000000000000000000000000145b806107c857506001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000145b806107fc57506001600160e01b031982167fb779958400000000000000000000000000000000000000000000000000000000145b92915050565b6002600054141561085a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055600e5442108015906108735750600f544211155b801561088257506002600a5410155b806108a457506001546001600160a01b0316331480156108a457506000600a54115b6108f05760405162461bcd60e51b815260206004820152600e60248201527f43616e6e6f74206d6573736167650000000000000000000000000000000000006044820152606401610851565b6108f933611627565b156109465760405162461bcd60e51b815260206004820152601f60248201527f596f75206861766520616c72656164792073656e742061206d657373616765006044820152606401610851565b61094f81610fe1565b50600a805490600061096083613156565b9091555050600a546000908152600b60209081526040909120825161098792840190612b06565b50600a80546000908152600c602090815260408083203490558451858301208352600d9091529020805460ff19166001179055546109c690339061212c565b506001600055565b6060600480546109dd90613171565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0990613171565b8015610a565780601f10610a2b57610100808354040283529160200191610a56565b820191906000526020600020905b815481529060010190602001808311610a3957829003601f168201915b5050505050905090565b6000818152600660205260408120546001600160a01b0316610ad95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610851565b506000908152600860205260409020546001600160a01b031690565b6000610b008261133f565b9050806001600160a01b0316836001600160a01b03161415610b8a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610851565b336001600160a01b0382161480610bc457506001600160a01b038116600090815260096020908152604080832033845290915290205460ff165b610c365760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610851565b610c40838361227a565b505050565b6015546060906001600160a01b031615610c9c57604080516001808252818301909252906020808301908036833701905050905060145481600081518110610c8f57610c8f6131ac565b6020026020010181815250505b919050565b610cab33826122e8565b610d1d5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610851565b610c408383836123df565b6000816001600160a01b0316610d466001546001600160a01b031690565b6001600160a01b031614806107fc57506107fc6002836125b7565b60155460145460009182916001600160a01b039091169061271090610d8690866131c2565b610d9091906131e1565b915091505b9250929050565b6001546001600160a01b03163314610df65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b610e016002826125b7565b15610e495760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610e476002826125dc565b505b50565b6060610e5860026125f1565b67ffffffffffffffff811115610e7057610e70612bc9565b604051908082528060200260200182016040528015610e99578160200160208202803683370190505b50905060005b610ea960026125f1565b811015610ef757610ebb6002826125fb565b828281518110610ecd57610ecd6131ac565b6001600160a01b039092166020928302919091019091015280610eef81613156565b915050610e9f565b5090565b33610f0e6001546001600160a01b031690565b6001600160a01b03161480610f295750610f296002336125b7565b610f815760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b6010805474ffffffffffffffffffffffffffffffffffffffff0019166101006001600160a01b0394851602179055601180546001600160a01b03191691909216179055565b610c4083838360405180602001604052806000815250611890565b805160009082901580159061101c575080600081518110611004576110046131ac565b6020910101516001600160f81b031916600160fd1b14155b801561105a575080600182516110329190613203565b81518110611042576110426131ac565b6020910101516001600160f81b031916600160fd1b14155b6110a65760405162461bcd60e51b815260206004820152601260248201527f496e76616c6964206368617261637465727300000000000000000000000000006044820152606401610851565b6048815111156110f85760405162461bcd60e51b815260206004820152601060248201527f4d65737361676520746f6f206c6f6e67000000000000000000000000000000006044820152606401610851565b80516020808301919091206000818152600d90925260409091205460ff16156111635760405162461bcd60e51b815260206004820152601660248201527f4d65737361676520616c726561647920657869737473000000000000000000006044820152606401610851565b60005b8251811015611334576000838281518110611183576111836131ac565b01602001516001600160f81b03191690507f610000000000000000000000000000000000000000000000000000000000000081108015906111ee57507f7a000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821611155b1580156112095750600160fd1b6001600160f81b0319821614155b156112565760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964206368617261637465720000000000000000000000000000006044820152606401610851565b600182101580156112745750600160fd1b6001600160f81b03198216145b80156112ae575083611287600184613203565b81518110611297576112976131ac565b6020910101516001600160f81b031916600160fd1b145b156113215760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f742068617665206d756c7469706c652073657175656e7469616c2060448201527f73706163657300000000000000000000000000000000000000000000000000006064820152608401610851565b508061132c81613156565b915050611166565b506001949350505050565b6000818152600660205260408120546001600160a01b0316806107fc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610851565b336113dd6001546001600160a01b031690565b6001600160a01b031614806113f857506113f86002336125b7565b6114505760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b8161146a576010805482151560ff19909116179055505050565b60005b828110156114cb57816012600086868581811061148c5761148c6131ac565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555080806114c390613156565b91505061146d565b50505050565b336114e46001546001600160a01b031690565b6001600160a01b031614806114ff57506114ff6002336125b7565b6115575760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b601580546001600160a01b0319166001600160a01b039390931692909217909155601455565b6001546001600160a01b031633146115d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b6115e26002826125b7565b610e495760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610e47600282612607565b60006001600160a01b0382166116a55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610851565b506001600160a01b031660009081526007602052604090205490565b6001546001600160a01b0316331461171b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b611725600061261c565b565b3361173a6001546001600160a01b031690565b6001600160a01b0316148061175557506117556002336125b7565b6117ad5760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b600a54156117fd5760405162461bcd60e51b815260206004820152601160248201527f416c7265616479206163746976617465640000000000000000000000000000006044820152606401610851565b600a805490600061180d83613156565b9091555050600e849055600f8390556010805474ffffffffffffffffffffffffffffffffffffffff0019166101006001600160a01b038581169190910291909117909155601180546001600160a01b031916918316919091179055600a546114cb90339061212c565b6060600580546109dd90613171565b610e4733838361266e565b61189a33836122e8565b61190c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610851565b6114cb8484848461273d565b6015546060906001600160a01b031615610c9c576040805160018082528183019092529060208083019080368337505060155482519293506001600160a01b03169183915060009061196c5761196c6131ac565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60155460609081906001600160a01b031615611a40576040805160018082528183019092529060208083019080368337505060155482519294506001600160a01b0316918491506000906119e7576119e76131ac565b6001600160a01b039290921660209283029190910182015260408051600180825281830190925291828101908036833701905050905060145481600081518110611a3357611a336131ac565b6020026020010181815250505b915091565b6000818152600660205260409020546060906001600160a01b0316611ad25760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610851565b8160011415611b5657601060019054906101000a90046001600160a01b03166001600160a01b031663392f37e96040518163ffffffff1660e01b8152600401600060405180830381865afa158015611b2e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107fc919081019061321a565b6000828152601360205260409020546001600160a01b031615611bdf57600082815260136020908152604080832054600b8352818420600c90935292819020549051633e3585fd60e01b81526001600160a01b0390931692633e3585fd92611bc2928792600401613288565b600060405180830381865afa158015611b2e573d6000803e3d6000fd5b6011546000838152600b60209081526040808320600c90925291829020549151633e3585fd60e01b81526001600160a01b0390931692633e3585fd92611bc2928792909190600401613288565b33611c3f6001546001600160a01b031690565b6001600160a01b03161480611c5a5750611c5a6002336125b7565b611cb25760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b60005b828110156114cb576001848483818110611cd157611cd16131ac565b90506020020135118015611cff5750600a54848483818110611cf557611cf56131ac565b9050602002013511155b611d4b5760405162461bcd60e51b815260206004820152601060248201527f496e76616c696420746f6b656e206964000000000000000000000000000000006044820152606401610851565b8160136000868685818110611d6257611d626131ac565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055508080611da690613156565b915050611cb5565b33611dc16001546001600160a01b031690565b6001600160a01b03161480611ddc5750611ddc6002336125b7565b611e345760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820183905283169063a9059cbb906044016020604051808303816000875af1158015611e9c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114cb9190613342565b6001546001600160a01b03163314611f1a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610851565b6001600160a01b038116611f965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610851565b610e498161261c565b33611fb26001546001600160a01b031690565b6001600160a01b03161480611fcd5750611fcd6002336125b7565b6120255760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b6064820152608401610851565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612072576040519150601f19603f3d011682016040523d82523d6000602084013e612077565b606091505b5050905080610c4057600080fd5b60006001600160e01b031982167f553e757e0000000000000000000000000000000000000000000000000000000014806107fc57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146107fc565b60006001600160e01b031982166380ac58cd60e01b148061211d57506001600160e01b03198216635b5e139f60e01b145b806107fc57506107fc82612085565b6001600160a01b0382166121825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610851565b6000818152600660205260409020546001600160a01b0316156121e75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610851565b6121f3600083836127c6565b6001600160a01b038216600090815260076020526040812080546001929061221c90849061335f565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081815260086020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122af8261133f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600660205260408120546001600160a01b03166123615760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610851565b600061236c8361133f565b9050806001600160a01b0316846001600160a01b031614806123a75750836001600160a01b031661239c84610a60565b6001600160a01b0316145b806123d757506001600160a01b0380821660009081526009602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166123f28261133f565b6001600160a01b03161461246e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610851565b6001600160a01b0382166124e95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610851565b6124f48383836127c6565b6124ff60008261227a565b6001600160a01b0383166000908152600760205260408120805460019290612528908490613203565b90915550506001600160a01b038216600090815260076020526040812080546001929061255690849061335f565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b60006125d5836001600160a01b03841661284e565b60006107fc825490565b60006125d58383612941565b60006125d5836001600160a01b03841661296b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156126d05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610851565b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6127488484846123df565b612754848484846129ba565b6114cb5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610851565b6001600160a01b03831615806127dc5750806001145b806127f5575060008181526012602052604090205460ff165b80612802575060105460ff165b610c405760405162461bcd60e51b815260206004820152601e60248201527f4552433732313a207472616e73666572206e6f74207065726d697474656400006044820152606401610851565b60008181526001830160205260408120548015612937576000612872600183613203565b855490915060009061288690600190613203565b90508181146128eb5760008660000182815481106128a6576128a66131ac565b90600052602060002001549050808760000184815481106128c9576128c96131ac565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806128fc576128fc613377565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107fc565b60009150506107fc565b6000826000018281548110612958576129586131ac565b9060005260206000200154905092915050565b60008181526001830160205260408120546129b2575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107fc565b5060006107fc565b60006001600160a01b0384163b1561133457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906129fe90339089908890889060040161338d565b6020604051808303816000875af1925050508015612a39575060408051601f3d908101601f19168201909252612a36918101906133c9565b60015b612ae9573d808015612a67576040519150601f19603f3d011682016040523d82523d6000602084013e612a6c565b606091505b508051612ae15760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610851565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b828054612b1290613171565b90600052602060002090601f016020900481019282612b345760008555612b7a565b82601f10612b4d57805160ff1916838001178555612b7a565b82800160010185558215612b7a579182015b82811115612b7a578251825591602001919060010190612b5f565b50610ef79291505b80821115610ef75760008155600101612b82565b6001600160e01b031981168114610e4957600080fd5b600060208284031215612bbe57600080fd5b81356125d581612b96565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612c0857612c08612bc9565b604052919050565b600067ffffffffffffffff821115612c2a57612c2a612bc9565b50601f01601f191660200190565b6000612c4b612c4684612c10565b612bdf565b9050828152838383011115612c5f57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612c8857600080fd5b813567ffffffffffffffff811115612c9f57600080fd5b8201601f81018413612cb057600080fd5b6123d784823560208401612c38565b60005b83811015612cda578181015183820152602001612cc2565b838111156114cb5750506000910152565b60008151808452612d03816020860160208601612cbf565b601f01601f19169290920160200192915050565b6020815260006125d56020830184612ceb565b600060208284031215612d3c57600080fd5b5035919050565b6001600160a01b0381168114610e4957600080fd5b60008060408385031215612d6b57600080fd5b8235612d7681612d43565b946020939093013593505050565b600081518084526020808501945080840160005b83811015612db457815187529582019590820190600101612d98565b509495945050505050565b6020815260006125d56020830184612d84565b600080600060608486031215612de757600080fd5b8335612df281612d43565b92506020840135612e0281612d43565b929592945050506040919091013590565b600060208284031215612e2557600080fd5b81356125d581612d43565b60008060408385031215612e4357600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015612e935783516001600160a01b031683529284019291840191600101612e6e565b50909695505050505050565b60008060408385031215612eb257600080fd5b8235612ebd81612d43565b91506020830135612ecd81612d43565b809150509250929050565b60008083601f840112612eea57600080fd5b50813567ffffffffffffffff811115612f0257600080fd5b6020830191508360208260051b8501011115610d9557600080fd5b8015158114610e4957600080fd5b600080600060408486031215612f4057600080fd5b833567ffffffffffffffff811115612f5757600080fd5b612f6386828701612ed8565b9094509250506020840135612f7781612f1d565b809150509250925092565b60008060008060808587031215612f9857600080fd5b84359350602085013592506040850135612fb181612d43565b91506060850135612fc181612d43565b939692955090935050565b60008060408385031215612fdf57600080fd5b8235612fea81612d43565b91506020830135612ecd81612f1d565b6000806000806080858703121561301057600080fd5b843561301b81612d43565b9350602085013561302b81612d43565b925060408501359150606085013567ffffffffffffffff81111561304e57600080fd5b8501601f8101871361305f57600080fd5b61306e87823560208401612c38565b91505092959194509250565b600081518084526020808501945080840160005b83811015612db45781516001600160a01b03168752958201959082019060010161308e565b6020815260006125d5602083018461307a565b6040815260006130d9604083018561307a565b82810360208401526130eb8185612d84565b95945050505050565b60008060006040848603121561310957600080fd5b833567ffffffffffffffff81111561312057600080fd5b61312c86828701612ed8565b9094509250506020840135612f7781612d43565b634e487b7160e01b600052601160045260246000fd5b600060001982141561316a5761316a613140565b5060010190565b600181811c9082168061318557607f821691505b602082108114156131a657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60008160001904831182151516156131dc576131dc613140565b500290565b6000826131fe57634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561321557613215613140565b500390565b60006020828403121561322c57600080fd5b815167ffffffffffffffff81111561324357600080fd5b8201601f8101841361325457600080fd5b8051613262612c4682612c10565b81815285602083850101111561327757600080fd5b6130eb826020830160208601612cbf565b838152600060206060818401526000855481600182811c9150808316806132b057607f831692505b8583108114156132ce57634e487b7160e01b85526022600452602485fd5b60608801839052608088018180156132ed57600181146132fe57613329565b60ff19861682528782019650613329565b60008c81526020902060005b868110156133235781548482015290850190890161330a565b83019750505b5050505050508092505050826040830152949350505050565b60006020828403121561335457600080fd5b81516125d581612f1d565b6000821982111561337257613372613140565b500190565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b038087168352808616602084015250836040830152608060608301526133bf6080830184612ceb565b9695505050505050565b6000602082840312156133db57600080fd5b81516125d581612b9656fea26469706673582212207fe35e8b9351c0c64b3bacdcffea6ec4851896571c7f270ae784758d4b5de02264736f6c634300080b0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.