Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
243 POV
Holders
207
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 POVLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ProofOfVisit
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {IProofOfVisit} from "./interfaces/IProofOfVisit.sol"; import {IRenderer} from "./interfaces/IRenderer.sol"; import {Util} from "./Util.sol"; contract ProofOfVisit is IProofOfVisit, ERC721, ERC2981, Ownable, Util { uint256 public totalSupply; string public description; string public baseExternalUrl; mapping(uint16 => IProofOfVisit.Exhibition) public exhibitions; mapping(uint256 => IProofOfVisit.TokenAttribute) public tokenAttributes; mapping(bytes32 => bool) public mintedHash; uint16 public saleExhibitionIndex; uint256 public salePrice; bool public saleEnabled; address public minter; constructor() ERC721("Proof of Visit", "POV") {} function setExhibition(uint16 exhibitionIndex, string memory name, uint64 startTime, uint64 endTime, address rendererAddress) external onlyOwner { exhibitions[exhibitionIndex] = IProofOfVisit.Exhibition(name, startTime, endTime, rendererAddress); } function setDescription(string memory desc) external onlyOwner { description = desc; } function setBaseExternalUrl(string memory url) external onlyOwner { baseExternalUrl = url; } function setRoyalty(address royaltyReceiver, uint96 royaltyFeeNumerator) external onlyOwner { _setDefaultRoyalty(royaltyReceiver, royaltyFeeNumerator); } function setSale(uint16 exhibitionIndex, uint256 price, bool enabled) external onlyOwner { saleExhibitionIndex = exhibitionIndex; salePrice = price; saleEnabled = enabled; } function setMinter(address newMinter) external onlyOwner { minter = newMinter; } function withdrawETH(address payable recipient) external onlyOwner { Address.sendValue(recipient, address(this).balance); } function setRole(uint256 tokenId, string memory role) external onlyOwner { tokenAttributes[tokenId].role = role; } function mintByOwner(uint16 exhibitionIndex, string memory name, string memory role, address toAddress, bytes32 hash, bool withPermit) external onlyOwner { require(mintedHash[hash] == false, "minted hash"); mintedHash[hash] = true; uint256 tokenId = ++totalSupply + (exhibitionIndex * 1000000); address minterAddress = _msgSender(); uint64 mintedAt = uint64(block.timestamp); bytes32 seed = keccak256(abi.encodePacked(blockhash(block.number - 1), toAddress)); tokenAttributes[tokenId] = IProofOfVisit.TokenAttribute(name, role, minterAddress, mintedAt, seed, exhibitionIndex); _mint(toAddress, tokenId); if (withPermit){ _approve(owner(), tokenId); } } function mint(uint16 exhibitionIndex, string memory name, bytes32 mintCodeHash, bytes32 hash, bytes memory sig) external { require(keccak256(abi.encodePacked(_msgSender(), mintCodeHash)) == hash, "invalid hash"); require(ECDSA.recover(ECDSA.toEthSignedMessageHash(hash), sig) == minter, "invalid sig"); require(mintedHash[hash] == false, "minted hash"); mintedHash[hash] = true; uint256 tokenId = ++totalSupply + (exhibitionIndex * 1000000); address minterAddress = _msgSender(); uint64 mintedAt = uint64(block.timestamp); bytes32 seed = keccak256(abi.encodePacked(blockhash(block.number - 1), minterAddress)); tokenAttributes[tokenId] = IProofOfVisit.TokenAttribute(name, "", minterAddress, mintedAt, seed, exhibitionIndex); _mint(_msgSender(), tokenId); } function buy(address toAddress) external payable { require(saleEnabled, "not on sale"); require(msg.value == salePrice, "invalid value"); uint256 tokenId = ++totalSupply + (saleExhibitionIndex * 1000000); address minterAddress = _msgSender(); uint64 mintedAt = uint64(block.timestamp); bytes32 seed = keccak256(abi.encodePacked(blockhash(block.number - 1), toAddress)); tokenAttributes[tokenId] = IProofOfVisit.TokenAttribute("", "", minterAddress, mintedAt, seed, saleExhibitionIndex); _mint(toAddress, tokenId); } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "not exists"); return string.concat("data:application/json;utf8,", getMetadata(tokenId)); } function getMetadata(uint256 tokenId) private view returns (string memory) { IProofOfVisit.TokenAttribute memory tokenAttribute = tokenAttributes[tokenId]; IProofOfVisit.Exhibition memory exhibition = exhibitions[tokenAttribute.exhibitionIndex]; IRenderer renderer = IRenderer(exhibition.rendererAddress); return string.concat( '{"name":"Proof of Visit #', Strings.toString(tokenId), '","description":"', description, '","image":"', renderer.imageUrl(tokenId), '","animation_url":"', renderer.animationUrl(tokenId, tokenAttribute), '","external_url":"', baseExternalUrl, Strings.toString(tokenId), '","attributes":[{"trait_type":"Exhibition Name","value":"', exhibition.name, '"},{"display_type":"date","trait_type":"Exhibition Start Time","value":"', Strings.toString(uint256(exhibition.startTime)), '"},{"display_type":"date","trait_type":"Exhibition End Time","value":"', Strings.toString(uint256(exhibition.endTime)), '"},{"trait_type":"Name","value":"', escapeString(tokenAttribute.name), '"},{"trait_type":"Role","value":"', tokenAttribute.role, '"},{"trait_type":"Minter Address","value":"', Strings.toHexString(tokenAttribute.minterAddress), '"},{"display_type":"date","trait_type":"Minted At","value":"', Strings.toString(uint256(tokenAttribute.mintedAt)), '"},{"trait_type":"Seed","value":"', "0x", bytes32ToString(tokenAttribute.seed), '"}]}' ); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC2981) returns (bool) { return ERC721.supportsInterface(interfaceId) || super.supportsInterface(interfaceId); } function getTokenAttributes(uint256[] memory tokenIds) public view returns (IProofOfVisit.TokenAttribute[] memory) { IProofOfVisit.TokenAttribute[] memory result = new IProofOfVisit.TokenAttribute[](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; i++) { result[i] = tokenAttributes[tokenIds[i]]; } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.2) (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: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); 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) { _requireMinted(tokenId); 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 overridden 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 token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @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 from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; interface IProofOfVisit { struct TokenAttribute { string name; string role; address minterAddress; uint64 mintedAt; bytes32 seed; uint16 exhibitionIndex; } struct Exhibition { string name; uint64 startTime; uint64 endTime; address rendererAddress; } function setExhibition(uint16 exhibitionIndex, string memory name, uint64 startTime, uint64 endTime, address rendererAddress) external; function setDescription(string memory desc) external; function setBaseExternalUrl(string memory url) external; function setRoyalty(address royaltyReceiver, uint96 royaltyFeeNumerator) external; function setSale(uint16 exhibitionIndex, uint256 price, bool enabled) external; function withdrawETH(address payable recipient) external; function mintByOwner(uint16 exhibitionIndex, string memory name, string memory role, address toAddress, bytes32 hash, bool withPermit) external; function mint(uint16 exhibitionIndex, string memory name, bytes32 mintCodeHash, bytes32 hash, bytes memory sig) external; function buy(address toAddress) external payable; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import {IProofOfVisit} from "./IProofOfVisit.sol"; interface IRenderer { function imageUrl(uint256 tokenId) external view returns (string memory); function animationUrl(uint256 tokenId, IProofOfVisit.TokenAttribute memory tokenAttribute) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; contract Util { function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) { uint8 i = 0; bytes memory bytesArray = new bytes(64); for (i = 0; i < bytesArray.length; i++) { uint8 _f = uint8(_bytes32[i/2] & 0x0f); uint8 _l = uint8(_bytes32[i/2] >> 4); bytesArray[i] = toByte(_f); i = i + 1; bytesArray[i] = toByte(_l); } return string(bytesArray); } function toByte(uint8 _uint8) public pure returns (bytes1) { if(_uint8 < 10) { return bytes1(_uint8 + 48); } else { return bytes1(_uint8 + 87); } } function escapeString(string memory str) public pure returns (string memory) { bytes memory strBytes = bytes(str); bytes memory result = new bytes(strBytes.length); for (uint i = 0; i < strBytes.length; i++) { result[i] = strBytes[i]; if (result[i] == bytes('"')[0]) { result[i] = bytes("'")[0]; } } return string(result); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExternalUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"toAddress","type":"address"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_bytes32","type":"bytes32"}],"name":"bytes32ToString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"escapeString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"exhibitions","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"address","name":"rendererAddress","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":"tokenIds","type":"uint256[]"}],"name":"getTokenAttributes","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"role","type":"string"},{"internalType":"address","name":"minterAddress","type":"address"},{"internalType":"uint64","name":"mintedAt","type":"uint64"},{"internalType":"bytes32","name":"seed","type":"bytes32"},{"internalType":"uint16","name":"exhibitionIndex","type":"uint16"}],"internalType":"struct IProofOfVisit.TokenAttribute[]","name":"","type":"tuple[]"}],"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":"uint16","name":"exhibitionIndex","type":"uint16"},{"internalType":"string","name":"name","type":"string"},{"internalType":"bytes32","name":"mintCodeHash","type":"bytes32"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"exhibitionIndex","type":"uint16"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"role","type":"string"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bool","name":"withPermit","type":"bool"}],"name":"mintByOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"mintedHash","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleExhibitionIndex","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"salePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"url","type":"string"}],"name":"setBaseExternalUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"desc","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"exhibitionIndex","type":"uint16"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"address","name":"rendererAddress","type":"address"}],"name":"setExhibition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newMinter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"role","type":"string"}],"name":"setRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"uint96","name":"royaltyFeeNumerator","type":"uint96"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"exhibitionIndex","type":"uint16"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setSale","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":"uint8","name":"_uint8","type":"uint8"}],"name":"toByte","outputs":[{"internalType":"bytes1","name":"","type":"bytes1"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenAttributes","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"role","type":"string"},{"internalType":"address","name":"minterAddress","type":"address"},{"internalType":"uint64","name":"mintedAt","type":"uint64"},{"internalType":"bytes32","name":"seed","type":"bytes32"},{"internalType":"uint16","name":"exhibitionIndex","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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 payable","name":"recipient","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080346200035b576001600160401b039060408181018381118382101762000345578152600e82526020916d141c9bdbd9881bd988159a5cda5d60921b83820152815193828501858110828211176200034557835260038552622827ab60e91b84860152815181811162000345576000948554916001948584811c941680156200033a575b8385101462000326578190601f94858111620002d3575b5083908583116001146200026f57899262000263575b5050600019600383901b1c191690851b1786555b86519283116200024f5783548481811c9116801562000244575b828210146200023057828111620001e8575b50809183116001146200018157508495829394959262000175575b5050600019600383901b1c191690821b1790555b60088054336001600160a01b03198216811790925591519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3613f0c9081620003618239f35b0151905038806200010c565b90601f198316968487528287209287905b898210620001d0575050838596979810620001b6575b505050811b01905562000120565b015160001960f88460031b161c19169055388080620001a8565b80878596829496860151815501950193019062000192565b8487528187208380860160051c82019284871062000226575b0160051c019085905b8281106200021a575050620000f1565b8881550185906200020a565b9250819262000201565b634e487b7160e01b87526022600452602487fd5b90607f1690620000df565b634e487b7160e01b86526041600452602486fd5b015190503880620000b1565b898052848a208894509190601f1984168b5b87828210620002bc5750508411620002a2575b505050811b018655620000c5565b015160001960f88460031b161c1916905538808062000294565b8385015186558b9790950194938401930162000281565b9091508880528389208580850160051c8201928686106200031c575b918991869594930160051c01915b8281106200030d5750506200009b565b8b8155859450899101620002fd565b92508192620002ef565b634e487b7160e01b88526022600452602488fd5b93607f169362000084565b634e487b7160e01b600052604160045260246000fd5b600080fdfe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a714612e0e5750806306fdde0314612d6b5780630754617214612d3e578063081812fc14612d20578063095ea7b314612bef5780630d1dcac514612b6d57806318160ddd14612b4f5780631fc916e514612b1e57806323b872dd14612af55780632a55205a14612a4957806342842e0e14612a21578063446d4930146129ff578063447edb50146125e35780636352211e146125b3578063690d8320146124b357806370a082311461241c578063715018a6146123bf57806371b9b6461461239c5780637284e416146123085780638da5cb5b146122df5780638f2fc60b146121d557806390c3f38f146120805780639201de551461206157806395d89b4114611fbe5780639bd02aa014611add578063a22cb46514611a0b578063a86b73f0146119cf578063ac79f96114611994578063b1945a491461183d578063b5e31d27146117e4578063b88d4fde14611796578063c506301d14611641578063c87b56dd14610d2f578063dc1e184a14610b32578063e985e9c514610adc578063f088d547146106b7578063f2824b5314610615578063f2fde38b14610551578063f51f96dd14610533578063f56026af1461045f578063f6c925841461023a5763fca3b5aa146101ed57600080fd5b3461023557602036600319011261023557610206612eea565b61020e6131c4565b60118054610100600160a81b03191660089290921b610100600160a81b0316919091179055005b600080fd5b346102355760a036600319011261023557610253612f16565b6001600160401b03602435818111610235576102739036906004016130ff565b90604435918183168093036102355760643592828416809403610235576001600160a01b0360843581811695919490869003610235576102b16131c4565b604051936102be85612f97565b845261ffff602097888601948552604086019384526060860197885216600052600c87526040600020935196875190828211610449576102fe8654612f27565b601f8111610403575b5080601f831160011461039657508190600297989960009261038b575b50508160011b916000199060031b1c19161784555b600184019251166fffffffffffffffff00000000000000008354925160401b16916fffffffffffffffffffffffffffffffff191617179055019151166001600160601b0360a01b825416179055600080f35b015190508980610324565b9198601f198a168760005283600020936000905b8282106103eb57505091600193918b60029a9b9c94106103d2575b505050811b018455610339565b015160001960f88460031b161c191690558980806103c5565b806001869782949787015181550196019401906103aa565b8660005281600020601f840160051c81019183851061043f575b601f0160051c01905b8181106104335750610307565b60008155600101610426565b909150819061041d565b634e487b7160e01b600052604160045260246000fd5b34610235576000366003190112610235576040516000600b5461048181612f27565b8084529060019081811690811561050c57506001146104c3575b6104bf846104ab81860382612fe8565b604051918291602083526020830190612ec5565b0390f35b600b60009081529250600080516020613eb78339815191525b8284106104f45750505081016020016104ab8261049b565b805460208587018101919091529093019281016104dc565b60ff191660208087019190915292151560051b850190920192506104ab915083905061049b565b34610235576000366003190112610235576020601054604051908152f35b346102355760203660031901126102355761056a612eea565b6105726131c4565b6001600160a01b039081169081156105c157600854826001600160601b0360a01b821617600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b3461023557602036600319011261023557600435600052600d602052610683604060002061064281613009565b9061064f60018201613009565b6002820154916001600160401b0361069161ffff60046003850154940154169360405197889760c0895260c0890190612ec5565b908782036020890152612ec5565b9360018060a01b038116604087015260a01c166060850152608084015260a08301520390f35b6020366003190112610235576106cb612eea565b60ff6011541615610aa9576010543403610a74576106ea600954613768565b908160095561070e61ffff600f54169262ffffff61070785613777565b1690613790565b906000194301438111610a5e576040516107598161074b8560208301954086909160349282526001600160601b03199060601b1660208201520190565b03601f198101835282612fe8565b519020926040519361076a85612f61565b60405161077681612fb2565b60008152855260405161078881612fb2565b6000815260208601523360408601526001600160401b0342166060860152608085015260a084015281600052600d60205260406000209280518051906001600160401b0382116104495781906107de8754612f27565b601f8111610a0e575b50602090601f83116001146109a85760009261099d575b50508160011b916000199060031b1c19161784555b60208101518051906001600160401b038211610449576108366001870154612f27565b601f8111610956575b50602090601f83116001146108db576108ce968361ffff9460a0946004946000926108d0575b50508160011b916000199060031b1c19161760018201555b60028101600180851b036040870151168154906001600160401b03861b6060890151871b169163ffffffff60e01b161717905560808501516003820155019201511661ffff198254161790556137e9565b005b015190508a80610865565b906001870160005260206000209160005b601f198516811061093e57509660018460a0946004946108ce9b61ffff98601f19811610610925575b505050811b01600182015561087d565b015160001960f88460031b161c191690558a8080610915565b919260206001819286850151815501940192016108ec565b600187016000526020600020601f840160051c810160208510610996575b601f830160051c8201811061098a57505061083f565b60008155600101610974565b5080610974565b0151905086806107fe565b6000888152602081209350601f198516905b8181106109f657509084600195949392106109dd575b505050811b018455610813565b015160001960f88460031b161c191690558680806109d0565b929360206001819287860151815501950193016109ba565b909150866000526020600020601f840160051c810160208510610a57575b90849392915b601f830160051c82018110610a485750506107e7565b60008155859450600101610a32565b5080610a2c565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642076616c756560981b6044820152606490fd5b60405162461bcd60e51b815260206004820152600b60248201526a6e6f74206f6e2073616c6560a81b6044820152606490fd5b3461023557604036600319011261023557610af5612eea565b610afd612f00565b9060018060a01b03809116600052600560205260406000209116600052602052602060ff604060002054166040519015158152f35b3461023557602080600319360112610235576004356001600160401b038082116102355736602383011215610235578160040135610b6f81613146565b92610b7d6040519485612fe8565b81845260248585019260051b82010191368311610235576024869201905b838210610d205750505050815190610bb282613146565b91610bc06040519384612fe8565b808352610bcf601f1991613146565b018460005b828110610ce35750505060005b8351811015610c855780610bf8610c809286613c95565b51600052600d8652604060002060405190610c1282612f61565b610c1b81613009565b8252610c2960018201613009565b8883015260028101546001600160a01b038116604084015260a090811c861660608401526003820154608084015260049091015461ffff1690820152610c6f8286613c95565b52610c7a8185613c95565b50613768565b610be1565b604080518681528451818801819052600092600582901b8301810191878a01918a9085015b828710610cb75785850386f35b909192938280610cd3600193603f198a8203018652885161315d565b9601920196019592919092610caa565b604051610cef81612f61565b60006060808352808584015281604084015282015260006080820152600060a0820152828287010152018590610bd4565b81358152908201908201610b9b565b34610235576020366003190112610235576004356000908152600260205260409020546001600160a01b03161561160f57600435600052600d602052604060002061ffff600460405192610d8284612f61565b610d8b81613009565b8452610d9960018201613009565b60208501526001600160401b03600282015460018060a01b038116604087015260a01c166060850152600381015460808501520154168060a0830152600052600c60205260406000209060405191610df083612f97565b610df981613009565b835260018101546001600160401b038181166020860152604091821c1690840152600201546001600160a01b03166060830181905291610e3a600435613b1c565b916040519163234e965d60e01b83526004356004840152600083602481885afa9283156115e6576000936115f2575b506000604051809663d51785dd60e01b82526004356004830152604060248301528180610e99604482018861315d565b03915afa9485156115e6576000956115c1575b50610eb8600435613b1c565b815191610ee06001600160401b036040610ed782602086015116613b1c565b93015116613b1c565b92610eeb8551613d8d565b9360208601519160018060a01b036040880151169460405195610f0d87612fcd565b602a875260403660208901378651156115ab57603060208801538651600110156115ab576078602188015360295b60018111611567575061152357610f6b6080610f636001600160401b0360608c015116613b1c565b990151613ca9565b986039610fab604051809d7f7b226e616d65223a2250726f6f66206f66205669736974202300000000000000602083015260208151948593019101612ea2565b701116113232b9b1b934b83a34b7b7111d1160791b818d0160390152600a546000918d91610fd881612f27565b92600182169182156114fd5750506001146114ae575b5050601e9161104a916a11161134b6b0b3b2911d1160a91b815261101c825180936020600b85019101612ea2565b01809d7211161130b734b6b0ba34b7b72fbab936111d1160691b600b83015260208151948593019101612ea2565b7111161132bc3a32b93730b62fbab936111d1160711b818d01601e0152600b5460009c61107682612f27565b916001811690811561144a57506001146113b8575b505050938996937f227d2c7b2274726169745f74797065223a224d696e74657220416464726573737f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a946113659b989460206104bf9f6110f68b6101979f9c83905194859201612ea2565b017f222c2261747472696275746573223a5b7b2274726169745f74797065223a224581527f786869626974696f6e204e616d65222c2276616c7565223a22000000000000006020820152611154825180936020603985019101612ea2565b01937f227d2c7b22646973706c61795f74797065223a2264617465222c227472616974948560398201527f5f74797065223a2245786869626974696f6e2053746172742054696d65222c226059820152673b30b63ab2911d1160c11b60798201526111c9825180936020608185019101612ea2565b018460818201527f5f74797065223a2245786869626974696f6e20456e642054696d65222c22766160a182015265363ab2911d1160d11b60c182015261121982518093602060c785019101612ea2565b01957f227d2c7b2274726169745f74797065223a224e616d65222c2276616c7565223a60c7880152601160f91b968760e782015261126182518093602060e885019101612ea2565b017f227d2c7b2274726169745f74797065223a22526f6c65222c2276616c7565223a60e8820152866101088201528251906112a6826101099560208785019101612ea2565b01918201526a1116113b30b63ab2911d1160a91b6101298201528251906112d7826101349560208785019101612ea2565b01918201527f5f74797065223a224d696e746564204174222c2276616c7565223a220000000061015482015283519061131a826101709660208885019101612ea2565b019283015261019082015261060f60f31b610191820152815190611348826101939460208685019101612ea2565b019063227d5d7d60e01b9082015203610177810184520182612fe8565b6104ab603b60405180937f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000060208301526113a88151809260208686019101612ea2565b810103601b810184520182612fe8565b90919c50600b600052600080516020613eb78339815191526000905b83821061142f575050909b01909a0160300199837f227d2c7b2274726169745f74797065223a224d696e74657220416464726573737f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a61108b565b60018f916020926030858354928801010152019101906113d4565b60ff1916603094909201848101929092525081151590910201019a50837f227d2c7b2274726169745f74797065223a224d696e74657220416464726573737f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a61108b565b909150600a6000528c600080516020613e978339815191526000905b8482106114e15750500101604a018161104a610fee565b808293604a602094876001955493010101520191018e916114ca565b60ff19169201604a8181019390935283151590930290920101915082905061104a610fee565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b906010600f821610156115ab576f181899199a1a9b1b9c1cb0b131b232b360811b600f82161a611597838a613c84565b5360041c908015610a5e5760001901610f3b565b634e487b7160e01b600052603260045260246000fd5b6115df9195503d806000833e6115d78183612fe8565b810190613abe565b9385610eac565b6040513d6000823e3d90fd5b6116089193503d806000833e6115d78183612fe8565b9185610e69565b60405162461bcd60e51b815260206004820152600a6024820152696e6f742065786973747360b01b6044820152606490fd5b3461023557602080600319360112610235576001600160401b03600435818111610235576116739036906004016130ff565b9161167c6131c4565b825191821161044957611690600b54612f27565b601f8111611744575b5080601f83116001146116d5575081926000926116ca575b5050600019600383901b1c191660019190911b17600b55005b0151905082806116b1565b90601f19831693600b600052600080516020613eb7833981519152926000905b86821061172c5750508360019510611713575b505050811b01600b55005b015160001960f88460031b161c19169055828080611708565b806001859682949686015181550195019301906116f5565b600b600052600080516020613eb7833981519152601f840160051c81019183851061178c575b601f0160051c01905b8181106117805750611699565b60008155600101611773565b909150819061176a565b34610235576080366003190112610235576117af612eea565b6117b7612f00565b606435916001600160401b038311610235576117da6108ce9336906004016130ff565b916044359161332e565b34610235576060366003190112610235576117fd612f16565b604435908115158092036102355761ffff906118176131c4565b1661ffff19600f541617600f5560243560105560ff801960115416911617601155600080f35b34610235576040366003190112610235576001600160401b036024358181116102355761186e9036906004016130ff565b906118776131c4565b600435600052602090600d825260019182604060002001938051928311610449576118a28554612f27565b601f811161194b575b5081601f84116001146118e857509282939183926000946118dd575b50501b916000199060031b1c1916179055600080f35b0151925085806118c7565b919083601f1981168760005284600020946000905b888383106119315750505010611918575b505050811b019055005b015160001960f88460031b161c1916905583808061190e565b8587015188559096019594850194879350908101906118fd565b8560005282600020601f850160051c81019184861061198a575b601f0160051c019085905b82811061197e5750506118ab565b60008155018590611970565b9091508190611965565b34610235576020366003190112610235576004356001600160401b038111610235576104ab6119ca6104bf9236906004016130ff565b613d8d565b346102355760203660031901126102355760043560ff81168103610235576119f8602091613d4b565b6040516001600160f81b03199091168152f35b3461023557604036600319011261023557611a24612eea565b60243590811515809203610235576001600160a01b031690338214611a9857336000526005602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b60405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606490fd5b346102355760a036600319011261023557611af6612f16565b6024356001600160401b03811161023557611b159036906004016130ff565b906064356084356001600160401b03811161023557611b389036906004016130ff565b8160405160208101903360601b8252604435603482015260348152611b5c81612fcd565b51902003611f8a57611bb1611bb99160405160208101907f19457468657265756d205369676e6564204d6573736167653a0a333200000000825285603c820152603c8152611ba981612fcd565b5190206139f7565b9190916138dd565b60115460081c6001600160a01b03908116911603611f575780600052600e602052611bec60ff604060002054161561372e565b600052600e6020526040600020600160ff19825416179055611c27611c12600954613768565b8060095562ffffff61070761ffff8516613777565b90600019430190438211610a5e57604080519240602084019081523360601b6bffffffffffffffffffffffff19169184019190915261ffff92611c6d816054810161074b565b51902060405194611c7d86612f61565b8552604051611c8b81612fb2565b6000815260208601523360408601526001600160401b034216606086015260808501521660a083015280600052600d60205260406000209082519283516001600160401b03811161044957611ce08454612f27565b601f8111611f13575b50602094601f8211600114611ead57948192939495600092611ea2575b50508160011b916000199060031b1c19161783555b60208101519283516001600160401b03811161044957611d3e6001830154612f27565b601f8111611e5b575b506020601f8211600114611de15761ffff928260a0936004936108ce99600092611dd6575b50508160011b916000199060031b1c19161760018201555b60028101600180851b036040870151168154906001600160401b03861b6060890151871b169163ffffffff60e01b161717905560808501516003820155019201511661ffff19825416179055336137e9565b015190508980611d6c565b6001830160005260206000209560005b601f1984168110611e435750926001836108ce9860049461ffff9760a097601f19811610611e2a575b505050811b016001820155611d84565b015160001960f88460031b161c19169055898080611e1a565b82820151885560019097019660209283019201611df1565b600183016000526020600020601f830160051c810160208410611e9b575b601f830160051c82018110611e8f575050611d47565b60008155600101611e79565b5080611e79565b015190508580611d06565b601f198216958560005260206000209160005b888110611efb57508360019596979810611ee2575b505050811b018355611d1b565b015160001960f88460031b161c19169055858080611ed5565b91926020600181928685015181550194019201611ec0565b846000526020600020601f830160051c810160208410611f50575b601f830160051c82018110611f44575050611ce9565b60008155600101611f2e565b5080611f2e565b60405162461bcd60e51b815260206004820152600b60248201526a696e76616c69642073696760a81b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c840d0c2e6d60a31b6044820152606490fd5b346102355760003660031901126102355760405160006001805490611fe282612f27565b8085529181811690811561050c5750600114612008576104bf846104ab81860382612fe8565b600081815292507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106120495750505081016020016104ab8261049b565b80546020858701810191909152909301928101612031565b34610235576020366003190112610235576104bf6104ab600435613ca9565b3461023557602080600319360112610235576001600160401b03600435818111610235576120b29036906004016130ff565b916120bb6131c4565b8251918211610449576120cf600a54612f27565b601f8111612183575b5080601f831160011461211457508192600092612109575b5050600019600383901b1c191660019190911b17600a55005b0151905082806120f0565b90601f19831693600a600052600080516020613e97833981519152926000905b86821061216b5750508360019510612152575b505050811b01600a55005b015160001960f88460031b161c19169055828080612147565b80600185968294968601518155019501930190612134565b600a600052600080516020613e97833981519152601f840160051c8101918385106121cb575b601f0160051c01905b8181106121bf57506120d8565b600081556001016121b2565b90915081906121a9565b34610235576040366003190112610235576121ee612eea565b602435906001600160601b038216808303610235576127109061220f6131c4565b11612287576001600160a01b03169081156122425761222f604051612f7c565b60a01b6001600160a01b03191617600655005b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b34610235576000366003190112610235576008546040516001600160a01b039091168152602090f35b34610235576000366003190112610235576040516000600a5461232a81612f27565b8084529060019081811690811561050c5750600114612353576104bf846104ab81860382612fe8565b600a60009081529250600080516020613e978339815191525b8284106123845750505081016020016104ab8261049b565b8054602085870181019190915290930192810161236c565b3461023557600036600319011261023557602060ff601154166040519015158152f35b34610235576000366003190112610235576123d86131c4565b600880546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610235576020366003190112610235576001600160a01b0361243d612eea565b16801561245c5760005260036020526020604060002054604051908152f35b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608490fd5b34610235576020366003190112610235576004356001600160a01b03811690819003610235576124e16131c4565b479081471061256e57600080809381935af16124fb6135ff565b501561250357005b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b346102355760203660031901126102355760206125d1600435613268565b6040516001600160a01b039091168152f35b346102355760c0366003190112610235576125fc612f16565b6024356001600160401b0381116102355761261b9036906004016130ff565b906044356001600160401b0381116102355761263b9036906004016130ff565b906064356001600160a01b03811690036102355760843560a435151560a43503610235576126676131c4565b80600052600e60205261268260ff604060002054161561372e565b600052600e6020526040600020600160ff198254161790556126bf61ffff6126ab600954613768565b9283600955169162ffffff61070784613777565b916000194301438111610a5e576040805191406020830190815260643560601b6bffffffffffffffffffffffff19169183019190915290612703816054810161074b565b519020906040519461271486612f61565b855260208501523360408501526001600160401b0342166060850152608084015260a083015280600052600d60205260406000209180519283516001600160401b038111610449576127668254612f27565b601f81116129bb575b506020601f8211600114612952578192939495600092612947575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b038211610449576127c26001840154612f27565b601f8111612900575b50602090601f831160011461288857928260a09360049361ffff9660009261287d575b50508160011b916000199060031b1c19161760018201555b60028101600180851b036040870151168154906001600160401b03861b6060890151871b169163ffffffff60e01b161717905560808501516003820155019201511661ffff1982541617905561285e816064356137e9565b60a43561286757005b6008546108ce91906001600160a01b03166135a2565b0151905088806127ee565b906001840160005260206000209160005b601f19851681106128e857508360049361ffff969360019360a097601f198116106128cf575b505050811b016001820155612806565b015160001960f88460031b161c191690558880806128bf565b91926020600181928685015181550194019201612899565b600184016000526020600020601f840160051c810160208510612940575b601f830160051c820181106129345750506127cb565b6000815560010161291e565b508061291e565b01519050858061278a565b8260005260206000209060005b601f19841681106129a3575060019394959683601f1981161061298a575b505050811b01815561279f565b015160001960f88460031b161c1916905585808061297d565b9091602060018192858b01518155019301910161295f565b826000526020600020601f830160051c8101602084106129f8575b601f830160051c820181106129ec57505061276f565b600081556001016129d6565b50806129d6565b3461023557600036600319011261023557602061ffff600f5416604051908152f35b34610235576108ce612a32366130af565b9060405192612a4084612fb2565b6000845261332e565b3461023557604036600319011261023557602435600435600052600760205260406000209060405191612a7b83612f7c565b546001600160a01b0380821680855260a09290921c6020850152929015612ad3575b6001600160601b0360208201511691828102928184041490151715610a5e57604092612710915116918351928352046020820152f35b50604051612ae081612f7c565b600654838116825260a01c6020820152612a9d565b34610235576108ce612b06366130af565b91612b19612b1484336133c9565b6132cc565b613491565b3461023557602036600319011261023557600435600052600e602052602060ff604060002054166040519015158152f35b34610235576000366003190112610235576020600954604051908152f35b346102355760203660031901126102355761ffff612b89612f16565b16600052600c602052612bcb6040600020612ba381613009565b90600181015490600260018060a01b0391015416604051938493608085526080850190612ec5565b916001600160401b0390818116602086015260401c16604084015260608301520390f35b3461023557604036600319011261023557612c08612eea565b6024356001600160a01b0380612c1d83613268565b168091841614612cd157803314908115612cac575b5015612c41576108ce916135a2565b60405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608490fd5b9050600052600560205260406000203360005260205260ff6040600020541683612c32565b60405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b346102355760203660031901126102355760206125d160043561328e565b346102355760003660031901126102355760115460405160089190911c6001600160a01b03168152602090f35b346102355760003660031901126102355760405160008054612d8c81612f27565b8084529060019081811690811561050c5750600114612db5576104bf846104ab81860382612fe8565b600080805292507f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410612df65750505081016020016104ab8261049b565b80546020858701810191909152909301928101612dde565b34610235576020366003190112610235576004359063ffffffff60e01b8216809203610235576020916380ac58cd60e01b81148015612e92575b8015612e82575b80918115612e60575b505015158152f35b63152a902d60e11b1491508115612e7a575b508380612e58565b905083612e72565b506301ffc9a760e01b8114612e4f565b50635b5e139f60e01b8114612e48565b60005b838110612eb55750506000910152565b8181015183820152602001612ea5565b90602091612ede81518092818552858086019101612ea2565b601f01601f1916010190565b600435906001600160a01b038216820361023557565b602435906001600160a01b038216820361023557565b6004359061ffff8216820361023557565b90600182811c92168015612f57575b6020831014612f4157565b634e487b7160e01b600052602260045260246000fd5b91607f1691612f36565b60c081019081106001600160401b0382111761044957604052565b604081019081106001600160401b0382111761044957604052565b608081019081106001600160401b0382111761044957604052565b602081019081106001600160401b0382111761044957604052565b606081019081106001600160401b0382111761044957604052565b90601f801991011681019081106001600160401b0382111761044957604052565b906040519182600082549261301d84612f27565b90818452600194858116908160001461308c5750600114613049575b505061304792500383612fe8565b565b9093915060005260209081600020936000915b81831061307457505061304793508201013880613039565b8554888401850152948501948794509183019161305c565b91505061304794506020925060ff191682840152151560051b8201013880613039565b6060906003190112610235576001600160a01b0390600435828116810361023557916024359081168103610235579060443590565b6001600160401b03811161044957601f01601f191660200190565b81601f8201121561023557803590613116826130e4565b926131246040519485612fe8565b8284526020838301011161023557816000926020809301838601378301015290565b6001600160401b0381116104495760051b60200190565b9060a061ffff8161318c61317a865160c0875260c0870190612ec5565b60208701518682036020880152612ec5565b94600180831b0360408201511660408601526001600160401b0360608201511660608601526080810151608086015201511691015290565b6008546001600160a01b031633036131d857565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b1561322357565b60405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606490fd5b6000908152600260205260409020546001600160a01b031661328b81151561321c565b90565b6000818152600260205260409020546132b1906001600160a01b0316151561321c565b6000908152600460205260409020546001600160a01b031690565b156132d357565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608490fd5b90613352939291613342612b1484336133c9565b61334d838383613491565b61362f565b1561335957565b60405162461bcd60e51b81528061337260048201613376565b0390fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b906001600160a01b0380806133dd84613268565b16931691838314938415613410575b5083156133fa575b50505090565b6134069192935061328e565b16143880806133f4565b909350600052600560205260406000208260005260205260ff6040600020541692386133ec565b1561343e57565b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b906134b99161349f84613268565b6001600160a01b0393918416928492909183168414613437565b1691821561355157816134d6916134cf86613268565b1614613437565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206001600160601b0360a01b9081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b600082815260046020526040902080546001600160a01b0319166001600160a01b03928316908117909155906135d783613268565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b3d1561362a573d90613610826130e4565b9161361e6040519384612fe8565b82523d6000602084013e565b606090565b91926000929190813b15613724576020916136859185604051958680958194630a85bd0160e11b9b8c845233600485015260018060a01b0380951660248501526044840152608060648401526084830190612ec5565b0393165af1908290826136d5575b50506136c7576136a16135ff565b805190816136c25760405162461bcd60e51b81528061337260048201613376565b602001fd5b6001600160e01b0319161490565b909192506020813d821161371c575b816136f160209383612fe8565b810103126137185751906001600160e01b0319821682036137155750903880613693565b80fd5b5080fd5b3d91506136e4565b5050505050600190565b1561373557565b60405162461bcd60e51b815260206004820152600b60248201526a0dad2dce8cac840d0c2e6d60ab1b6044820152606490fd5b6000198114610a5e5760010190565b90620f424062ffffff80931602918216918203610a5e57565b91908201809211610a5e57565b156137a457565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fd5b6001600160a01b031680156138995760008281526002602052604090205461381d906001600160a01b031615155b1561379d565b600082815260026020526040902054613840906001600160a01b03161515613817565b600081815260036020526040812060018154019055828152600260205260408120826001600160601b0360a01b8254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b60058110156139e157806138ee5750565b6001810361393b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b600281036139885760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b60031461399157565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014613a2557613a21916020820151906060604084015193015160001a90613a2f565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311613ab25791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15613aa55781516001600160a01b03811615613a9f579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b602081830312610235578051906001600160401b038211610235570181601f82011215610235578051613af0816130e4565b92613afe6040519485612fe8565b818452602082840101116102355761328b9160208085019101612ea2565b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015613c76575b506d04ee2d6d415b85acef810000000080831015613c67575b50662386f26fc1000080831015613c58575b506305f5e10080831015613c49575b5061271080831015613c3a575b506064821015613c2a575b600a80921015613c20575b60019081602181860195613bb5876130e4565b96613bc36040519889612fe8565b808852613bd2601f19916130e4565b01366020890137860101905b613bea575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215613c1b57919082613bde565b613be3565b9160010191613ba2565b9190606460029104910191613b97565b60049193920491019138613b8c565b60089193920491019138613b7f565b60109193920491019138613b70565b60209193920491019138613b5e565b604093508104915038613b45565b9081518110156115ab570160200190565b80518210156115ab5760209160051b010190565b906000604051613cb881612fcd565b60408152602091604036848401375b815160ff9081831690811015613d4257607f600193841c16858110156115ab5787901a92600f91613cf9838616613d4b565b60001a613d068288613c84565b530191808311610a5e57613d22613d2d92849560041c16613d4b565b60001a921684613c84565b5360ff809116908114610a5e57600101613cc7565b50919450505050565b60ff16600a811015613d725760300160ff8111610a5e5760f81b6001600160f81b03191690565b60570160ff8111610a5e5760f81b6001600160f81b03191690565b908151613d99816130e4565b90604090613da982519384612fe8565b808352613db8601f19916130e4565b01936020943686850137600090815b8151811015613e8d576001600160f81b031980613de48385613c84565b5116841a613df28388613c84565b5380613dfe8388613c84565b5116855190613e0c82612f7c565b896001928381520186601160f91b8252613e795790838b949392511614613e3f575b505050613e3a90613768565b613dc7565b613e3a93929550865190613e5282612f7c565b8152602760f81b958691015260009416841a613e6e8288613c84565b539050863880613e2e565b634e487b7160e01b87526032600452602487fd5b5092945050505056fec65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9a2646970667358221220bb672e0439e533d64d3aa6ad513a94fbad3975d60d3fb5dea88bfbcc5b0d7dc864736f6c63430008120033
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a714612e0e5750806306fdde0314612d6b5780630754617214612d3e578063081812fc14612d20578063095ea7b314612bef5780630d1dcac514612b6d57806318160ddd14612b4f5780631fc916e514612b1e57806323b872dd14612af55780632a55205a14612a4957806342842e0e14612a21578063446d4930146129ff578063447edb50146125e35780636352211e146125b3578063690d8320146124b357806370a082311461241c578063715018a6146123bf57806371b9b6461461239c5780637284e416146123085780638da5cb5b146122df5780638f2fc60b146121d557806390c3f38f146120805780639201de551461206157806395d89b4114611fbe5780639bd02aa014611add578063a22cb46514611a0b578063a86b73f0146119cf578063ac79f96114611994578063b1945a491461183d578063b5e31d27146117e4578063b88d4fde14611796578063c506301d14611641578063c87b56dd14610d2f578063dc1e184a14610b32578063e985e9c514610adc578063f088d547146106b7578063f2824b5314610615578063f2fde38b14610551578063f51f96dd14610533578063f56026af1461045f578063f6c925841461023a5763fca3b5aa146101ed57600080fd5b3461023557602036600319011261023557610206612eea565b61020e6131c4565b60118054610100600160a81b03191660089290921b610100600160a81b0316919091179055005b600080fd5b346102355760a036600319011261023557610253612f16565b6001600160401b03602435818111610235576102739036906004016130ff565b90604435918183168093036102355760643592828416809403610235576001600160a01b0360843581811695919490869003610235576102b16131c4565b604051936102be85612f97565b845261ffff602097888601948552604086019384526060860197885216600052600c87526040600020935196875190828211610449576102fe8654612f27565b601f8111610403575b5080601f831160011461039657508190600297989960009261038b575b50508160011b916000199060031b1c19161784555b600184019251166fffffffffffffffff00000000000000008354925160401b16916fffffffffffffffffffffffffffffffff191617179055019151166001600160601b0360a01b825416179055600080f35b015190508980610324565b9198601f198a168760005283600020936000905b8282106103eb57505091600193918b60029a9b9c94106103d2575b505050811b018455610339565b015160001960f88460031b161c191690558980806103c5565b806001869782949787015181550196019401906103aa565b8660005281600020601f840160051c81019183851061043f575b601f0160051c01905b8181106104335750610307565b60008155600101610426565b909150819061041d565b634e487b7160e01b600052604160045260246000fd5b34610235576000366003190112610235576040516000600b5461048181612f27565b8084529060019081811690811561050c57506001146104c3575b6104bf846104ab81860382612fe8565b604051918291602083526020830190612ec5565b0390f35b600b60009081529250600080516020613eb78339815191525b8284106104f45750505081016020016104ab8261049b565b805460208587018101919091529093019281016104dc565b60ff191660208087019190915292151560051b850190920192506104ab915083905061049b565b34610235576000366003190112610235576020601054604051908152f35b346102355760203660031901126102355761056a612eea565b6105726131c4565b6001600160a01b039081169081156105c157600854826001600160601b0360a01b821617600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b3461023557602036600319011261023557600435600052600d602052610683604060002061064281613009565b9061064f60018201613009565b6002820154916001600160401b0361069161ffff60046003850154940154169360405197889760c0895260c0890190612ec5565b908782036020890152612ec5565b9360018060a01b038116604087015260a01c166060850152608084015260a08301520390f35b6020366003190112610235576106cb612eea565b60ff6011541615610aa9576010543403610a74576106ea600954613768565b908160095561070e61ffff600f54169262ffffff61070785613777565b1690613790565b906000194301438111610a5e576040516107598161074b8560208301954086909160349282526001600160601b03199060601b1660208201520190565b03601f198101835282612fe8565b519020926040519361076a85612f61565b60405161077681612fb2565b60008152855260405161078881612fb2565b6000815260208601523360408601526001600160401b0342166060860152608085015260a084015281600052600d60205260406000209280518051906001600160401b0382116104495781906107de8754612f27565b601f8111610a0e575b50602090601f83116001146109a85760009261099d575b50508160011b916000199060031b1c19161784555b60208101518051906001600160401b038211610449576108366001870154612f27565b601f8111610956575b50602090601f83116001146108db576108ce968361ffff9460a0946004946000926108d0575b50508160011b916000199060031b1c19161760018201555b60028101600180851b036040870151168154906001600160401b03861b6060890151871b169163ffffffff60e01b161717905560808501516003820155019201511661ffff198254161790556137e9565b005b015190508a80610865565b906001870160005260206000209160005b601f198516811061093e57509660018460a0946004946108ce9b61ffff98601f19811610610925575b505050811b01600182015561087d565b015160001960f88460031b161c191690558a8080610915565b919260206001819286850151815501940192016108ec565b600187016000526020600020601f840160051c810160208510610996575b601f830160051c8201811061098a57505061083f565b60008155600101610974565b5080610974565b0151905086806107fe565b6000888152602081209350601f198516905b8181106109f657509084600195949392106109dd575b505050811b018455610813565b015160001960f88460031b161c191690558680806109d0565b929360206001819287860151815501950193016109ba565b909150866000526020600020601f840160051c810160208510610a57575b90849392915b601f830160051c82018110610a485750506107e7565b60008155859450600101610a32565b5080610a2c565b634e487b7160e01b600052601160045260246000fd5b60405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642076616c756560981b6044820152606490fd5b60405162461bcd60e51b815260206004820152600b60248201526a6e6f74206f6e2073616c6560a81b6044820152606490fd5b3461023557604036600319011261023557610af5612eea565b610afd612f00565b9060018060a01b03809116600052600560205260406000209116600052602052602060ff604060002054166040519015158152f35b3461023557602080600319360112610235576004356001600160401b038082116102355736602383011215610235578160040135610b6f81613146565b92610b7d6040519485612fe8565b81845260248585019260051b82010191368311610235576024869201905b838210610d205750505050815190610bb282613146565b91610bc06040519384612fe8565b808352610bcf601f1991613146565b018460005b828110610ce35750505060005b8351811015610c855780610bf8610c809286613c95565b51600052600d8652604060002060405190610c1282612f61565b610c1b81613009565b8252610c2960018201613009565b8883015260028101546001600160a01b038116604084015260a090811c861660608401526003820154608084015260049091015461ffff1690820152610c6f8286613c95565b52610c7a8185613c95565b50613768565b610be1565b604080518681528451818801819052600092600582901b8301810191878a01918a9085015b828710610cb75785850386f35b909192938280610cd3600193603f198a8203018652885161315d565b9601920196019592919092610caa565b604051610cef81612f61565b60006060808352808584015281604084015282015260006080820152600060a0820152828287010152018590610bd4565b81358152908201908201610b9b565b34610235576020366003190112610235576004356000908152600260205260409020546001600160a01b03161561160f57600435600052600d602052604060002061ffff600460405192610d8284612f61565b610d8b81613009565b8452610d9960018201613009565b60208501526001600160401b03600282015460018060a01b038116604087015260a01c166060850152600381015460808501520154168060a0830152600052600c60205260406000209060405191610df083612f97565b610df981613009565b835260018101546001600160401b038181166020860152604091821c1690840152600201546001600160a01b03166060830181905291610e3a600435613b1c565b916040519163234e965d60e01b83526004356004840152600083602481885afa9283156115e6576000936115f2575b506000604051809663d51785dd60e01b82526004356004830152604060248301528180610e99604482018861315d565b03915afa9485156115e6576000956115c1575b50610eb8600435613b1c565b815191610ee06001600160401b036040610ed782602086015116613b1c565b93015116613b1c565b92610eeb8551613d8d565b9360208601519160018060a01b036040880151169460405195610f0d87612fcd565b602a875260403660208901378651156115ab57603060208801538651600110156115ab576078602188015360295b60018111611567575061152357610f6b6080610f636001600160401b0360608c015116613b1c565b990151613ca9565b986039610fab604051809d7f7b226e616d65223a2250726f6f66206f66205669736974202300000000000000602083015260208151948593019101612ea2565b701116113232b9b1b934b83a34b7b7111d1160791b818d0160390152600a546000918d91610fd881612f27565b92600182169182156114fd5750506001146114ae575b5050601e9161104a916a11161134b6b0b3b2911d1160a91b815261101c825180936020600b85019101612ea2565b01809d7211161130b734b6b0ba34b7b72fbab936111d1160691b600b83015260208151948593019101612ea2565b7111161132bc3a32b93730b62fbab936111d1160711b818d01601e0152600b5460009c61107682612f27565b916001811690811561144a57506001146113b8575b505050938996937f227d2c7b2274726169745f74797065223a224d696e74657220416464726573737f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a946113659b989460206104bf9f6110f68b6101979f9c83905194859201612ea2565b017f222c2261747472696275746573223a5b7b2274726169745f74797065223a224581527f786869626974696f6e204e616d65222c2276616c7565223a22000000000000006020820152611154825180936020603985019101612ea2565b01937f227d2c7b22646973706c61795f74797065223a2264617465222c227472616974948560398201527f5f74797065223a2245786869626974696f6e2053746172742054696d65222c226059820152673b30b63ab2911d1160c11b60798201526111c9825180936020608185019101612ea2565b018460818201527f5f74797065223a2245786869626974696f6e20456e642054696d65222c22766160a182015265363ab2911d1160d11b60c182015261121982518093602060c785019101612ea2565b01957f227d2c7b2274726169745f74797065223a224e616d65222c2276616c7565223a60c7880152601160f91b968760e782015261126182518093602060e885019101612ea2565b017f227d2c7b2274726169745f74797065223a22526f6c65222c2276616c7565223a60e8820152866101088201528251906112a6826101099560208785019101612ea2565b01918201526a1116113b30b63ab2911d1160a91b6101298201528251906112d7826101349560208785019101612ea2565b01918201527f5f74797065223a224d696e746564204174222c2276616c7565223a220000000061015482015283519061131a826101709660208885019101612ea2565b019283015261019082015261060f60f31b610191820152815190611348826101939460208685019101612ea2565b019063227d5d7d60e01b9082015203610177810184520182612fe8565b6104ab603b60405180937f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000060208301526113a88151809260208686019101612ea2565b810103601b810184520182612fe8565b90919c50600b600052600080516020613eb78339815191526000905b83821061142f575050909b01909a0160300199837f227d2c7b2274726169745f74797065223a224d696e74657220416464726573737f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a61108b565b60018f916020926030858354928801010152019101906113d4565b60ff1916603094909201848101929092525081151590910201019a50837f227d2c7b2274726169745f74797065223a224d696e74657220416464726573737f227d2c7b2274726169745f74797065223a2253656564222c2276616c7565223a61108b565b909150600a6000528c600080516020613e978339815191526000905b8482106114e15750500101604a018161104a610fee565b808293604a602094876001955493010101520191018e916114ca565b60ff19169201604a8181019390935283151590930290920101915082905061104a610fee565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b906010600f821610156115ab576f181899199a1a9b1b9c1cb0b131b232b360811b600f82161a611597838a613c84565b5360041c908015610a5e5760001901610f3b565b634e487b7160e01b600052603260045260246000fd5b6115df9195503d806000833e6115d78183612fe8565b810190613abe565b9385610eac565b6040513d6000823e3d90fd5b6116089193503d806000833e6115d78183612fe8565b9185610e69565b60405162461bcd60e51b815260206004820152600a6024820152696e6f742065786973747360b01b6044820152606490fd5b3461023557602080600319360112610235576001600160401b03600435818111610235576116739036906004016130ff565b9161167c6131c4565b825191821161044957611690600b54612f27565b601f8111611744575b5080601f83116001146116d5575081926000926116ca575b5050600019600383901b1c191660019190911b17600b55005b0151905082806116b1565b90601f19831693600b600052600080516020613eb7833981519152926000905b86821061172c5750508360019510611713575b505050811b01600b55005b015160001960f88460031b161c19169055828080611708565b806001859682949686015181550195019301906116f5565b600b600052600080516020613eb7833981519152601f840160051c81019183851061178c575b601f0160051c01905b8181106117805750611699565b60008155600101611773565b909150819061176a565b34610235576080366003190112610235576117af612eea565b6117b7612f00565b606435916001600160401b038311610235576117da6108ce9336906004016130ff565b916044359161332e565b34610235576060366003190112610235576117fd612f16565b604435908115158092036102355761ffff906118176131c4565b1661ffff19600f541617600f5560243560105560ff801960115416911617601155600080f35b34610235576040366003190112610235576001600160401b036024358181116102355761186e9036906004016130ff565b906118776131c4565b600435600052602090600d825260019182604060002001938051928311610449576118a28554612f27565b601f811161194b575b5081601f84116001146118e857509282939183926000946118dd575b50501b916000199060031b1c1916179055600080f35b0151925085806118c7565b919083601f1981168760005284600020946000905b888383106119315750505010611918575b505050811b019055005b015160001960f88460031b161c1916905583808061190e565b8587015188559096019594850194879350908101906118fd565b8560005282600020601f850160051c81019184861061198a575b601f0160051c019085905b82811061197e5750506118ab565b60008155018590611970565b9091508190611965565b34610235576020366003190112610235576004356001600160401b038111610235576104ab6119ca6104bf9236906004016130ff565b613d8d565b346102355760203660031901126102355760043560ff81168103610235576119f8602091613d4b565b6040516001600160f81b03199091168152f35b3461023557604036600319011261023557611a24612eea565b60243590811515809203610235576001600160a01b031690338214611a9857336000526005602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b60405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606490fd5b346102355760a036600319011261023557611af6612f16565b6024356001600160401b03811161023557611b159036906004016130ff565b906064356084356001600160401b03811161023557611b389036906004016130ff565b8160405160208101903360601b8252604435603482015260348152611b5c81612fcd565b51902003611f8a57611bb1611bb99160405160208101907f19457468657265756d205369676e6564204d6573736167653a0a333200000000825285603c820152603c8152611ba981612fcd565b5190206139f7565b9190916138dd565b60115460081c6001600160a01b03908116911603611f575780600052600e602052611bec60ff604060002054161561372e565b600052600e6020526040600020600160ff19825416179055611c27611c12600954613768565b8060095562ffffff61070761ffff8516613777565b90600019430190438211610a5e57604080519240602084019081523360601b6bffffffffffffffffffffffff19169184019190915261ffff92611c6d816054810161074b565b51902060405194611c7d86612f61565b8552604051611c8b81612fb2565b6000815260208601523360408601526001600160401b034216606086015260808501521660a083015280600052600d60205260406000209082519283516001600160401b03811161044957611ce08454612f27565b601f8111611f13575b50602094601f8211600114611ead57948192939495600092611ea2575b50508160011b916000199060031b1c19161783555b60208101519283516001600160401b03811161044957611d3e6001830154612f27565b601f8111611e5b575b506020601f8211600114611de15761ffff928260a0936004936108ce99600092611dd6575b50508160011b916000199060031b1c19161760018201555b60028101600180851b036040870151168154906001600160401b03861b6060890151871b169163ffffffff60e01b161717905560808501516003820155019201511661ffff19825416179055336137e9565b015190508980611d6c565b6001830160005260206000209560005b601f1984168110611e435750926001836108ce9860049461ffff9760a097601f19811610611e2a575b505050811b016001820155611d84565b015160001960f88460031b161c19169055898080611e1a565b82820151885560019097019660209283019201611df1565b600183016000526020600020601f830160051c810160208410611e9b575b601f830160051c82018110611e8f575050611d47565b60008155600101611e79565b5080611e79565b015190508580611d06565b601f198216958560005260206000209160005b888110611efb57508360019596979810611ee2575b505050811b018355611d1b565b015160001960f88460031b161c19169055858080611ed5565b91926020600181928685015181550194019201611ec0565b846000526020600020601f830160051c810160208410611f50575b601f830160051c82018110611f44575050611ce9565b60008155600101611f2e565b5080611f2e565b60405162461bcd60e51b815260206004820152600b60248201526a696e76616c69642073696760a81b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b0d2dcecc2d8d2c840d0c2e6d60a31b6044820152606490fd5b346102355760003660031901126102355760405160006001805490611fe282612f27565b8085529181811690811561050c5750600114612008576104bf846104ab81860382612fe8565b600081815292507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106120495750505081016020016104ab8261049b565b80546020858701810191909152909301928101612031565b34610235576020366003190112610235576104bf6104ab600435613ca9565b3461023557602080600319360112610235576001600160401b03600435818111610235576120b29036906004016130ff565b916120bb6131c4565b8251918211610449576120cf600a54612f27565b601f8111612183575b5080601f831160011461211457508192600092612109575b5050600019600383901b1c191660019190911b17600a55005b0151905082806120f0565b90601f19831693600a600052600080516020613e97833981519152926000905b86821061216b5750508360019510612152575b505050811b01600a55005b015160001960f88460031b161c19169055828080612147565b80600185968294968601518155019501930190612134565b600a600052600080516020613e97833981519152601f840160051c8101918385106121cb575b601f0160051c01905b8181106121bf57506120d8565b600081556001016121b2565b90915081906121a9565b34610235576040366003190112610235576121ee612eea565b602435906001600160601b038216808303610235576127109061220f6131c4565b11612287576001600160a01b03169081156122425761222f604051612f7c565b60a01b6001600160a01b03191617600655005b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b34610235576000366003190112610235576008546040516001600160a01b039091168152602090f35b34610235576000366003190112610235576040516000600a5461232a81612f27565b8084529060019081811690811561050c5750600114612353576104bf846104ab81860382612fe8565b600a60009081529250600080516020613e978339815191525b8284106123845750505081016020016104ab8261049b565b8054602085870181019190915290930192810161236c565b3461023557600036600319011261023557602060ff601154166040519015158152f35b34610235576000366003190112610235576123d86131c4565b600880546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610235576020366003190112610235576001600160a01b0361243d612eea565b16801561245c5760005260036020526020604060002054604051908152f35b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608490fd5b34610235576020366003190112610235576004356001600160a01b03811690819003610235576124e16131c4565b479081471061256e57600080809381935af16124fb6135ff565b501561250357005b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b346102355760203660031901126102355760206125d1600435613268565b6040516001600160a01b039091168152f35b346102355760c0366003190112610235576125fc612f16565b6024356001600160401b0381116102355761261b9036906004016130ff565b906044356001600160401b0381116102355761263b9036906004016130ff565b906064356001600160a01b03811690036102355760843560a435151560a43503610235576126676131c4565b80600052600e60205261268260ff604060002054161561372e565b600052600e6020526040600020600160ff198254161790556126bf61ffff6126ab600954613768565b9283600955169162ffffff61070784613777565b916000194301438111610a5e576040805191406020830190815260643560601b6bffffffffffffffffffffffff19169183019190915290612703816054810161074b565b519020906040519461271486612f61565b855260208501523360408501526001600160401b0342166060850152608084015260a083015280600052600d60205260406000209180519283516001600160401b038111610449576127668254612f27565b601f81116129bb575b506020601f8211600114612952578192939495600092612947575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b038211610449576127c26001840154612f27565b601f8111612900575b50602090601f831160011461288857928260a09360049361ffff9660009261287d575b50508160011b916000199060031b1c19161760018201555b60028101600180851b036040870151168154906001600160401b03861b6060890151871b169163ffffffff60e01b161717905560808501516003820155019201511661ffff1982541617905561285e816064356137e9565b60a43561286757005b6008546108ce91906001600160a01b03166135a2565b0151905088806127ee565b906001840160005260206000209160005b601f19851681106128e857508360049361ffff969360019360a097601f198116106128cf575b505050811b016001820155612806565b015160001960f88460031b161c191690558880806128bf565b91926020600181928685015181550194019201612899565b600184016000526020600020601f840160051c810160208510612940575b601f830160051c820181106129345750506127cb565b6000815560010161291e565b508061291e565b01519050858061278a565b8260005260206000209060005b601f19841681106129a3575060019394959683601f1981161061298a575b505050811b01815561279f565b015160001960f88460031b161c1916905585808061297d565b9091602060018192858b01518155019301910161295f565b826000526020600020601f830160051c8101602084106129f8575b601f830160051c820181106129ec57505061276f565b600081556001016129d6565b50806129d6565b3461023557600036600319011261023557602061ffff600f5416604051908152f35b34610235576108ce612a32366130af565b9060405192612a4084612fb2565b6000845261332e565b3461023557604036600319011261023557602435600435600052600760205260406000209060405191612a7b83612f7c565b546001600160a01b0380821680855260a09290921c6020850152929015612ad3575b6001600160601b0360208201511691828102928184041490151715610a5e57604092612710915116918351928352046020820152f35b50604051612ae081612f7c565b600654838116825260a01c6020820152612a9d565b34610235576108ce612b06366130af565b91612b19612b1484336133c9565b6132cc565b613491565b3461023557602036600319011261023557600435600052600e602052602060ff604060002054166040519015158152f35b34610235576000366003190112610235576020600954604051908152f35b346102355760203660031901126102355761ffff612b89612f16565b16600052600c602052612bcb6040600020612ba381613009565b90600181015490600260018060a01b0391015416604051938493608085526080850190612ec5565b916001600160401b0390818116602086015260401c16604084015260608301520390f35b3461023557604036600319011261023557612c08612eea565b6024356001600160a01b0380612c1d83613268565b168091841614612cd157803314908115612cac575b5015612c41576108ce916135a2565b60405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608490fd5b9050600052600560205260406000203360005260205260ff6040600020541683612c32565b60405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b346102355760203660031901126102355760206125d160043561328e565b346102355760003660031901126102355760115460405160089190911c6001600160a01b03168152602090f35b346102355760003660031901126102355760405160008054612d8c81612f27565b8084529060019081811690811561050c5750600114612db5576104bf846104ab81860382612fe8565b600080805292507f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828410612df65750505081016020016104ab8261049b565b80546020858701810191909152909301928101612dde565b34610235576020366003190112610235576004359063ffffffff60e01b8216809203610235576020916380ac58cd60e01b81148015612e92575b8015612e82575b80918115612e60575b505015158152f35b63152a902d60e11b1491508115612e7a575b508380612e58565b905083612e72565b506301ffc9a760e01b8114612e4f565b50635b5e139f60e01b8114612e48565b60005b838110612eb55750506000910152565b8181015183820152602001612ea5565b90602091612ede81518092818552858086019101612ea2565b601f01601f1916010190565b600435906001600160a01b038216820361023557565b602435906001600160a01b038216820361023557565b6004359061ffff8216820361023557565b90600182811c92168015612f57575b6020831014612f4157565b634e487b7160e01b600052602260045260246000fd5b91607f1691612f36565b60c081019081106001600160401b0382111761044957604052565b604081019081106001600160401b0382111761044957604052565b608081019081106001600160401b0382111761044957604052565b602081019081106001600160401b0382111761044957604052565b606081019081106001600160401b0382111761044957604052565b90601f801991011681019081106001600160401b0382111761044957604052565b906040519182600082549261301d84612f27565b90818452600194858116908160001461308c5750600114613049575b505061304792500383612fe8565b565b9093915060005260209081600020936000915b81831061307457505061304793508201013880613039565b8554888401850152948501948794509183019161305c565b91505061304794506020925060ff191682840152151560051b8201013880613039565b6060906003190112610235576001600160a01b0390600435828116810361023557916024359081168103610235579060443590565b6001600160401b03811161044957601f01601f191660200190565b81601f8201121561023557803590613116826130e4565b926131246040519485612fe8565b8284526020838301011161023557816000926020809301838601378301015290565b6001600160401b0381116104495760051b60200190565b9060a061ffff8161318c61317a865160c0875260c0870190612ec5565b60208701518682036020880152612ec5565b94600180831b0360408201511660408601526001600160401b0360608201511660608601526080810151608086015201511691015290565b6008546001600160a01b031633036131d857565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b1561322357565b60405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606490fd5b6000908152600260205260409020546001600160a01b031661328b81151561321c565b90565b6000818152600260205260409020546132b1906001600160a01b0316151561321c565b6000908152600460205260409020546001600160a01b031690565b156132d357565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608490fd5b90613352939291613342612b1484336133c9565b61334d838383613491565b61362f565b1561335957565b60405162461bcd60e51b81528061337260048201613376565b0390fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b906001600160a01b0380806133dd84613268565b16931691838314938415613410575b5083156133fa575b50505090565b6134069192935061328e565b16143880806133f4565b909350600052600560205260406000208260005260205260ff6040600020541692386133ec565b1561343e57565b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b906134b99161349f84613268565b6001600160a01b0393918416928492909183168414613437565b1691821561355157816134d6916134cf86613268565b1614613437565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206001600160601b0360a01b9081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b600082815260046020526040902080546001600160a01b0319166001600160a01b03928316908117909155906135d783613268565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b3d1561362a573d90613610826130e4565b9161361e6040519384612fe8565b82523d6000602084013e565b606090565b91926000929190813b15613724576020916136859185604051958680958194630a85bd0160e11b9b8c845233600485015260018060a01b0380951660248501526044840152608060648401526084830190612ec5565b0393165af1908290826136d5575b50506136c7576136a16135ff565b805190816136c25760405162461bcd60e51b81528061337260048201613376565b602001fd5b6001600160e01b0319161490565b909192506020813d821161371c575b816136f160209383612fe8565b810103126137185751906001600160e01b0319821682036137155750903880613693565b80fd5b5080fd5b3d91506136e4565b5050505050600190565b1561373557565b60405162461bcd60e51b815260206004820152600b60248201526a0dad2dce8cac840d0c2e6d60ab1b6044820152606490fd5b6000198114610a5e5760010190565b90620f424062ffffff80931602918216918203610a5e57565b91908201809211610a5e57565b156137a457565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fd5b6001600160a01b031680156138995760008281526002602052604090205461381d906001600160a01b031615155b1561379d565b600082815260026020526040902054613840906001600160a01b03161515613817565b600081815260036020526040812060018154019055828152600260205260408120826001600160601b0360a01b8254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b60058110156139e157806138ee5750565b6001810361393b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b600281036139885760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b60031461399157565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b634e487b7160e01b600052602160045260246000fd5b906041815114600014613a2557613a21916020820151906060604084015193015160001a90613a2f565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311613ab25791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15613aa55781516001600160a01b03811615613a9f579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b602081830312610235578051906001600160401b038211610235570181601f82011215610235578051613af0816130e4565b92613afe6040519485612fe8565b818452602082840101116102355761328b9160208085019101612ea2565b806000917a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000080821015613c76575b506d04ee2d6d415b85acef810000000080831015613c67575b50662386f26fc1000080831015613c58575b506305f5e10080831015613c49575b5061271080831015613c3a575b506064821015613c2a575b600a80921015613c20575b60019081602181860195613bb5876130e4565b96613bc36040519889612fe8565b808852613bd2601f19916130e4565b01366020890137860101905b613bea575b5050505090565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a835304918215613c1b57919082613bde565b613be3565b9160010191613ba2565b9190606460029104910191613b97565b60049193920491019138613b8c565b60089193920491019138613b7f565b60109193920491019138613b70565b60209193920491019138613b5e565b604093508104915038613b45565b9081518110156115ab570160200190565b80518210156115ab5760209160051b010190565b906000604051613cb881612fcd565b60408152602091604036848401375b815160ff9081831690811015613d4257607f600193841c16858110156115ab5787901a92600f91613cf9838616613d4b565b60001a613d068288613c84565b530191808311610a5e57613d22613d2d92849560041c16613d4b565b60001a921684613c84565b5360ff809116908114610a5e57600101613cc7565b50919450505050565b60ff16600a811015613d725760300160ff8111610a5e5760f81b6001600160f81b03191690565b60570160ff8111610a5e5760f81b6001600160f81b03191690565b908151613d99816130e4565b90604090613da982519384612fe8565b808352613db8601f19916130e4565b01936020943686850137600090815b8151811015613e8d576001600160f81b031980613de48385613c84565b5116841a613df28388613c84565b5380613dfe8388613c84565b5116855190613e0c82612f7c565b896001928381520186601160f91b8252613e795790838b949392511614613e3f575b505050613e3a90613768565b613dc7565b613e3a93929550865190613e5282612f7c565b8152602760f81b958691015260009416841a613e6e8288613c84565b539050863880613e2e565b634e487b7160e01b87526032600452602487fd5b5092945050505056fec65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9a2646970667358221220bb672e0439e533d64d3aa6ad513a94fbad3975d60d3fb5dea88bfbcc5b0d7dc864736f6c63430008120033
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.