Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 14626808 | 1042 days ago | IN | 0 ETH | 0.00750573 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ArtistV4
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.7; /* ^###############################################&5 ?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@& !PPPPPPPPPPP&@@@@@@@@@@@@?!!!!!!!!!!7&@@@@@@@@@@@@@@@@@@@@@@@@BPPPPPPPPPPJ B@@@@@@@@@@@@@@@@@@@@@@@& #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@. B@@@@@@@@@@@@@@@@@@@@@@@& ~55555555555&@@@@@@@@@@@@@@@@@@@@@@@@. B@@@@@@@@@@@@@@@@@@@@@@@& J@@@@@@@@@@@@@@@@@@@@@@@@. B@@@@@@@@@@@@@@@@@@@@@@@&~::::::::::::::::::::::.~B######################P B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7 5@&&&&&&&&&&&&&&&&&&&&&&@@@@@@@@@@@@@@@@@@@@@@@@@5 .......................!@@@@@@@@@@@@@@@@@@@@@@@@@&&&&&&&&&&&&&&&&&&&&&&&B .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@& 7BBBBBBBBBBBBBBBBBBBBBBBY:^^^^^^^^^^^^^^^^^^^^^^^B@@@@@@@@@@@@@@@@@@@@@@@& B@@@@@@@@@@@@@@@@@@@@@@@& Y@@@@@@@@@@@@@@@@@@@@@@@& B@@@@@@@@@@@@@@@@@@@@@@@@PJYYYYYYYYY? 5@@@@@@@@@@@@@@@@@@@@@@@& B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@: Y@@@@@@@@@@@@@@@@@@@@@@@& !GGGGGGGGGGG&@@@@@@@@@@@@@@@@@@@@@@@@5~~~~~~~~~~~#@@@@@@@@@@@@BGGGGGGGGGGJ J@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@G ~&&&&#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&? */ import {IERC2981Upgradeable, IERC165Upgradeable} from '@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol'; import {ERC721Upgradeable} from '@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol'; import {OwnableUpgradeable} from '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import {LibUintToString} from './LibUintToString.sol'; import {CountersUpgradeable} from '@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol'; import {ECDSA} from '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; /// @title Artist /// @author SoundXYZ - @gigamesh & @vigneshka /// @notice This contract is used to create & sell song NFTs for the artist who owns the contract. /// @dev Started as a fork of Mirror's Editions.sol https://github.com/mirror-xyz/editions-v1/blob/main/contracts/Editions.sol contract ArtistV4 is ERC721Upgradeable, IERC2981Upgradeable, OwnableUpgradeable { // ================================ // TYPES // ================================ using LibUintToString for uint256; using CountersUpgradeable for CountersUpgradeable.Counter; using ECDSA for bytes32; enum TimeType { START, END } // ============ Structs ============ struct Edition { // The account that will receive sales revenue. address payable fundingRecipient; // The price at which each token will be sold, in ETH. uint256 price; // The number of tokens sold so far. uint32 numSold; // The maximum number of tokens that can be sold. uint32 quantity; // Royalty amount in bps uint32 royaltyBPS; // start timestamp of auction (in seconds since unix epoch) uint32 startTime; // end timestamp of auction (in seconds since unix epoch) uint32 endTime; // quantity of permissioned tokens uint32 permissionedQuantity; // whitelist signer address address signerAddress; } // ================================ // STORAGE // ================================ string internal baseURI; CountersUpgradeable.Counter private atTokenId; // DEPRECATED IN V3 CountersUpgradeable.Counter private atEditionId; // Mapping of edition id to descriptive data. mapping(uint256 => Edition) public editions; // <DEPRECATED IN V3> Mapping of token id to edition id. mapping(uint256 => uint256) private _tokenToEdition; // The amount of funds that have been deposited for a given edition. mapping(uint256 => uint256) public depositedForEdition; // The amount of funds that have already been withdrawn for a given edition. mapping(uint256 => uint256) public withdrawnForEdition; // The permissioned typehash (used for checking signature validity) bytes32 private constant PERMISSIONED_SALE_TYPEHASH = keccak256('EditionInfo(address contractAddress,address buyerAddress,uint256 editionId,uint256 ticketNumber)'); // Domain separator - used to prevent replay attacks using signatures from different networks bytes32 private immutable DOMAIN_SEPARATOR; // Used to track which tokens have been claimed. editionId -> index -> bit array mapping(uint256 => mapping(uint256 => uint256)) ticketNumbers; // ================================ // EVENTS // ================================ event EditionCreated( uint256 indexed editionId, address fundingRecipient, uint256 price, uint32 quantity, uint32 royaltyBPS, uint32 startTime, uint32 endTime, uint32 permissionedQuantity, address signerAddress ); event EditionPurchased( uint256 indexed editionId, uint256 indexed tokenId, // `numSold` at time of purchase represents the "serial number" of the NFT. uint32 numSold, // The account that paid for and received the NFT. address indexed buyer, uint256 ticketNumber ); event AuctionTimeSet(TimeType timeType, uint256 editionId, uint32 indexed newTime); event SignerAddressSet(uint256 editionId, address indexed signerAddress); event PermissionedQuantitySet(uint256 editionId, uint32 permissionedQuantity); // ================================ // PUBLIC & EXTERNAL WRITABLE FUNCTIONS // ================================ /// @notice Contract constructor constructor() { DOMAIN_SEPARATOR = keccak256(abi.encode(keccak256('EIP712Domain(uint256 chainId)'), block.chainid)); } /// @notice Initializes the contract /// @param _owner Owner of edition /// @param _name Name of artist function initialize( address _owner, uint256 _artistId, string memory _name, string memory _symbol, string memory _baseURI ) public initializer { __ERC721_init(_name, _symbol); __Ownable_init(); // Set ownership to original sender of contract call transferOwnership(_owner); // E.g. https://sound.xyz/api/metadata/[artistId]/ baseURI = string(abi.encodePacked(_baseURI, _artistId.toString(), '/')); // Set edition id start to be 1 not 0 atEditionId.increment(); } /// @notice Creates a new edition. /// @param _fundingRecipient The account that will receive sales revenue. /// @param _price The price at which each token will be sold, in ETH. /// @param _quantity The maximum number of tokens that can be sold. /// @param _royaltyBPS The royalty amount in bps. /// @param _startTime The start time of the auction, in seconds since unix epoch. /// @param _endTime The end time of the auction, in seconds since unix epoch. /// @param _permissionedQuantity The quantity of tokens that require a signature to buy. /// @param _signerAddress signer address. function createEdition( address payable _fundingRecipient, uint256 _price, uint32 _quantity, uint32 _royaltyBPS, uint32 _startTime, uint32 _endTime, uint32 _permissionedQuantity, address _signerAddress ) external onlyOwner { require(_quantity > 0, 'Must set quantity'); require(_fundingRecipient != address(0), 'Must set fundingRecipient'); require(_endTime > _startTime, 'End time must be greater than start time'); if (_permissionedQuantity > 0) { require(_signerAddress != address(0), 'Signer address cannot be 0'); } editions[atEditionId.current()] = Edition({ fundingRecipient: _fundingRecipient, price: _price, numSold: 0, quantity: _quantity, royaltyBPS: _royaltyBPS, startTime: _startTime, endTime: _endTime, permissionedQuantity: _permissionedQuantity, signerAddress: _signerAddress }); emit EditionCreated( atEditionId.current(), _fundingRecipient, _price, _quantity, _royaltyBPS, _startTime, _endTime, _permissionedQuantity, _signerAddress ); atEditionId.increment(); } /// @notice Creates a new token for the given edition, and assigns it to the buyer /// @param _editionId The id of the edition to purchase /// @param _signature A signed message for authorizing permissioned purchases /// @param _ticketNumber Ticket number required for validating this buyer hasn't already bought. function buyEdition( uint256 _editionId, bytes calldata _signature, uint256 _ticketNumber ) external payable { // Caching variables locally to reduce reads uint256 price = editions[_editionId].price; uint32 quantity = editions[_editionId].quantity; uint32 numSold = editions[_editionId].numSold; uint32 newNumSold = numSold + 1; uint32 startTime = editions[_editionId].startTime; uint32 endTime = editions[_editionId].endTime; uint32 permissionedQuantity = editions[_editionId].permissionedQuantity; // Check that the edition exists. Note: this is redundant // with the next check, but it is useful for clearer error messaging. require(quantity > 0, 'Edition does not exist'); // Check that the sender is paying the correct amount. require(msg.value >= price, 'Must send enough to purchase the edition.'); // If the public auction hasn't started... if (startTime > block.timestamp) { // Check that permissioned tokens are still available require(numSold < permissionedQuantity, 'No permissioned tokens available & open auction not started'); // Check that the signature is valid. require( getSigner(_signature, _editionId, _ticketNumber) == editions[_editionId].signerAddress, 'Invalid signer' ); } else { // Check that there are still tokens available to purchase. // Only need to check this for the public sale (after the start time) // so we can accomodate open editions require(numSold < quantity, 'This edition is already sold out.'); } // Don't allow purchases after the end time require(endTime > block.timestamp, 'Auction has ended'); // Create the token id by packing editionId in the top bits uint256 tokenId; unchecked { tokenId = (_editionId << 128) | newNumSold; // Increment the number of tokens sold for this edition. editions[_editionId].numSold = newNumSold; } // If fundingRecipient is the owner (artist's wallet), update the edition's balance & don't send the funds if (editions[_editionId].fundingRecipient == owner()) { // Update the deposited total for the edition depositedForEdition[_editionId] += msg.value; } else { // Send funds to the funding recipient. _sendFunds(editions[_editionId].fundingRecipient, msg.value); } // Mint a new token for the sender, using the `tokenId`. _mint(msg.sender, tokenId); emit EditionPurchased(_editionId, tokenId, newNumSold, msg.sender, _ticketNumber); } function withdrawFunds(uint256 _editionId) external { // Compute the amount available for withdrawing from this edition. uint256 remainingForEdition = depositedForEdition[_editionId] - withdrawnForEdition[_editionId]; // Set the amount withdrawn to the amount deposited. withdrawnForEdition[_editionId] = depositedForEdition[_editionId]; // Send the amount that was remaining for the edition, to the funding recipient. _sendFunds(editions[_editionId].fundingRecipient, remainingForEdition); } /// @notice Sets the start time for an edition function setStartTime(uint256 _editionId, uint32 _startTime) external onlyOwner { editions[_editionId].startTime = _startTime; emit AuctionTimeSet(TimeType.START, _editionId, _startTime); } /// @notice Sets the end time for an edition function setEndTime(uint256 _editionId, uint32 _endTime) external onlyOwner { editions[_editionId].endTime = _endTime; emit AuctionTimeSet(TimeType.END, _editionId, _endTime); } /// @notice Sets the signature address of an edition function setSignerAddress(uint256 _editionId, address _newSignerAddress) external onlyOwner { require(_newSignerAddress != address(0), 'Signer address cannot be 0'); editions[_editionId].signerAddress = _newSignerAddress; emit SignerAddressSet(_editionId, _newSignerAddress); } /// @notice Sets the permissioned quantity for an edition function setPermissionedQuantity(uint256 _editionId, uint32 _permissionedQuantity) external onlyOwner { // Prevent setting to permissioned quantity when there is no signer address require(editions[_editionId].signerAddress != address(0), 'Edition must have a signer'); editions[_editionId].permissionedQuantity = _permissionedQuantity; emit PermissionedQuantitySet(_editionId, _permissionedQuantity); } // ================================ // VIEW FUNCTIONS // ================================ /// @notice Returns token URI (metadata URL). e.g. https://sound.xyz/api/metadata/[artistId]/[editionId]/[tokenId] /// @dev Concatenate the baseURI, editionId and tokenId, to create URI. function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId), 'ERC721Metadata: URI query for nonexistent token'); uint256 editionId = tokenToEdition(_tokenId); return string(abi.encodePacked(baseURI, editionId.toString(), '/', _tokenId.toString())); } /// @notice Returns contract URI used by Opensea. e.g. https://sound.xyz/api/metadata/[artistId]/storefront function contractURI() public view returns (string memory) { return string(abi.encodePacked(baseURI, 'storefront')); } /// @notice Get royalty information for token /// @param _tokenId token id /// @param _salePrice Sale price for the token function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override returns (address fundingRecipient, uint256 royaltyAmount) { uint256 editionId = tokenToEdition(_tokenId); Edition memory edition = editions[editionId]; if (edition.fundingRecipient == address(0x0)) { return (edition.fundingRecipient, 0); } uint256 royaltyBPS = uint256(edition.royaltyBPS); return (edition.fundingRecipient, (_salePrice * royaltyBPS) / 10_000); } /// @notice The total number of tokens created by this contract function totalSupply() external view returns (uint256) { uint256 total = 0; for (uint256 id = 1; id < atEditionId.current(); id++) { total += editions[id].numSold; } return total; } /// @notice Informs other contracts which interfaces this contract supports /// @dev https://eips.ethereum.org/EIPS/eip-165 function supportsInterface(bytes4 _interfaceId) public view override(ERC721Upgradeable, IERC165Upgradeable) returns (bool) { return type(IERC2981Upgradeable).interfaceId == _interfaceId || ERC721Upgradeable.supportsInterface(_interfaceId); } /// @notice returns the number of editions for this artist function editionCount() external view returns (uint256) { return atEditionId.current() - 1; // because atEditionId is incremented after each edition is created } /// @notice Returns the edition id for a given token id /// @param _tokenId token id function tokenToEdition(uint256 _tokenId) public view returns (uint256) { // Check the top bits to see if the edition id is there uint256 editionId = _tokenId >> 128; // If edition ID is 0, then this edition was created before the V3 upgrade if (editionId == 0) { // get edition ID from storage return _tokenToEdition[_tokenId]; } return editionId; } /// @notice Returns a list of owner addresses for a given list of token ids /// @param _tokenIds List of token ids function ownersOfTokenIds(uint256[] calldata _tokenIds) external view returns (address[] memory) { address[] memory owners = new address[](_tokenIds.length); for (uint256 i = 0; i < _tokenIds.length; i++) { owners[i] = ownerOf(_tokenIds[i]); } return owners; } function checkTicketNumbers(uint256 _editionId, uint256[] calldata _ticketNumbers) external view returns (bool[] memory) { bool[] memory claimed = new bool[](_ticketNumbers.length); for (uint256 i = 0; i < _ticketNumbers.length; i++) { (uint256 storedBit, , , ) = _getBitForTicketNumber(_editionId, _ticketNumbers[i]); claimed[i] = storedBit == 1; } return claimed; } // ================================ // PRIVATE FUNCTIONS // ================================ /// @notice Sends funds to an address /// @param _recipient The address to send funds to /// @param _amount The amount of funds to send function _sendFunds(address payable _recipient, uint256 _amount) private { require(address(this).balance >= _amount, 'Insufficient balance for send'); (bool success, ) = _recipient.call{value: _amount}(''); require(success, 'Unable to send value: recipient may have reverted'); } /// @notice Gets signer address to validate permissioned purchase /// @param _signature signed message /// @param _editionId edition id /// @return address of signer /// @dev https://eips.ethereum.org/EIPS/eip-712 function getSigner( bytes calldata _signature, uint256 _editionId, uint256 _ticketNumber ) private returns (address) { // Check that the ticket number is within the reserved range for the edition // permissionedQuantity is uint32, so ticketNumber can't exceed max uint32 require(_ticketNumber < 2**32, 'Ticket number exceeds max'); // gets the stored bit ( uint256 storedBit, uint256 localGroup, uint256 localGroupOffset, uint256 ticketNumbersIdx ) = _getBitForTicketNumber(_editionId, _ticketNumber); require(storedBit == 0, 'Invalid ticket number or NFT already claimed'); // Flip the bit to 1 to indicate that the ticket has been claimed ticketNumbers[_editionId][ticketNumbersIdx] = localGroup | (uint256(1) << localGroupOffset); bytes32 digest = keccak256( abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, keccak256(abi.encode(PERMISSIONED_SALE_TYPEHASH, address(this), msg.sender, _editionId, _ticketNumber)) ) ); return digest.recover(_signature); } /// @notice Gets the bit variables associated with a ticket number /// @param _editionId edition id /// @param _ticketNumber ticket number function _getBitForTicketNumber(uint256 _editionId, uint256 _ticketNumber) private view returns ( uint256, uint256, uint256, uint256 ) { uint256 localGroup; // the bit array for this ticket number uint256 ticketNumbersIdx; // the index of the the local group uint256 localGroupOffset; // the offset/index for the ticket number in the local group uint256 storedBit; // the stored bit at this ticket number's index within the local group unchecked { ticketNumbersIdx = _ticketNumber / 256; localGroupOffset = _ticketNumber % 256; } // cache the local group for efficiency localGroup = ticketNumbers[_editionId][ticketNumbersIdx]; // gets the stored bit storedBit = (localGroup >> localGroupOffset) & uint256(1); return (storedBit, localGroup, localGroupOffset, ticketNumbersIdx); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Called with the sale price to determine how much royalty is owed and to whom. * @param tokenId - the NFT asset queried for royalty information * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; library LibUintToString { uint256 private constant MAX_UINT256_STRING_LENGTH = 78; uint8 private constant ASCII_DIGIT_OFFSET = 48; /// @dev Converts a `uint256` value to a string. /// @param n The integer to convert. /// @return nstr `n` as a decimal string. function toString(uint256 n) internal pure returns (string memory nstr) { if (n == 0) { return '0'; } // Overallocate memory nstr = new string(MAX_UINT256_STRING_LENGTH); uint256 k = MAX_UINT256_STRING_LENGTH; // Populate string from right to left (lsb to msb). while (n != 0) { assembly { let char := add(ASCII_DIGIT_OFFSET, mod(n, 10)) mstore(add(nstr, k), char) k := sub(k, 1) n := div(n, 10) } } assembly { // Shift pointer over to actual start of string. nstr := add(nstr, k) // Store actual string length. mstore(nstr, sub(MAX_UINT256_STRING_LENGTH, k)) } return nstr; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { __Context_init_unchained(); } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "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":false,"internalType":"enum ArtistV4.TimeType","name":"timeType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"editionId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"newTime","type":"uint32"}],"name":"AuctionTimeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"editionId","type":"uint256"},{"indexed":false,"internalType":"address","name":"fundingRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"quantity","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"royaltyBPS","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"startTime","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"endTime","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"permissionedQuantity","type":"uint32"},{"indexed":false,"internalType":"address","name":"signerAddress","type":"address"}],"name":"EditionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"editionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"numSold","type":"uint32"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"ticketNumber","type":"uint256"}],"name":"EditionPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"editionId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"permissionedQuantity","type":"uint32"}],"name":"PermissionedQuantitySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"editionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"signerAddress","type":"address"}],"name":"SignerAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_editionId","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256","name":"_ticketNumber","type":"uint256"}],"name":"buyEdition","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_editionId","type":"uint256"},{"internalType":"uint256[]","name":"_ticketNumbers","type":"uint256[]"}],"name":"checkTicketNumbers","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_fundingRecipient","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint32","name":"_quantity","type":"uint32"},{"internalType":"uint32","name":"_royaltyBPS","type":"uint32"},{"internalType":"uint32","name":"_startTime","type":"uint32"},{"internalType":"uint32","name":"_endTime","type":"uint32"},{"internalType":"uint32","name":"_permissionedQuantity","type":"uint32"},{"internalType":"address","name":"_signerAddress","type":"address"}],"name":"createEdition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositedForEdition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"editionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"editions","outputs":[{"internalType":"address payable","name":"fundingRecipient","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint32","name":"numSold","type":"uint32"},{"internalType":"uint32","name":"quantity","type":"uint32"},{"internalType":"uint32","name":"royaltyBPS","type":"uint32"},{"internalType":"uint32","name":"startTime","type":"uint32"},{"internalType":"uint32","name":"endTime","type":"uint32"},{"internalType":"uint32","name":"permissionedQuantity","type":"uint32"},{"internalType":"address","name":"signerAddress","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":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_artistId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseURI","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"ownersOfTokenIds","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":"fundingRecipient","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_editionId","type":"uint256"},{"internalType":"uint32","name":"_endTime","type":"uint32"}],"name":"setEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_editionId","type":"uint256"},{"internalType":"uint32","name":"_permissionedQuantity","type":"uint32"}],"name":"setPermissionedQuantity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_editionId","type":"uint256"},{"internalType":"address","name":"_newSignerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_editionId","type":"uint256"},{"internalType":"uint32","name":"_startTime","type":"uint32"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenToEdition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"uint256","name":"_editionId","type":"uint256"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawnForEdition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604080517fc49a8e302e3e5d6753b2bb3dbc3c28deba5e16e2572a92aef568063c963e34656020820152469181019190915260600160408051601f19818403018152919052805160209091012060805260805161370561007c60003960006124a301526137056000f3fe6080604052600436106101f95760003560e01c806370a082311161010d578063bb314ca1116100a0578063e8a3d4851161006f578063e8a3d485146106c8578063e985e9c5146106dd578063f2fde38b14610726578063f71e54fb14610746578063fbab9e041461075957600080fd5b8063bb314ca11461062e578063c87b56dd1461064e578063d3bb05281461066e578063e1a3d5731461069b57600080fd5b806395d89b41116100dc57806395d89b41146105b9578063a22cb465146105ce578063abfc83a0146105ee578063b88d4fde1461060e57600080fd5b806370a0823114610546578063715018a61461056657806373aaf8791461057b5780638da5cb5b1461059b57600080fd5b8063279c806e1161019057806352e25bf21161015f57806352e25bf21461049957806352f5c2e4146104b957806356dee996146104e6578063602787ed146105065780636352211e1461052657600080fd5b8063279c806e1461033f5780632a55205a1461042557806342842e0e146104645780634bf440261461048457600080fd5b8063095ea7b3116101cc578063095ea7b3146102ba578063155dd5ee146102dc57806318160ddd146102fc57806323b872dd1461031f57600080fd5b806301ffc9a7146101fe578063065d5b851461023357806306fdde0314610260578063081812fc14610282575b600080fd5b34801561020a57600080fd5b5061021e610219366004613011565b610779565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b5061025361024e366004613089565b6107a4565b60405161022a919061339c565b34801561026c57600080fd5b50610275610891565b60405161022a9190613402565b34801561028e57600080fd5b506102a261029d36600461304b565b610923565b6040516001600160a01b03909116815260200161022a565b3480156102c657600080fd5b506102da6102d5366004612efe565b6109bd565b005b3480156102e857600080fd5b506102da6102f736600461304b565b610ad3565b34801561030857600080fd5b50610311610b33565b60405190815260200161022a565b34801561032b57600080fd5b506102da61033a366004612e0a565b610b7f565b34801561034b57600080fd5b506103c761035a36600461304b565b60cc6020526000908152604090208054600182015460028301546003909301546001600160a01b0392831693919263ffffffff808416936401000000008104821693600160401b8204831693600160601b8304841693600160801b8404811693600160a01b900416911689565b604080516001600160a01b039a8b168152602081019990995263ffffffff978816908901529486166060880152928516608087015290841660a0860152831660c085015290911660e08301529091166101008201526101200161022a565b34801561043157600080fd5b50610445610440366004613157565b610bb0565b604080516001600160a01b03909316835260208301919091520161022a565b34801561047057600080fd5b506102da61047f366004612e0a565b610cac565b34801561049057600080fd5b50610311610cc7565b3480156104a557600080fd5b506102da6104b4366004613179565b610ce3565b3480156104c557600080fd5b506104d96104d4366004612fcf565b610de3565b60405161022a919061334f565b3480156104f257600080fd5b506102da610501366004613064565b610e9c565b34801561051257600080fd5b5061031161052136600461304b565b610f82565b34801561053257600080fd5b506102a261054136600461304b565b610fa2565b34801561055257600080fd5b50610311610561366004612d1e565b611019565b34801561057257600080fd5b506102da6110a0565b34801561058757600080fd5b506102da610596366004612d3b565b6110d6565b3480156105a757600080fd5b506097546001600160a01b03166102a2565b3480156105c557600080fd5b5061027561149c565b3480156105da57600080fd5b506102da6105e9366004612ecb565b6114ab565b3480156105fa57600080fd5b506102da610609366004612f2a565b6114b6565b34801561061a57600080fd5b506102da610629366004612e4b565b6115dd565b34801561063a57600080fd5b506102da610649366004613179565b611615565b34801561065a57600080fd5b5061027561066936600461304b565b6116a6565b34801561067a57600080fd5b5061031161068936600461304b565b60cf6020526000908152604090205481565b3480156106a757600080fd5b506103116106b636600461304b565b60ce6020526000908152604090205481565b3480156106d457600080fd5b5061027561176f565b3480156106e957600080fd5b5061021e6106f8366004612dd1565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561073257600080fd5b506102da610741366004612d1e565b611797565b6102da6107543660046130d5565b611832565b34801561076557600080fd5b506102da610774366004613179565b611c06565b600063152a902d60e11b6001600160e01b03198316148061079e575061079e82611c96565b92915050565b606060008267ffffffffffffffff8111156107c1576107c161368e565b6040519080825280602002602001820160405280156107ea578160200160208202803683370190505b50905060005b8381101561088857600061084a8787878581811061081057610810613678565b90506020020135600091825260d0602090815260408084206101008404808652925290922054600160ff90921681811c9290921693909290565b50505090508060011483838151811061086557610865613678565b91151560209283029190910190910152508061088081613631565b9150506107f0565b50949350505050565b6060606580546108a0906135fc565b80601f01602080910402602001604051908101604052809291908181526020018280546108cc906135fc565b80156109195780601f106108ee57610100808354040283529160200191610919565b820191906000526020600020905b8154815290600101906020018083116108fc57829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166109a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b60006109c882610fa2565b9050806001600160a01b0316836001600160a01b03161415610a365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610998565b336001600160a01b0382161480610a525750610a5281336106f8565b610ac45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610998565b610ace8383611ce6565b505050565b600081815260cf602090815260408083205460ce909252822054610af791906135b9565b600083815260ce602090815260408083205460cf83528184205560cc909152902054909150610b2f906001600160a01b031682611d54565b5050565b60008060015b60cb54811015610b7957600081815260cc6020526040902060020154610b659063ffffffff1683613538565b915080610b7181613631565b915050610b39565b50919050565b610b893382611e61565b610ba55760405162461bcd60e51b81526004016109989061349c565b610ace838383611f58565b6000806000610bbe85610f82565b600081815260cc602090815260409182902082516101208101845281546001600160a01b03908116808352600184015494830194909452600283015463ffffffff80821696840196909652640100000000810486166060840152600160401b810486166080840152600160601b8104861660a0840152600160801b8104861660c0840152600160a01b900490941660e082015260039091015490921661010083015291925090610c765751925060009150610ca59050565b6080810151815163ffffffff90911690612710610c93838961359a565b610c9d9190613578565b945094505050505b9250929050565b610ace838383604051806020016040528060008152506115dd565b60006001610cd460cb5490565b610cde91906135b9565b905090565b6097546001600160a01b03163314610d0d5760405162461bcd60e51b815260040161099890613467565b600082815260cc60205260409020600301546001600160a01b0316610d745760405162461bcd60e51b815260206004820152601a60248201527f45646974696f6e206d75737420686176652061207369676e65720000000000006044820152606401610998565b600082815260cc6020908152604091829020600201805463ffffffff60a01b1916600160a01b63ffffffff8616908102919091179091558251858152918201527f1de856603e1e748b6f6726e7a51520fe7c63e9b801b8e4b2f8de1a02ae0a8dae910160405180910390a15050565b606060008267ffffffffffffffff811115610e0057610e0061368e565b604051908082528060200260200182016040528015610e29578160200160208202803683370190505b50905060005b83811015610e9457610e58858583818110610e4c57610e4c613678565b90506020020135610fa2565b828281518110610e6a57610e6a613678565b6001600160a01b039092166020928302919091019091015280610e8c81613631565b915050610e2f565b509392505050565b6097546001600160a01b03163314610ec65760405162461bcd60e51b815260040161099890613467565b6001600160a01b038116610f1c5760405162461bcd60e51b815260206004820152601a60248201527f5369676e657220616464726573732063616e6e6f7420626520300000000000006044820152606401610998565b600082815260cc602090815260409182902060030180546001600160a01b0319166001600160a01b03851690811790915591518481527f73b6ab337f7463563f035a0b9f885872e16ad1b5043b679cdf802cfcbaa3a53491015b60405180910390a25050565b6000608082901c8061079e575050600090815260cd602052604090205490565b6000818152606760205260408120546001600160a01b03168061079e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610998565b60006001600160a01b0382166110845760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610998565b506001600160a01b031660009081526068602052604090205490565b6097546001600160a01b031633146110ca5760405162461bcd60e51b815260040161099890613467565b6110d460006120f8565b565b6097546001600160a01b031633146111005760405162461bcd60e51b815260040161099890613467565b60008663ffffffff161161114a5760405162461bcd60e51b81526020600482015260116024820152704d75737420736574207175616e7469747960781b6044820152606401610998565b6001600160a01b0388166111a05760405162461bcd60e51b815260206004820152601960248201527f4d757374207365742066756e64696e67526563697069656e74000000000000006044820152606401610998565b8363ffffffff168363ffffffff161161120c5760405162461bcd60e51b815260206004820152602860248201527f456e642074696d65206d7573742062652067726561746572207468616e2073746044820152676172742074696d6560c01b6064820152608401610998565b63ffffffff82161561126e576001600160a01b03811661126e5760405162461bcd60e51b815260206004820152601a60248201527f5369676e657220616464726573732063616e6e6f7420626520300000000000006044820152606401610998565b604051806101200160405280896001600160a01b03168152602001888152602001600063ffffffff1681526020018763ffffffff1681526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff1681526020018363ffffffff168152602001826001600160a01b031681525060cc60006112f260cb5490565b81526020808201929092526040908101600020835181546001600160a01b03199081166001600160a01b03928316178355938501516001830155918401516002820180546060870151608088015160a089015160c08a015160e08b015163ffffffff97881667ffffffffffffffff199096169590951764010000000094881694909402939093176fffffffffffffffff00000000000000001916600160401b9287169290920263ffffffff60601b191691909117600160601b918616919091021767ffffffffffffffff60801b1916600160801b9185169190910263ffffffff60a01b191617600160a01b93909116929092029190911790556101009093015160039093018054909216921691909117905560cb54604080516001600160a01b03808c168252602082018b905263ffffffff808b16938301939093528289166060830152828816608083015282871660a083015291851660c082015290831660e08201527fb56f9ba6a8af17a142f8ad372c6fc283e81d8c6193b86afe7f6ca901acd698f3906101000160405180910390a261149260cb80546001019055565b5050505050505050565b6060606680546108a0906135fc565b610b2f33838361214a565b600054610100900460ff166114d15760005460ff16156114d5565b303b155b6115385760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610998565b600054610100900460ff1615801561155a576000805461ffff19166101011790555b6115648484612219565b61156c61225a565b61157586611797565b8161157f86612291565b60405160200161159092919061326b565b60405160208183030381529060405260c990805190602001906115b4929190612b8a565b506115c360cb80546001019055565b80156115d5576000805461ff00191690555b505050505050565b6115e73383611e61565b6116035760405162461bcd60e51b81526004016109989061349c565b61160f84848484612306565b50505050565b6097546001600160a01b0316331461163f5760405162461bcd60e51b815260040161099890613467565b600082815260cc602052604090819020600201805463ffffffff60801b1916600160801b63ffffffff85169081029190911790915590517f494264d1227744d2d86690c5355813b007a13955626b261c2e02901a73f6f90c90610f769060019086906133d6565b6000818152606760205260409020546060906001600160a01b03166117255760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610998565b600061173083610f82565b905060c961173d82612291565b61174685612291565b604051602001611758939291906132a6565b604051602081830303815290604052915050919050565b606060c960405160200161178391906132ec565b604051602081830303815290604052905090565b6097546001600160a01b031633146117c15760405162461bcd60e51b815260040161099890613467565b6001600160a01b0381166118265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610998565b61182f816120f8565b50565b600084815260cc60205260408120600180820154600290920154919263ffffffff6401000000008404811693169161186b908390613550565b600089815260cc602052604090206002015490915063ffffffff600160601b8204811691600160801b8104821691600160a01b90910481169086166118eb5760405162461bcd60e51b815260206004820152601660248201527511591a5d1a5bdb88191bd95cc81b9bdd08195e1a5cdd60521b6044820152606401610998565b8634101561194d5760405162461bcd60e51b815260206004820152602960248201527f4d7573742073656e6420656e6f75676820746f207075726368617365207468656044820152681032b234ba34b7b71760b91b6064820152608401610998565b428363ffffffff161115611a4f578063ffffffff168563ffffffff16106119dc5760405162461bcd60e51b815260206004820152603b60248201527f4e6f207065726d697373696f6e656420746f6b656e7320617661696c61626c6560448201527f2026206f70656e2061756374696f6e206e6f74207374617274656400000000006064820152608401610998565b60008b815260cc60205260409020600301546001600160a01b0316611a038b8b8e8c612339565b6001600160a01b031614611a4a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b4b3b732b960911b6044820152606401610998565b611ab4565b8563ffffffff168563ffffffff1610611ab45760405162461bcd60e51b815260206004820152602160248201527f546869732065646974696f6e20697320616c726561647920736f6c64206f75746044820152601760f91b6064820152608401610998565b428263ffffffff1611611afd5760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb881a185cc8195b991959607a1b6044820152606401610998565b60008b815260cc60205260409020600201805463ffffffff191663ffffffff861690811790915560808c901b17611b3c6097546001600160a01b031690565b60008d815260cc60205260409020546001600160a01b0390811691161415611b875760008c815260ce602052604081208054349290611b7c908490613538565b90915550611ba99050565b60008c815260cc6020526040902054611ba9906001600160a01b031634611d54565b611bb33382612539565b6040805163ffffffff87168152602081018b9052339183918f917fc3e4ad784e3889561b308df24921cf08a47410a8ed63b8afe80c50a002efb251910160405180910390a4505050505050505050505050565b6097546001600160a01b03163314611c305760405162461bcd60e51b815260040161099890613467565b600082815260cc6020526040808220600201805463ffffffff60601b1916600160601b63ffffffff861690810291909117909155905190917f494264d1227744d2d86690c5355813b007a13955626b261c2e02901a73f6f90c91610f76919086906133d6565b60006001600160e01b031982166380ac58cd60e01b1480611cc757506001600160e01b03198216635b5e139f60e01b145b8061079e57506301ffc9a760e01b6001600160e01b031983161461079e565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d1b82610fa2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b80471015611da45760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742062616c616e636520666f722073656e640000006044820152606401610998565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611df1576040519150601f19603f3d011682016040523d82523d6000602084013e611df6565b606091505b5050905080610ace5760405162461bcd60e51b815260206004820152603160248201527f556e61626c6520746f2073656e642076616c75653a20726563697069656e74206044820152701b585e481a185d99481c995d995c9d1959607a1b6064820152608401610998565b6000818152606760205260408120546001600160a01b0316611eda5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610998565b6000611ee583610fa2565b9050806001600160a01b0316846001600160a01b03161480611f205750836001600160a01b0316611f1584610923565b6001600160a01b0316145b80611f5057506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611f6b82610fa2565b6001600160a01b031614611fd35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610998565b6001600160a01b0382166120355760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610998565b612040600082611ce6565b6001600160a01b03831660009081526068602052604081208054600192906120699084906135b9565b90915550506001600160a01b0382166000908152606860205260408120805460019290612097908490613538565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156121ac5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610998565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff166122405760405162461bcd60e51b8152600401610998906134ed565b61224861267b565b61225061267b565b610b2f82826126a2565b600054610100900460ff166122815760405162461bcd60e51b8152600401610998906134ed565b61228961267b565b6110d46126f0565b6060816122b55750506040805180820190915260018152600360fc1b602082015290565b60408051604e8082526080820190925290602082018180368337019050509050604e5b82156122f757600a8084066030018284015290920491600019016122d8565b604e8190039101908152919050565b612311848484611f58565b61231d84848484612720565b61160f5760405162461bcd60e51b815260040161099890613415565b6000640100000000821061238f5760405162461bcd60e51b815260206004820152601960248201527f5469636b6574206e756d6265722065786365656473206d6178000000000000006044820152606401610998565b600083815260d060209081526040808320610100860480855292529091205460ff841681811c60011692831561241c5760405162461bcd60e51b815260206004820152602c60248201527f496e76616c6964207469636b6574206e756d626572206f72204e465420616c7260448201526b1958591e4818db185a5b595960a21b6064820152608401610998565b600087815260d06020908152604080832084845282528083206001861b8717905580517fd90aae4f290b877e033d457ae052dbe1fe53dff32093981847f7d4c541ebf4e8818401523081830152336060820152608081018b905260a08082018b90528251808303909101815260c082019092528151919092012061190160f01b60e08301527f000000000000000000000000000000000000000000000000000000000000000060e28301526101028201526101220160405160208183030381529060405280519060200120905061252b8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859392505061282a9050565b9a9950505050505050505050565b6001600160a01b03821661258f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610998565b6000818152606760205260409020546001600160a01b0316156125f45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610998565b6001600160a01b038216600090815260686020526040812080546001929061261d908490613538565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600054610100900460ff166110d45760405162461bcd60e51b8152600401610998906134ed565b600054610100900460ff166126c95760405162461bcd60e51b8152600401610998906134ed565b81516126dc906065906020850190612b8a565b508051610ace906066906020840190612b8a565b600054610100900460ff166127175760405162461bcd60e51b8152600401610998906134ed565b6110d4336120f8565b60006001600160a01b0384163b1561282257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612764903390899088908890600401613312565b602060405180830381600087803b15801561277e57600080fd5b505af19250505080156127ae575060408051601f3d908101601f191682019092526127ab9181019061302e565b60015b612808573d8080156127dc576040519150601f19603f3d011682016040523d82523d6000602084013e6127e1565b606091505b5080516128005760405162461bcd60e51b815260040161099890613415565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f50565b506001611f50565b60008060006128398585612846565b91509150610e94816128b3565b60008082516041141561287d5760208301516040840151606085015160001a61287187828585612a6e565b94509450505050610ca5565b8251604014156128a7576020830151604084015161289c868383612b5b565b935093505050610ca5565b50600090506002610ca5565b60008160048111156128c7576128c7613662565b14156128d05750565b60018160048111156128e4576128e4613662565b14156129325760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610998565b600281600481111561294657612946613662565b14156129945760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610998565b60038160048111156129a8576129a8613662565b1415612a015760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610998565b6004816004811115612a1557612a15613662565b141561182f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610998565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612aa55750600090506003612b52565b8460ff16601b14158015612abd57508460ff16601c14155b15612ace5750600090506004612b52565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612b22573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612b4b57600060019250925050612b52565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612b7c87828885612a6e565b935093505050935093915050565b828054612b96906135fc565b90600052602060002090601f016020900481019282612bb85760008555612bfe565b82601f10612bd157805160ff1916838001178555612bfe565b82800160010185558215612bfe579182015b82811115612bfe578251825591602001919060010190612be3565b50612c0a929150612c0e565b5090565b5b80821115612c0a5760008155600101612c0f565b600067ffffffffffffffff80841115612c3e57612c3e61368e565b604051601f8501601f19908116603f01168101908282118183101715612c6657612c6661368e565b81604052809350858152868686011115612c7f57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112612cab57600080fd5b50813567ffffffffffffffff811115612cc357600080fd5b6020830191508360208260051b8501011115610ca557600080fd5b600082601f830112612cef57600080fd5b612cfe83833560208501612c23565b9392505050565b803563ffffffff81168114612d1957600080fd5b919050565b600060208284031215612d3057600080fd5b8135612cfe816136a4565b600080600080600080600080610100898b031215612d5857600080fd5b8835612d63816136a4565b975060208901359650612d7860408a01612d05565b9550612d8660608a01612d05565b9450612d9460808a01612d05565b9350612da260a08a01612d05565b9250612db060c08a01612d05565b915060e0890135612dc0816136a4565b809150509295985092959890939650565b60008060408385031215612de457600080fd5b8235612def816136a4565b91506020830135612dff816136a4565b809150509250929050565b600080600060608486031215612e1f57600080fd5b8335612e2a816136a4565b92506020840135612e3a816136a4565b929592945050506040919091013590565b60008060008060808587031215612e6157600080fd5b8435612e6c816136a4565b93506020850135612e7c816136a4565b925060408501359150606085013567ffffffffffffffff811115612e9f57600080fd5b8501601f81018713612eb057600080fd5b612ebf87823560208401612c23565b91505092959194509250565b60008060408385031215612ede57600080fd5b8235612ee9816136a4565b915060208301358015158114612dff57600080fd5b60008060408385031215612f1157600080fd5b8235612f1c816136a4565b946020939093013593505050565b600080600080600060a08688031215612f4257600080fd5b8535612f4d816136a4565b945060208601359350604086013567ffffffffffffffff80821115612f7157600080fd5b612f7d89838a01612cde565b94506060880135915080821115612f9357600080fd5b612f9f89838a01612cde565b93506080880135915080821115612fb557600080fd5b50612fc288828901612cde565b9150509295509295909350565b60008060208385031215612fe257600080fd5b823567ffffffffffffffff811115612ff957600080fd5b61300585828601612c99565b90969095509350505050565b60006020828403121561302357600080fd5b8135612cfe816136b9565b60006020828403121561304057600080fd5b8151612cfe816136b9565b60006020828403121561305d57600080fd5b5035919050565b6000806040838503121561307757600080fd5b823591506020830135612dff816136a4565b60008060006040848603121561309e57600080fd5b83359250602084013567ffffffffffffffff8111156130bc57600080fd5b6130c886828701612c99565b9497909650939450505050565b600080600080606085870312156130eb57600080fd5b84359350602085013567ffffffffffffffff8082111561310a57600080fd5b818701915087601f83011261311e57600080fd5b81358181111561312d57600080fd5b88602082850101111561313f57600080fd5b95986020929092019750949560400135945092505050565b6000806040838503121561316a57600080fd5b50508035926020909101359150565b6000806040838503121561318c57600080fd5b8235915061319c60208401612d05565b90509250929050565b600081518084526131bd8160208601602086016135d0565b601f01601f19169290920160200192915050565b8054600090600181811c90808316806131eb57607f831692505b602080841082141561320d57634e487b7160e01b600052602260045260246000fd5b81801561322157600181146132325761325f565b60ff1986168952848901965061325f565b60008881526020902060005b868110156132575781548b82015290850190830161323e565b505084890196505b50505050505092915050565b6000835161327d8184602088016135d0565b8351908301906132918183602088016135d0565b602f60f81b9101908152600101949350505050565b60006132b282866131d1565b84516132c28183602089016135d0565b602f60f81b910190815283516132df8160018401602088016135d0565b0160010195945050505050565b60006132f882846131d1565b691cdd1bdc99599c9bdb9d60b21b8152600a019392505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613345908301846131a5565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156133905783516001600160a01b03168352928401929184019160010161336b565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156133905783511515835292840192918401916001016133b8565b60408101600284106133f857634e487b7160e01b600052602160045260246000fd5b9281526020015290565b602081526000612cfe60208301846131a5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000821982111561354b5761354b61364c565b500190565b600063ffffffff80831681851680830382111561356f5761356f61364c565b01949350505050565b60008261359557634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156135b4576135b461364c565b500290565b6000828210156135cb576135cb61364c565b500390565b60005b838110156135eb5781810151838201526020016135d3565b8381111561160f5750506000910152565b600181811c9082168061361057607f821691505b60208210811415610b7957634e487b7160e01b600052602260045260246000fd5b60006000198214156136455761364561364c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461182f57600080fd5b6001600160e01b03198116811461182f57600080fdfea2646970667358221220fcf0d470675298fad7a7dd1bd4e11694860d565bb82b41805d9ee46ce362f22d64736f6c63430008070033
Deployed Bytecode
0x6080604052600436106101f95760003560e01c806370a082311161010d578063bb314ca1116100a0578063e8a3d4851161006f578063e8a3d485146106c8578063e985e9c5146106dd578063f2fde38b14610726578063f71e54fb14610746578063fbab9e041461075957600080fd5b8063bb314ca11461062e578063c87b56dd1461064e578063d3bb05281461066e578063e1a3d5731461069b57600080fd5b806395d89b41116100dc57806395d89b41146105b9578063a22cb465146105ce578063abfc83a0146105ee578063b88d4fde1461060e57600080fd5b806370a0823114610546578063715018a61461056657806373aaf8791461057b5780638da5cb5b1461059b57600080fd5b8063279c806e1161019057806352e25bf21161015f57806352e25bf21461049957806352f5c2e4146104b957806356dee996146104e6578063602787ed146105065780636352211e1461052657600080fd5b8063279c806e1461033f5780632a55205a1461042557806342842e0e146104645780634bf440261461048457600080fd5b8063095ea7b3116101cc578063095ea7b3146102ba578063155dd5ee146102dc57806318160ddd146102fc57806323b872dd1461031f57600080fd5b806301ffc9a7146101fe578063065d5b851461023357806306fdde0314610260578063081812fc14610282575b600080fd5b34801561020a57600080fd5b5061021e610219366004613011565b610779565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b5061025361024e366004613089565b6107a4565b60405161022a919061339c565b34801561026c57600080fd5b50610275610891565b60405161022a9190613402565b34801561028e57600080fd5b506102a261029d36600461304b565b610923565b6040516001600160a01b03909116815260200161022a565b3480156102c657600080fd5b506102da6102d5366004612efe565b6109bd565b005b3480156102e857600080fd5b506102da6102f736600461304b565b610ad3565b34801561030857600080fd5b50610311610b33565b60405190815260200161022a565b34801561032b57600080fd5b506102da61033a366004612e0a565b610b7f565b34801561034b57600080fd5b506103c761035a36600461304b565b60cc6020526000908152604090208054600182015460028301546003909301546001600160a01b0392831693919263ffffffff808416936401000000008104821693600160401b8204831693600160601b8304841693600160801b8404811693600160a01b900416911689565b604080516001600160a01b039a8b168152602081019990995263ffffffff978816908901529486166060880152928516608087015290841660a0860152831660c085015290911660e08301529091166101008201526101200161022a565b34801561043157600080fd5b50610445610440366004613157565b610bb0565b604080516001600160a01b03909316835260208301919091520161022a565b34801561047057600080fd5b506102da61047f366004612e0a565b610cac565b34801561049057600080fd5b50610311610cc7565b3480156104a557600080fd5b506102da6104b4366004613179565b610ce3565b3480156104c557600080fd5b506104d96104d4366004612fcf565b610de3565b60405161022a919061334f565b3480156104f257600080fd5b506102da610501366004613064565b610e9c565b34801561051257600080fd5b5061031161052136600461304b565b610f82565b34801561053257600080fd5b506102a261054136600461304b565b610fa2565b34801561055257600080fd5b50610311610561366004612d1e565b611019565b34801561057257600080fd5b506102da6110a0565b34801561058757600080fd5b506102da610596366004612d3b565b6110d6565b3480156105a757600080fd5b506097546001600160a01b03166102a2565b3480156105c557600080fd5b5061027561149c565b3480156105da57600080fd5b506102da6105e9366004612ecb565b6114ab565b3480156105fa57600080fd5b506102da610609366004612f2a565b6114b6565b34801561061a57600080fd5b506102da610629366004612e4b565b6115dd565b34801561063a57600080fd5b506102da610649366004613179565b611615565b34801561065a57600080fd5b5061027561066936600461304b565b6116a6565b34801561067a57600080fd5b5061031161068936600461304b565b60cf6020526000908152604090205481565b3480156106a757600080fd5b506103116106b636600461304b565b60ce6020526000908152604090205481565b3480156106d457600080fd5b5061027561176f565b3480156106e957600080fd5b5061021e6106f8366004612dd1565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561073257600080fd5b506102da610741366004612d1e565b611797565b6102da6107543660046130d5565b611832565b34801561076557600080fd5b506102da610774366004613179565b611c06565b600063152a902d60e11b6001600160e01b03198316148061079e575061079e82611c96565b92915050565b606060008267ffffffffffffffff8111156107c1576107c161368e565b6040519080825280602002602001820160405280156107ea578160200160208202803683370190505b50905060005b8381101561088857600061084a8787878581811061081057610810613678565b90506020020135600091825260d0602090815260408084206101008404808652925290922054600160ff90921681811c9290921693909290565b50505090508060011483838151811061086557610865613678565b91151560209283029190910190910152508061088081613631565b9150506107f0565b50949350505050565b6060606580546108a0906135fc565b80601f01602080910402602001604051908101604052809291908181526020018280546108cc906135fc565b80156109195780601f106108ee57610100808354040283529160200191610919565b820191906000526020600020905b8154815290600101906020018083116108fc57829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166109a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b60006109c882610fa2565b9050806001600160a01b0316836001600160a01b03161415610a365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610998565b336001600160a01b0382161480610a525750610a5281336106f8565b610ac45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610998565b610ace8383611ce6565b505050565b600081815260cf602090815260408083205460ce909252822054610af791906135b9565b600083815260ce602090815260408083205460cf83528184205560cc909152902054909150610b2f906001600160a01b031682611d54565b5050565b60008060015b60cb54811015610b7957600081815260cc6020526040902060020154610b659063ffffffff1683613538565b915080610b7181613631565b915050610b39565b50919050565b610b893382611e61565b610ba55760405162461bcd60e51b81526004016109989061349c565b610ace838383611f58565b6000806000610bbe85610f82565b600081815260cc602090815260409182902082516101208101845281546001600160a01b03908116808352600184015494830194909452600283015463ffffffff80821696840196909652640100000000810486166060840152600160401b810486166080840152600160601b8104861660a0840152600160801b8104861660c0840152600160a01b900490941660e082015260039091015490921661010083015291925090610c765751925060009150610ca59050565b6080810151815163ffffffff90911690612710610c93838961359a565b610c9d9190613578565b945094505050505b9250929050565b610ace838383604051806020016040528060008152506115dd565b60006001610cd460cb5490565b610cde91906135b9565b905090565b6097546001600160a01b03163314610d0d5760405162461bcd60e51b815260040161099890613467565b600082815260cc60205260409020600301546001600160a01b0316610d745760405162461bcd60e51b815260206004820152601a60248201527f45646974696f6e206d75737420686176652061207369676e65720000000000006044820152606401610998565b600082815260cc6020908152604091829020600201805463ffffffff60a01b1916600160a01b63ffffffff8616908102919091179091558251858152918201527f1de856603e1e748b6f6726e7a51520fe7c63e9b801b8e4b2f8de1a02ae0a8dae910160405180910390a15050565b606060008267ffffffffffffffff811115610e0057610e0061368e565b604051908082528060200260200182016040528015610e29578160200160208202803683370190505b50905060005b83811015610e9457610e58858583818110610e4c57610e4c613678565b90506020020135610fa2565b828281518110610e6a57610e6a613678565b6001600160a01b039092166020928302919091019091015280610e8c81613631565b915050610e2f565b509392505050565b6097546001600160a01b03163314610ec65760405162461bcd60e51b815260040161099890613467565b6001600160a01b038116610f1c5760405162461bcd60e51b815260206004820152601a60248201527f5369676e657220616464726573732063616e6e6f7420626520300000000000006044820152606401610998565b600082815260cc602090815260409182902060030180546001600160a01b0319166001600160a01b03851690811790915591518481527f73b6ab337f7463563f035a0b9f885872e16ad1b5043b679cdf802cfcbaa3a53491015b60405180910390a25050565b6000608082901c8061079e575050600090815260cd602052604090205490565b6000818152606760205260408120546001600160a01b03168061079e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610998565b60006001600160a01b0382166110845760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610998565b506001600160a01b031660009081526068602052604090205490565b6097546001600160a01b031633146110ca5760405162461bcd60e51b815260040161099890613467565b6110d460006120f8565b565b6097546001600160a01b031633146111005760405162461bcd60e51b815260040161099890613467565b60008663ffffffff161161114a5760405162461bcd60e51b81526020600482015260116024820152704d75737420736574207175616e7469747960781b6044820152606401610998565b6001600160a01b0388166111a05760405162461bcd60e51b815260206004820152601960248201527f4d757374207365742066756e64696e67526563697069656e74000000000000006044820152606401610998565b8363ffffffff168363ffffffff161161120c5760405162461bcd60e51b815260206004820152602860248201527f456e642074696d65206d7573742062652067726561746572207468616e2073746044820152676172742074696d6560c01b6064820152608401610998565b63ffffffff82161561126e576001600160a01b03811661126e5760405162461bcd60e51b815260206004820152601a60248201527f5369676e657220616464726573732063616e6e6f7420626520300000000000006044820152606401610998565b604051806101200160405280896001600160a01b03168152602001888152602001600063ffffffff1681526020018763ffffffff1681526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff1681526020018363ffffffff168152602001826001600160a01b031681525060cc60006112f260cb5490565b81526020808201929092526040908101600020835181546001600160a01b03199081166001600160a01b03928316178355938501516001830155918401516002820180546060870151608088015160a089015160c08a015160e08b015163ffffffff97881667ffffffffffffffff199096169590951764010000000094881694909402939093176fffffffffffffffff00000000000000001916600160401b9287169290920263ffffffff60601b191691909117600160601b918616919091021767ffffffffffffffff60801b1916600160801b9185169190910263ffffffff60a01b191617600160a01b93909116929092029190911790556101009093015160039093018054909216921691909117905560cb54604080516001600160a01b03808c168252602082018b905263ffffffff808b16938301939093528289166060830152828816608083015282871660a083015291851660c082015290831660e08201527fb56f9ba6a8af17a142f8ad372c6fc283e81d8c6193b86afe7f6ca901acd698f3906101000160405180910390a261149260cb80546001019055565b5050505050505050565b6060606680546108a0906135fc565b610b2f33838361214a565b600054610100900460ff166114d15760005460ff16156114d5565b303b155b6115385760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610998565b600054610100900460ff1615801561155a576000805461ffff19166101011790555b6115648484612219565b61156c61225a565b61157586611797565b8161157f86612291565b60405160200161159092919061326b565b60405160208183030381529060405260c990805190602001906115b4929190612b8a565b506115c360cb80546001019055565b80156115d5576000805461ff00191690555b505050505050565b6115e73383611e61565b6116035760405162461bcd60e51b81526004016109989061349c565b61160f84848484612306565b50505050565b6097546001600160a01b0316331461163f5760405162461bcd60e51b815260040161099890613467565b600082815260cc602052604090819020600201805463ffffffff60801b1916600160801b63ffffffff85169081029190911790915590517f494264d1227744d2d86690c5355813b007a13955626b261c2e02901a73f6f90c90610f769060019086906133d6565b6000818152606760205260409020546060906001600160a01b03166117255760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610998565b600061173083610f82565b905060c961173d82612291565b61174685612291565b604051602001611758939291906132a6565b604051602081830303815290604052915050919050565b606060c960405160200161178391906132ec565b604051602081830303815290604052905090565b6097546001600160a01b031633146117c15760405162461bcd60e51b815260040161099890613467565b6001600160a01b0381166118265760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610998565b61182f816120f8565b50565b600084815260cc60205260408120600180820154600290920154919263ffffffff6401000000008404811693169161186b908390613550565b600089815260cc602052604090206002015490915063ffffffff600160601b8204811691600160801b8104821691600160a01b90910481169086166118eb5760405162461bcd60e51b815260206004820152601660248201527511591a5d1a5bdb88191bd95cc81b9bdd08195e1a5cdd60521b6044820152606401610998565b8634101561194d5760405162461bcd60e51b815260206004820152602960248201527f4d7573742073656e6420656e6f75676820746f207075726368617365207468656044820152681032b234ba34b7b71760b91b6064820152608401610998565b428363ffffffff161115611a4f578063ffffffff168563ffffffff16106119dc5760405162461bcd60e51b815260206004820152603b60248201527f4e6f207065726d697373696f6e656420746f6b656e7320617661696c61626c6560448201527f2026206f70656e2061756374696f6e206e6f74207374617274656400000000006064820152608401610998565b60008b815260cc60205260409020600301546001600160a01b0316611a038b8b8e8c612339565b6001600160a01b031614611a4a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b4b3b732b960911b6044820152606401610998565b611ab4565b8563ffffffff168563ffffffff1610611ab45760405162461bcd60e51b815260206004820152602160248201527f546869732065646974696f6e20697320616c726561647920736f6c64206f75746044820152601760f91b6064820152608401610998565b428263ffffffff1611611afd5760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb881a185cc8195b991959607a1b6044820152606401610998565b60008b815260cc60205260409020600201805463ffffffff191663ffffffff861690811790915560808c901b17611b3c6097546001600160a01b031690565b60008d815260cc60205260409020546001600160a01b0390811691161415611b875760008c815260ce602052604081208054349290611b7c908490613538565b90915550611ba99050565b60008c815260cc6020526040902054611ba9906001600160a01b031634611d54565b611bb33382612539565b6040805163ffffffff87168152602081018b9052339183918f917fc3e4ad784e3889561b308df24921cf08a47410a8ed63b8afe80c50a002efb251910160405180910390a4505050505050505050505050565b6097546001600160a01b03163314611c305760405162461bcd60e51b815260040161099890613467565b600082815260cc6020526040808220600201805463ffffffff60601b1916600160601b63ffffffff861690810291909117909155905190917f494264d1227744d2d86690c5355813b007a13955626b261c2e02901a73f6f90c91610f76919086906133d6565b60006001600160e01b031982166380ac58cd60e01b1480611cc757506001600160e01b03198216635b5e139f60e01b145b8061079e57506301ffc9a760e01b6001600160e01b031983161461079e565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d1b82610fa2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b80471015611da45760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e742062616c616e636520666f722073656e640000006044820152606401610998565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611df1576040519150601f19603f3d011682016040523d82523d6000602084013e611df6565b606091505b5050905080610ace5760405162461bcd60e51b815260206004820152603160248201527f556e61626c6520746f2073656e642076616c75653a20726563697069656e74206044820152701b585e481a185d99481c995d995c9d1959607a1b6064820152608401610998565b6000818152606760205260408120546001600160a01b0316611eda5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610998565b6000611ee583610fa2565b9050806001600160a01b0316846001600160a01b03161480611f205750836001600160a01b0316611f1584610923565b6001600160a01b0316145b80611f5057506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611f6b82610fa2565b6001600160a01b031614611fd35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610998565b6001600160a01b0382166120355760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610998565b612040600082611ce6565b6001600160a01b03831660009081526068602052604081208054600192906120699084906135b9565b90915550506001600160a01b0382166000908152606860205260408120805460019290612097908490613538565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156121ac5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610998565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff166122405760405162461bcd60e51b8152600401610998906134ed565b61224861267b565b61225061267b565b610b2f82826126a2565b600054610100900460ff166122815760405162461bcd60e51b8152600401610998906134ed565b61228961267b565b6110d46126f0565b6060816122b55750506040805180820190915260018152600360fc1b602082015290565b60408051604e8082526080820190925290602082018180368337019050509050604e5b82156122f757600a8084066030018284015290920491600019016122d8565b604e8190039101908152919050565b612311848484611f58565b61231d84848484612720565b61160f5760405162461bcd60e51b815260040161099890613415565b6000640100000000821061238f5760405162461bcd60e51b815260206004820152601960248201527f5469636b6574206e756d6265722065786365656473206d6178000000000000006044820152606401610998565b600083815260d060209081526040808320610100860480855292529091205460ff841681811c60011692831561241c5760405162461bcd60e51b815260206004820152602c60248201527f496e76616c6964207469636b6574206e756d626572206f72204e465420616c7260448201526b1958591e4818db185a5b595960a21b6064820152608401610998565b600087815260d06020908152604080832084845282528083206001861b8717905580517fd90aae4f290b877e033d457ae052dbe1fe53dff32093981847f7d4c541ebf4e8818401523081830152336060820152608081018b905260a08082018b90528251808303909101815260c082019092528151919092012061190160f01b60e08301527f2d9145f2f941cb14d4c738374c6ebde69c75a737e93da5905ee040bab57e46a860e28301526101028201526101220160405160208183030381529060405280519060200120905061252b8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859392505061282a9050565b9a9950505050505050505050565b6001600160a01b03821661258f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610998565b6000818152606760205260409020546001600160a01b0316156125f45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610998565b6001600160a01b038216600090815260686020526040812080546001929061261d908490613538565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600054610100900460ff166110d45760405162461bcd60e51b8152600401610998906134ed565b600054610100900460ff166126c95760405162461bcd60e51b8152600401610998906134ed565b81516126dc906065906020850190612b8a565b508051610ace906066906020840190612b8a565b600054610100900460ff166127175760405162461bcd60e51b8152600401610998906134ed565b6110d4336120f8565b60006001600160a01b0384163b1561282257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612764903390899088908890600401613312565b602060405180830381600087803b15801561277e57600080fd5b505af19250505080156127ae575060408051601f3d908101601f191682019092526127ab9181019061302e565b60015b612808573d8080156127dc576040519150601f19603f3d011682016040523d82523d6000602084013e6127e1565b606091505b5080516128005760405162461bcd60e51b815260040161099890613415565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f50565b506001611f50565b60008060006128398585612846565b91509150610e94816128b3565b60008082516041141561287d5760208301516040840151606085015160001a61287187828585612a6e565b94509450505050610ca5565b8251604014156128a7576020830151604084015161289c868383612b5b565b935093505050610ca5565b50600090506002610ca5565b60008160048111156128c7576128c7613662565b14156128d05750565b60018160048111156128e4576128e4613662565b14156129325760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610998565b600281600481111561294657612946613662565b14156129945760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610998565b60038160048111156129a8576129a8613662565b1415612a015760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610998565b6004816004811115612a1557612a15613662565b141561182f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610998565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612aa55750600090506003612b52565b8460ff16601b14158015612abd57508460ff16601c14155b15612ace5750600090506004612b52565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612b22573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612b4b57600060019250925050612b52565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612b7c87828885612a6e565b935093505050935093915050565b828054612b96906135fc565b90600052602060002090601f016020900481019282612bb85760008555612bfe565b82601f10612bd157805160ff1916838001178555612bfe565b82800160010185558215612bfe579182015b82811115612bfe578251825591602001919060010190612be3565b50612c0a929150612c0e565b5090565b5b80821115612c0a5760008155600101612c0f565b600067ffffffffffffffff80841115612c3e57612c3e61368e565b604051601f8501601f19908116603f01168101908282118183101715612c6657612c6661368e565b81604052809350858152868686011115612c7f57600080fd5b858560208301376000602087830101525050509392505050565b60008083601f840112612cab57600080fd5b50813567ffffffffffffffff811115612cc357600080fd5b6020830191508360208260051b8501011115610ca557600080fd5b600082601f830112612cef57600080fd5b612cfe83833560208501612c23565b9392505050565b803563ffffffff81168114612d1957600080fd5b919050565b600060208284031215612d3057600080fd5b8135612cfe816136a4565b600080600080600080600080610100898b031215612d5857600080fd5b8835612d63816136a4565b975060208901359650612d7860408a01612d05565b9550612d8660608a01612d05565b9450612d9460808a01612d05565b9350612da260a08a01612d05565b9250612db060c08a01612d05565b915060e0890135612dc0816136a4565b809150509295985092959890939650565b60008060408385031215612de457600080fd5b8235612def816136a4565b91506020830135612dff816136a4565b809150509250929050565b600080600060608486031215612e1f57600080fd5b8335612e2a816136a4565b92506020840135612e3a816136a4565b929592945050506040919091013590565b60008060008060808587031215612e6157600080fd5b8435612e6c816136a4565b93506020850135612e7c816136a4565b925060408501359150606085013567ffffffffffffffff811115612e9f57600080fd5b8501601f81018713612eb057600080fd5b612ebf87823560208401612c23565b91505092959194509250565b60008060408385031215612ede57600080fd5b8235612ee9816136a4565b915060208301358015158114612dff57600080fd5b60008060408385031215612f1157600080fd5b8235612f1c816136a4565b946020939093013593505050565b600080600080600060a08688031215612f4257600080fd5b8535612f4d816136a4565b945060208601359350604086013567ffffffffffffffff80821115612f7157600080fd5b612f7d89838a01612cde565b94506060880135915080821115612f9357600080fd5b612f9f89838a01612cde565b93506080880135915080821115612fb557600080fd5b50612fc288828901612cde565b9150509295509295909350565b60008060208385031215612fe257600080fd5b823567ffffffffffffffff811115612ff957600080fd5b61300585828601612c99565b90969095509350505050565b60006020828403121561302357600080fd5b8135612cfe816136b9565b60006020828403121561304057600080fd5b8151612cfe816136b9565b60006020828403121561305d57600080fd5b5035919050565b6000806040838503121561307757600080fd5b823591506020830135612dff816136a4565b60008060006040848603121561309e57600080fd5b83359250602084013567ffffffffffffffff8111156130bc57600080fd5b6130c886828701612c99565b9497909650939450505050565b600080600080606085870312156130eb57600080fd5b84359350602085013567ffffffffffffffff8082111561310a57600080fd5b818701915087601f83011261311e57600080fd5b81358181111561312d57600080fd5b88602082850101111561313f57600080fd5b95986020929092019750949560400135945092505050565b6000806040838503121561316a57600080fd5b50508035926020909101359150565b6000806040838503121561318c57600080fd5b8235915061319c60208401612d05565b90509250929050565b600081518084526131bd8160208601602086016135d0565b601f01601f19169290920160200192915050565b8054600090600181811c90808316806131eb57607f831692505b602080841082141561320d57634e487b7160e01b600052602260045260246000fd5b81801561322157600181146132325761325f565b60ff1986168952848901965061325f565b60008881526020902060005b868110156132575781548b82015290850190830161323e565b505084890196505b50505050505092915050565b6000835161327d8184602088016135d0565b8351908301906132918183602088016135d0565b602f60f81b9101908152600101949350505050565b60006132b282866131d1565b84516132c28183602089016135d0565b602f60f81b910190815283516132df8160018401602088016135d0565b0160010195945050505050565b60006132f882846131d1565b691cdd1bdc99599c9bdb9d60b21b8152600a019392505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613345908301846131a5565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156133905783516001600160a01b03168352928401929184019160010161336b565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156133905783511515835292840192918401916001016133b8565b60408101600284106133f857634e487b7160e01b600052602160045260246000fd5b9281526020015290565b602081526000612cfe60208301846131a5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000821982111561354b5761354b61364c565b500190565b600063ffffffff80831681851680830382111561356f5761356f61364c565b01949350505050565b60008261359557634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156135b4576135b461364c565b500290565b6000828210156135cb576135cb61364c565b500390565b60005b838110156135eb5781810151838201526020016135d3565b8381111561160f5750506000910152565b600181811c9082168061361057607f821691505b60208210811415610b7957634e487b7160e01b600052602260045260246000fd5b60006000198214156136455761364561364c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461182f57600080fd5b6001600160e01b03198116811461182f57600080fdfea2646970667358221220fcf0d470675298fad7a7dd1bd4e11694860d565bb82b41805d9ee46ce362f22d64736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.