More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 18 from a total of 18 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Safe Transfer Fr... | 19670459 | 243 days ago | IN | 0 ETH | 0.0005349 | ||||
Set Approval For... | 18884226 | 353 days ago | IN | 0 ETH | 0.00147539 | ||||
Set Approval For... | 18190756 | 450 days ago | IN | 0 ETH | 0.0003801 | ||||
Set Approval For... | 17520996 | 544 days ago | IN | 0 ETH | 0.0005999 | ||||
Transfer From | 16698722 | 660 days ago | IN | 0 ETH | 0.00183278 | ||||
Set Approval For... | 16614943 | 672 days ago | IN | 0 ETH | 0.00097713 | ||||
Set Approval For... | 15856340 | 778 days ago | IN | 0 ETH | 0.0008449 | ||||
Set Approval For... | 15403232 | 844 days ago | IN | 0 ETH | 0.00038006 | ||||
Transfer Ownersh... | 15402007 | 844 days ago | IN | 0 ETH | 0.00041425 | ||||
Set Approval For... | 15369388 | 850 days ago | IN | 0 ETH | 0.00037984 | ||||
Safe Transfer Fr... | 15366434 | 850 days ago | IN | 0 ETH | 0.00109578 | ||||
Set Approval For... | 15298683 | 861 days ago | IN | 0 ETH | 0.00052209 | ||||
Set Approval For... | 15295948 | 861 days ago | IN | 0 ETH | 0.00039098 | ||||
Set Approval For... | 15265662 | 866 days ago | IN | 0 ETH | 0.00039169 | ||||
Set Approval For... | 15262152 | 866 days ago | IN | 0 ETH | 0.00028915 | ||||
Set Approval For... | 15258236 | 867 days ago | IN | 0 ETH | 0.00063701 | ||||
Transfer Ownersh... | 15241490 | 870 days ago | IN | 0 ETH | 0.00016447 | ||||
Set Royalty Rece... | 15241209 | 870 days ago | IN | 0 ETH | 0.00022363 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TinyHead
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** * * @dev Inheritance details: * Pausable Allows functions to be Paused, note that this contract includes the metadrop * time-limited pause, where the contract can only be paused for a defined time period. * Imported from openzeppelin. * ERC721 Allows the contract to be an ERC721 token. Imported from openzeppelin. * Ownable Gives the contract an owner, for third-party authentication and to gate pausable. * Imported from openzeppelin. * IERC1155Received Allow the contract to receive 1155 tokens. Imported from openzeppelin. * */ contract TinyHead is ERC721, Pausable, Ownable, IERC1155Receiver { using Strings for uint256; uint256 public constant STARTER = 0; // 479 total uint256 public constant REFILL = 1; // 86 total uint256 public constant PLATINUM = 2; // 6 total uint256 public constant pauseCutoffDays = 30; // ERC-2981: NFT Royalty Standard bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; uint256 public immutable deployTime; // the only address we honor ERC1155 tokens from for minting ERC721s address internal immutable _tinyseedContractAddress; address public royaltyReceipientAddress; uint256 public royaltyPercentageBasisPoints; string internal _tokenBaseURI; /** * Hold 3 counters for each type of NFT. * types: STARTER, REFILL and PLATINUM * counts: 479, 86 and 6 * tokenIds: 0-478 Starter, 479-565 Refill, 565-571 Platinum */ uint256[3] internal _tokenCounts = [0, 479, 565]; // ============================ // Events // ============================ event ERC1155Received( address operator, address from, uint256 id, uint256 value, bytes data ); event ERC1155BatchReceived( address operator, address from, uint256[] ids, uint256[] values, bytes data ); // ============================ // Modifiers // ============================ modifier whenTinySeed() { require( msg.sender == _tinyseedContractAddress, "We only accept tokens from TinySeed" ); _; } // ============================ // Constructor // ============================ /** * * @dev constructor. * @param tinyseedContractAddress_ The address of the contract you want to burn EIP1155 on(needs to have a getTotalSupply function). * @param baseURI_ The base URI for the token metadata. ie. the arweave URL * @param royaltyRecipientAddress_ The address of the royalty recipient * @param royaltyPercentageBasisPoints_ How much royalties the recipient should receive * */ constructor( address tinyseedContractAddress_, string memory baseURI_, address royaltyRecipientAddress_, uint256 royaltyPercentageBasisPoints_ ) ERC721("Tinyhead", "TINYHEAD") { _tinyseedContractAddress = tinyseedContractAddress_; _tokenBaseURI = baseURI_; royaltyReceipientAddress = royaltyRecipientAddress_; royaltyPercentageBasisPoints = royaltyPercentageBasisPoints_; deployTime = block.timestamp; } // ============================ // Core // ============================ /** * mint one ERC721 for each ERC1155 received * with each 721 id corresponding to the 1155.tokenId * This function is never called directly, but * runs when an 1155 token is received. */ function onERC1155BatchReceived( address operator_, address from_, uint256[] calldata ids_, uint256[] calldata values_, bytes calldata data_ ) external override returns (bytes4) { _mintTokens(from_, ids_, values_); emit ERC1155BatchReceived(operator_, from_, ids_, values_, data_); return IERC1155Receiver.onERC1155BatchReceived.selector; } /** * See above */ function onERC1155Received( address operator_, address from_, uint256 id_, uint256 value_, bytes calldata data_ ) external override returns (bytes4) { uint256[] memory ids = new uint256[](1); uint256[] memory values = new uint256[](1); ids[0] = id_; values[0] = value_; _mintTokens(from_, ids, values); emit ERC1155Received(operator_, from_, id_, value_, data_); return IERC1155Receiver.onERC1155Received.selector; } /** * mints 721 tokens to the given address. * A different counter is * incremented for each 1155 tokenId, * corresponding to starter, refill and platinum. */ function _mintTokens( address to_, uint256[] memory ids_, uint256[] memory values_ ) internal whenTinySeed whenNotPaused { require( ids_.length == values_.length, "ids and values must be the same length" ); for (uint256 i = 0; i < ids_.length; i++) { uint256 id = ids_[i]; uint256 quantity = values_[i]; require(validateTokenId(id), "Invalid token id"); for (uint256 j = 0; j < quantity; j++) { uint256 tokenId = _tokenCounts[id] + j; _safeMint(to_, tokenId); } _tokenCounts[id] += quantity; } } function validateTokenId(uint256 tokenId_) internal pure returns (bool) { return tokenId_ == STARTER || tokenId_ == PLATINUM || tokenId_ == REFILL; } /** * Burn ERC1155 tokens received * @param ids_ The tokenIds to burn * @param values_ How many tokens to burn */ function burnTinySeeds(uint256[] memory ids_, uint256[] memory values_) external { ERC1155Burnable(_tinyseedContractAddress).burnBatch( address(this), ids_, values_ ); } // ============================ // METADATA // ============================ function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { require( ERC721._exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")) : ""; } function _baseURI() internal view override(ERC721) returns (string memory) { return _tokenBaseURI; } // =============== // ROYALTY / EIP2981 // =============== /** * @dev royaltyInfo: Returns recipent address and royalty. * */ function royaltyInfo(uint256, uint256 salePrice_) external view returns (address receiver, uint256 royaltyAmount) { uint256 royalty = (salePrice_ * royaltyPercentageBasisPoints) / 10000; return (royaltyReceipientAddress, royalty); } function setRoyaltyPercentageBasisPoints( uint256 royaltyPercentageBasisPoints_ ) external onlyOwner { royaltyPercentageBasisPoints = royaltyPercentageBasisPoints_; } function setRoyaltyReceipientAddress(address royaltyReceipientAddress_) external onlyOwner { royaltyReceipientAddress = royaltyReceipientAddress_; } // =============== // OVERRIDES // =============== function supportsInterface(bytes4 interfaceId_) public view override(ERC721, IERC165) returns (bool) { return interfaceId_ == _INTERFACE_ID_ERC2981 || super.supportsInterface(interfaceId_); } // =============== // PAUSABLE // =============== /** * contract can only be paused for pauseCutoffDays after deployment */ function pause() external onlyOwner { require( block.timestamp < (deployTime + pauseCutoffDays * 1 days), "Can only pause until the cutoff" ); _pause(); } function unpause() external onlyOwner { _unpause(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner 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: caller is not token 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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); 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); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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 {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: 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 Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // 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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"tinyseedContractAddress_","type":"address"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"address","name":"royaltyRecipientAddress_","type":"address"},{"internalType":"uint256","name":"royaltyPercentageBasisPoints_","type":"uint256"}],"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":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ERC1155BatchReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"ERC1155Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"PLATINUM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFILL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STARTER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids_","type":"uint256[]"},{"internalType":"uint256[]","name":"values_","type":"uint256[]"}],"name":"burnTinySeeds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"},{"internalType":"address","name":"from_","type":"address"},{"internalType":"uint256[]","name":"ids_","type":"uint256[]"},{"internalType":"uint256[]","name":"values_","type":"uint256[]"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"},{"internalType":"address","name":"from_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseCutoffDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice_","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyPercentageBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceipientAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"royaltyPercentageBasisPoints_","type":"uint256"}],"name":"setRoyaltyPercentageBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceipientAddress_","type":"address"}],"name":"setRoyaltyReceipientAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId_","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
610120604052600060c09081526101df60e052610235610100526200002990600a9060036200017a565b503480156200003757600080fd5b50604051620026d7380380620026d78339810160408190526200005a916200020d565b60405180604001604052806008815260200167151a5b9e5a19585960c21b81525060405180604001604052806008815260200167151253965211505160c21b8152508160009081620000ad9190620003a9565b506001620000bc8282620003a9565b50506006805460ff1916905550620000d43362000120565b6001600160a01b03841660a0526009620000ef8482620003a9565b50600780546001600160a01b0319166001600160a01b03939093169290921790915560085550504260805262000475565b600680546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8260038101928215620001b1579160200282015b82811115620001b1578251829061ffff169055916020019190600101906200018e565b50620001bf929150620001c3565b5090565b5b80821115620001bf5760008155600101620001c4565b80516001600160a01b0381168114620001f257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156200022457600080fd5b6200022f85620001da565b602086810151919550906001600160401b03808211156200024f57600080fd5b818801915088601f8301126200026457600080fd5b815181811115620002795762000279620001f7565b604051601f8201601f19908116603f01168101908382118183101715620002a457620002a4620001f7565b816040528281528b86848701011115620002bd57600080fd5b600093505b82841015620002e15784840186015181850187015292850192620002c2565b82841115620002f35760008684830101525b8098505050505050506200030a60408601620001da565b6060959095015193969295505050565b600181811c908216806200032f57607f821691505b6020821081036200035057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003a457600081815260208120601f850160051c810160208610156200037f5750805b601f850160051c820191505b81811015620003a0578281556001016200038b565b5050505b505050565b81516001600160401b03811115620003c557620003c5620001f7565b620003dd81620003d684546200031a565b8462000356565b602080601f831160018114620004155760008415620003fc5750858301515b600019600386901b1c1916600185901b178555620003a0565b600085815260208120601f198616915b82811015620004465788860151825594840194600190910190840162000425565b5085821015620004655787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05161222e620004a960003960008181610914015261126b01526000818161034b0152610874015261222e6000f3fe608060405234801561001057600080fd5b50600436106101ef5760003560e01c80638456cb591161010f578063bc197c81116100a2578063e82d1c8811610071578063e82d1c8814610437578063e985e9c51461043f578063f23a6e611461047b578063f2fde38b1461048e57600080fd5b8063bc197c81146103dd578063c87b56dd14610409578063e042e98c1461041c578063e1e202201461042f57600080fd5b80639dd3417c116100de5780639dd3417c1461039b578063a00395ec146103a4578063a22cb465146103b7578063b88d4fde146103ca57600080fd5b80638456cb591461036d5780638774ece6146103755780638da5cb5b1461037d57806395d89b411461039357600080fd5b806342842e0e116101875780636352211e116101565780636352211e1461031857806370a082311461032b578063715018a61461033e5780637a40624b1461034657600080fd5b806342842e0e146102d157806345370981146102e457806356f0593a146102f75780635c975abb1461030d57600080fd5b8063095ea7b3116101c3578063095ea7b31461027157806323b872dd146102845780632a55205a146102975780633f4ba83a146102c957600080fd5b80629ee39c146101f457806301ffc9a71461020957806306fdde0314610231578063081812fc14610246575b600080fd5b6102076102023660046118cb565b6104a1565b005b61021c6102173660046118fc565b6104cb565b60405190151581526020015b60405180910390f35b6102396104f6565b6040516102289190611971565b610259610254366004611984565b610588565b6040516001600160a01b039091168152602001610228565b61020761027f36600461199d565b6105af565b6102076102923660046119c7565b6106c9565b6102aa6102a5366004611a03565b6106fa565b604080516001600160a01b039093168352602083019190915201610228565b610207610733565b6102076102df3660046119c7565b610745565b600754610259906001600160a01b031681565b6102ff600281565b604051908152602001610228565b60065460ff1661021c565b610259610326366004611984565b610760565b6102ff6103393660046118cb565b6107c0565b610207610846565b6102ff7f000000000000000000000000000000000000000000000000000000000000000081565b610207610858565b6102ff600181565b60065461010090046001600160a01b0316610259565b6102396108ee565b6102ff60085481565b6102076103b2366004611aec565b6108fd565b6102076103c5366004611b50565b610983565b6102076103d8366004611b8c565b610992565b6103f06103eb366004611cd3565b6109ca565b6040516001600160e01b03199091168152602001610228565b610239610417366004611984565b610a94565b61020761042a366004611984565b610b6f565b6102ff601e81565b6102ff600081565b61021c61044d366004611d8e565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6103f0610489366004611dc1565b610b7c565b61020761049c3660046118cb565b610c65565b6104a9610cde565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b14806104f057506104f082610d3e565b92915050565b60606000805461050590611e39565b80601f016020809104026020016040519081016040528092919081815260200182805461053190611e39565b801561057e5780601f106105535761010080835404028352916020019161057e565b820191906000526020600020905b81548152906001019060200180831161056157829003601f168201915b5050505050905090565b600061059382610d8e565b506000908152600460205260409020546001600160a01b031690565b60006105ba82610760565b9050806001600160a01b0316836001600160a01b03160361062c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806106485750610648813361044d565b6106ba5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610623565b6106c48383610ded565b505050565b6106d33382610e5b565b6106ef5760405162461bcd60e51b815260040161062390611e73565b6106c4838383610eda565b6000806000612710600854856107109190611ed7565b61071a9190611f0c565b6007546001600160a01b031693509150505b9250929050565b61073b610cde565b610743611076565b565b6106c483838360405180602001604052806000815250610992565b6000818152600260205260408120546001600160a01b0316806104f05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610623565b60006001600160a01b03821661082a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610623565b506001600160a01b031660009081526003602052604090205490565b61084e610cde565b61074360006110c8565b610860610cde565b61086e601e62015180611ed7565b610898907f0000000000000000000000000000000000000000000000000000000000000000611f20565b42106108e65760405162461bcd60e51b815260206004820152601f60248201527f43616e206f6e6c7920706175736520756e74696c20746865206375746f6666006044820152606401610623565b610743611122565b60606001805461050590611e39565b604051631ac8311560e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636b20c4549061094d90309086908690600401611f73565b600060405180830381600087803b15801561096757600080fd5b505af115801561097b573d6000803e3d6000fd5b505050505050565b61098e33838361115f565b5050565b61099c3383610e5b565b6109b85760405162461bcd60e51b815260040161062390611e73565b6109c48484848461122d565b50505050565b6000610a3a8888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525061126092505050565b7f2360e6b28d144bcde27ca99baa660f822a59e919f243c01dfaec5a55986df5f58989898989898989604051610a77989796959493929190612012565b60405180910390a15063bc197c8160e01b98975050505050505050565b6000818152600260205260409020546060906001600160a01b0316610b135760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610623565b6000610b1d611469565b90506000815111610b3d5760405180602001604052806000815250610b68565b80610b4784611478565b604051602001610b58929190612076565b6040516020818303038152906040525b9392505050565b610b77610cde565b600855565b6040805160018082528183019092526000918291906020808301908036833750506040805160018082528183019092529293506000929150602080830190803683370190505090508682600081518110610bd857610bd86120b5565b6020026020010181815250508581600081518110610bf857610bf86120b5565b602002602001018181525050610c0f888383611260565b7f01109c91bca177ae1324bc2fc89be4b2573d2e59ad0cc75b1f3d3aa807814d36898989898989604051610c48969594939291906120cb565b60405180910390a15063f23a6e6160e01b98975050505050505050565b610c6d610cde565b6001600160a01b038116610cd25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610623565b610cdb816110c8565b50565b6006546001600160a01b036101009091041633146107435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610623565b60006001600160e01b031982166380ac58cd60e01b1480610d6f57506001600160e01b03198216635b5e139f60e01b145b806104f057506301ffc9a760e01b6001600160e01b03198316146104f0565b6000818152600260205260409020546001600160a01b0316610cdb5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610623565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e2282610760565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610e6783610760565b9050806001600160a01b0316846001600160a01b03161480610eae57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610ed25750836001600160a01b0316610ec784610588565b6001600160a01b0316145b949350505050565b826001600160a01b0316610eed82610760565b6001600160a01b031614610f515760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610623565b6001600160a01b038216610fb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610623565b610fbe600082610ded565b6001600160a01b0383166000908152600360205260408120805460019290610fe7908490612112565b90915550506001600160a01b0382166000908152600360205260408120805460019290611015908490611f20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61107e611579565b6006805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61112a6115c2565b6006805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110ab3390565b816001600160a01b0316836001600160a01b0316036111c05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610623565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611238848484610eda565b61124484848484611608565b6109c45760405162461bcd60e51b815260040161062390612129565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112e45760405162461bcd60e51b815260206004820152602360248201527f5765206f6e6c792061636365707420746f6b656e732066726f6d2054696e795360448201526219595960ea1b6064820152608401610623565b6112ec6115c2565b805182511461134c5760405162461bcd60e51b815260206004820152602660248201527f69647320616e642076616c756573206d757374206265207468652073616d65206044820152650d8cadccee8d60d31b6064820152608401610623565b60005b82518110156109c457600083828151811061136c5761136c6120b5565b60200260200101519050600083838151811061138a5761138a6120b5565b6020026020010151905061139d82611709565b6113dc5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081d1bdad95b881a5960821b6044820152606401610623565b60005b8181101561142857600081600a85600381106113fd576113fd6120b5565b01546114099190611f20565b90506114158882611725565b50806114208161217b565b9150506113df565b5080600a836003811061143d5761143d6120b5565b01600082825461144d9190611f20565b92505081905550505080806114619061217b565b91505061134f565b60606009805461050590611e39565b60608160000361149f5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156114c957806114b38161217b565b91506114c29050600a83611f0c565b91506114a3565b60008167ffffffffffffffff8111156114e4576114e4611a25565b6040519080825280601f01601f19166020018201604052801561150e576020820181803683370190505b5090505b8415610ed257611523600183612112565b9150611530600a86612194565b61153b906030611f20565b60f81b818381518110611550576115506120b5565b60200101906001600160f81b031916908160001a905350611572600a86611f0c565b9450611512565b60065460ff166107435760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610623565b60065460ff16156107435760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610623565b60006001600160a01b0384163b156116fe57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061164c9033908990889088906004016121a8565b6020604051808303816000875af1925050508015611687575060408051601f3d908101601f19168201909252611684918101906121db565b60015b6116e4573d8080156116b5576040519150601f19603f3d011682016040523d82523d6000602084013e6116ba565b606091505b5080516000036116dc5760405162461bcd60e51b815260040161062390612129565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610ed2565b506001949350505050565b60008115806117185750600282145b806104f057505060011490565b61098e828260405180602001604052806000815250611744838361176d565b6117516000848484611608565b6106c45760405162461bcd60e51b815260040161062390612129565b6001600160a01b0382166117c35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610623565b6000818152600260205260409020546001600160a01b0316156118285760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610623565b6001600160a01b0382166000908152600360205260408120805460019290611851908490611f20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80356001600160a01b03811681146118c657600080fd5b919050565b6000602082840312156118dd57600080fd5b610b68826118af565b6001600160e01b031981168114610cdb57600080fd5b60006020828403121561190e57600080fd5b8135610b68816118e6565b60005b8381101561193457818101518382015260200161191c565b838111156109c45750506000910152565b6000815180845261195d816020860160208601611919565b601f01601f19169290920160200192915050565b602081526000610b686020830184611945565b60006020828403121561199657600080fd5b5035919050565b600080604083850312156119b057600080fd5b6119b9836118af565b946020939093013593505050565b6000806000606084860312156119dc57600080fd5b6119e5846118af565b92506119f3602085016118af565b9150604084013590509250925092565b60008060408385031215611a1657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a6457611a64611a25565b604052919050565b600082601f830112611a7d57600080fd5b8135602067ffffffffffffffff821115611a9957611a99611a25565b8160051b611aa8828201611a3b565b9283528481018201928281019087851115611ac257600080fd5b83870192505b84831015611ae157823582529183019190830190611ac8565b979650505050505050565b60008060408385031215611aff57600080fd5b823567ffffffffffffffff80821115611b1757600080fd5b611b2386838701611a6c565b93506020850135915080821115611b3957600080fd5b50611b4685828601611a6c565b9150509250929050565b60008060408385031215611b6357600080fd5b611b6c836118af565b915060208301358015158114611b8157600080fd5b809150509250929050565b60008060008060808587031215611ba257600080fd5b611bab856118af565b93506020611bba8187016118af565b935060408601359250606086013567ffffffffffffffff80821115611bde57600080fd5b818801915088601f830112611bf257600080fd5b813581811115611c0457611c04611a25565b611c16601f8201601f19168501611a3b565b91508082528984828501011115611c2c57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008083601f840112611c5e57600080fd5b50813567ffffffffffffffff811115611c7657600080fd5b6020830191508360208260051b850101111561072c57600080fd5b60008083601f840112611ca357600080fd5b50813567ffffffffffffffff811115611cbb57600080fd5b60208301915083602082850101111561072c57600080fd5b60008060008060008060008060a0898b031215611cef57600080fd5b611cf8896118af565b9750611d0660208a016118af565b9650604089013567ffffffffffffffff80821115611d2357600080fd5b611d2f8c838d01611c4c565b909850965060608b0135915080821115611d4857600080fd5b611d548c838d01611c4c565b909650945060808b0135915080821115611d6d57600080fd5b50611d7a8b828c01611c91565b999c989b5096995094979396929594505050565b60008060408385031215611da157600080fd5b611daa836118af565b9150611db8602084016118af565b90509250929050565b60008060008060008060a08789031215611dda57600080fd5b611de3876118af565b9550611df1602088016118af565b94506040870135935060608701359250608087013567ffffffffffffffff811115611e1b57600080fd5b611e2789828a01611c91565b979a9699509497509295939492505050565b600181811c90821680611e4d57607f821691505b602082108103611e6d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611ef157611ef1611ec1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611f1b57611f1b611ef6565b500490565b60008219821115611f3357611f33611ec1565b500190565b600081518084526020808501945080840160005b83811015611f6857815187529582019590820190600101611f4c565b509495945050505050565b6001600160a01b0384168152606060208201819052600090611f9790830185611f38565b8281036040840152611fa98185611f38565b9695505050505050565b81835260006001600160fb1b03831115611fcc57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0389811682528816602082015260a06040820181905260009061203f908301888a611fb3565b8281036060840152612052818789611fb3565b90508281036080840152612067818587611fe9565b9b9a5050505050505050505050565b60008351612088818460208801611919565b83519083019061209c818360208801611919565b64173539b7b760d91b9101908152600501949350505050565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03878116825286166020820152604081018590526060810184905260a0608082018190526000906121069083018486611fe9565b98975050505050505050565b60008282101561212457612124611ec1565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60006001820161218d5761218d611ec1565b5060010190565b6000826121a3576121a3611ef6565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611fa990830184611945565b6000602082840312156121ed57600080fd5b8151610b68816118e656fea2646970667358221220675bd399a0521b813b002ad0560fc1fad594010eb59d36d7c8d229eff9502a5b64736f6c634300080f0033000000000000000000000000a9586e4861df33d0740203744fd25a8c95df32d9000000000000000000000000000000000000000000000000000000000000008000000000000000000000000002937902a5e3734f156e168bd8685d0d17ee8a0800000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f617277656176652e6e65742f32454a7a61334c4f3837354e7870725455386d6f676949734643745963735951534647686f4e6b6a6473772f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101ef5760003560e01c80638456cb591161010f578063bc197c81116100a2578063e82d1c8811610071578063e82d1c8814610437578063e985e9c51461043f578063f23a6e611461047b578063f2fde38b1461048e57600080fd5b8063bc197c81146103dd578063c87b56dd14610409578063e042e98c1461041c578063e1e202201461042f57600080fd5b80639dd3417c116100de5780639dd3417c1461039b578063a00395ec146103a4578063a22cb465146103b7578063b88d4fde146103ca57600080fd5b80638456cb591461036d5780638774ece6146103755780638da5cb5b1461037d57806395d89b411461039357600080fd5b806342842e0e116101875780636352211e116101565780636352211e1461031857806370a082311461032b578063715018a61461033e5780637a40624b1461034657600080fd5b806342842e0e146102d157806345370981146102e457806356f0593a146102f75780635c975abb1461030d57600080fd5b8063095ea7b3116101c3578063095ea7b31461027157806323b872dd146102845780632a55205a146102975780633f4ba83a146102c957600080fd5b80629ee39c146101f457806301ffc9a71461020957806306fdde0314610231578063081812fc14610246575b600080fd5b6102076102023660046118cb565b6104a1565b005b61021c6102173660046118fc565b6104cb565b60405190151581526020015b60405180910390f35b6102396104f6565b6040516102289190611971565b610259610254366004611984565b610588565b6040516001600160a01b039091168152602001610228565b61020761027f36600461199d565b6105af565b6102076102923660046119c7565b6106c9565b6102aa6102a5366004611a03565b6106fa565b604080516001600160a01b039093168352602083019190915201610228565b610207610733565b6102076102df3660046119c7565b610745565b600754610259906001600160a01b031681565b6102ff600281565b604051908152602001610228565b60065460ff1661021c565b610259610326366004611984565b610760565b6102ff6103393660046118cb565b6107c0565b610207610846565b6102ff7f0000000000000000000000000000000000000000000000000000000062e46a3081565b610207610858565b6102ff600181565b60065461010090046001600160a01b0316610259565b6102396108ee565b6102ff60085481565b6102076103b2366004611aec565b6108fd565b6102076103c5366004611b50565b610983565b6102076103d8366004611b8c565b610992565b6103f06103eb366004611cd3565b6109ca565b6040516001600160e01b03199091168152602001610228565b610239610417366004611984565b610a94565b61020761042a366004611984565b610b6f565b6102ff601e81565b6102ff600081565b61021c61044d366004611d8e565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6103f0610489366004611dc1565b610b7c565b61020761049c3660046118cb565b610c65565b6104a9610cde565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b14806104f057506104f082610d3e565b92915050565b60606000805461050590611e39565b80601f016020809104026020016040519081016040528092919081815260200182805461053190611e39565b801561057e5780601f106105535761010080835404028352916020019161057e565b820191906000526020600020905b81548152906001019060200180831161056157829003601f168201915b5050505050905090565b600061059382610d8e565b506000908152600460205260409020546001600160a01b031690565b60006105ba82610760565b9050806001600160a01b0316836001600160a01b03160361062c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806106485750610648813361044d565b6106ba5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610623565b6106c48383610ded565b505050565b6106d33382610e5b565b6106ef5760405162461bcd60e51b815260040161062390611e73565b6106c4838383610eda565b6000806000612710600854856107109190611ed7565b61071a9190611f0c565b6007546001600160a01b031693509150505b9250929050565b61073b610cde565b610743611076565b565b6106c483838360405180602001604052806000815250610992565b6000818152600260205260408120546001600160a01b0316806104f05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610623565b60006001600160a01b03821661082a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610623565b506001600160a01b031660009081526003602052604090205490565b61084e610cde565b61074360006110c8565b610860610cde565b61086e601e62015180611ed7565b610898907f0000000000000000000000000000000000000000000000000000000062e46a30611f20565b42106108e65760405162461bcd60e51b815260206004820152601f60248201527f43616e206f6e6c7920706175736520756e74696c20746865206375746f6666006044820152606401610623565b610743611122565b60606001805461050590611e39565b604051631ac8311560e21b81526001600160a01b037f000000000000000000000000a9586e4861df33d0740203744fd25a8c95df32d91690636b20c4549061094d90309086908690600401611f73565b600060405180830381600087803b15801561096757600080fd5b505af115801561097b573d6000803e3d6000fd5b505050505050565b61098e33838361115f565b5050565b61099c3383610e5b565b6109b85760405162461bcd60e51b815260040161062390611e73565b6109c48484848461122d565b50505050565b6000610a3a8888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525061126092505050565b7f2360e6b28d144bcde27ca99baa660f822a59e919f243c01dfaec5a55986df5f58989898989898989604051610a77989796959493929190612012565b60405180910390a15063bc197c8160e01b98975050505050505050565b6000818152600260205260409020546060906001600160a01b0316610b135760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610623565b6000610b1d611469565b90506000815111610b3d5760405180602001604052806000815250610b68565b80610b4784611478565b604051602001610b58929190612076565b6040516020818303038152906040525b9392505050565b610b77610cde565b600855565b6040805160018082528183019092526000918291906020808301908036833750506040805160018082528183019092529293506000929150602080830190803683370190505090508682600081518110610bd857610bd86120b5565b6020026020010181815250508581600081518110610bf857610bf86120b5565b602002602001018181525050610c0f888383611260565b7f01109c91bca177ae1324bc2fc89be4b2573d2e59ad0cc75b1f3d3aa807814d36898989898989604051610c48969594939291906120cb565b60405180910390a15063f23a6e6160e01b98975050505050505050565b610c6d610cde565b6001600160a01b038116610cd25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610623565b610cdb816110c8565b50565b6006546001600160a01b036101009091041633146107435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610623565b60006001600160e01b031982166380ac58cd60e01b1480610d6f57506001600160e01b03198216635b5e139f60e01b145b806104f057506301ffc9a760e01b6001600160e01b03198316146104f0565b6000818152600260205260409020546001600160a01b0316610cdb5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610623565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610e2282610760565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610e6783610760565b9050806001600160a01b0316846001600160a01b03161480610eae57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610ed25750836001600160a01b0316610ec784610588565b6001600160a01b0316145b949350505050565b826001600160a01b0316610eed82610760565b6001600160a01b031614610f515760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610623565b6001600160a01b038216610fb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610623565b610fbe600082610ded565b6001600160a01b0383166000908152600360205260408120805460019290610fe7908490612112565b90915550506001600160a01b0382166000908152600360205260408120805460019290611015908490611f20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61107e611579565b6006805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61112a6115c2565b6006805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110ab3390565b816001600160a01b0316836001600160a01b0316036111c05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610623565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611238848484610eda565b61124484848484611608565b6109c45760405162461bcd60e51b815260040161062390612129565b336001600160a01b037f000000000000000000000000a9586e4861df33d0740203744fd25a8c95df32d916146112e45760405162461bcd60e51b815260206004820152602360248201527f5765206f6e6c792061636365707420746f6b656e732066726f6d2054696e795360448201526219595960ea1b6064820152608401610623565b6112ec6115c2565b805182511461134c5760405162461bcd60e51b815260206004820152602660248201527f69647320616e642076616c756573206d757374206265207468652073616d65206044820152650d8cadccee8d60d31b6064820152608401610623565b60005b82518110156109c457600083828151811061136c5761136c6120b5565b60200260200101519050600083838151811061138a5761138a6120b5565b6020026020010151905061139d82611709565b6113dc5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081d1bdad95b881a5960821b6044820152606401610623565b60005b8181101561142857600081600a85600381106113fd576113fd6120b5565b01546114099190611f20565b90506114158882611725565b50806114208161217b565b9150506113df565b5080600a836003811061143d5761143d6120b5565b01600082825461144d9190611f20565b92505081905550505080806114619061217b565b91505061134f565b60606009805461050590611e39565b60608160000361149f5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156114c957806114b38161217b565b91506114c29050600a83611f0c565b91506114a3565b60008167ffffffffffffffff8111156114e4576114e4611a25565b6040519080825280601f01601f19166020018201604052801561150e576020820181803683370190505b5090505b8415610ed257611523600183612112565b9150611530600a86612194565b61153b906030611f20565b60f81b818381518110611550576115506120b5565b60200101906001600160f81b031916908160001a905350611572600a86611f0c565b9450611512565b60065460ff166107435760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610623565b60065460ff16156107435760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610623565b60006001600160a01b0384163b156116fe57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061164c9033908990889088906004016121a8565b6020604051808303816000875af1925050508015611687575060408051601f3d908101601f19168201909252611684918101906121db565b60015b6116e4573d8080156116b5576040519150601f19603f3d011682016040523d82523d6000602084013e6116ba565b606091505b5080516000036116dc5760405162461bcd60e51b815260040161062390612129565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610ed2565b506001949350505050565b60008115806117185750600282145b806104f057505060011490565b61098e828260405180602001604052806000815250611744838361176d565b6117516000848484611608565b6106c45760405162461bcd60e51b815260040161062390612129565b6001600160a01b0382166117c35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610623565b6000818152600260205260409020546001600160a01b0316156118285760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610623565b6001600160a01b0382166000908152600360205260408120805460019290611851908490611f20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80356001600160a01b03811681146118c657600080fd5b919050565b6000602082840312156118dd57600080fd5b610b68826118af565b6001600160e01b031981168114610cdb57600080fd5b60006020828403121561190e57600080fd5b8135610b68816118e6565b60005b8381101561193457818101518382015260200161191c565b838111156109c45750506000910152565b6000815180845261195d816020860160208601611919565b601f01601f19169290920160200192915050565b602081526000610b686020830184611945565b60006020828403121561199657600080fd5b5035919050565b600080604083850312156119b057600080fd5b6119b9836118af565b946020939093013593505050565b6000806000606084860312156119dc57600080fd5b6119e5846118af565b92506119f3602085016118af565b9150604084013590509250925092565b60008060408385031215611a1657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a6457611a64611a25565b604052919050565b600082601f830112611a7d57600080fd5b8135602067ffffffffffffffff821115611a9957611a99611a25565b8160051b611aa8828201611a3b565b9283528481018201928281019087851115611ac257600080fd5b83870192505b84831015611ae157823582529183019190830190611ac8565b979650505050505050565b60008060408385031215611aff57600080fd5b823567ffffffffffffffff80821115611b1757600080fd5b611b2386838701611a6c565b93506020850135915080821115611b3957600080fd5b50611b4685828601611a6c565b9150509250929050565b60008060408385031215611b6357600080fd5b611b6c836118af565b915060208301358015158114611b8157600080fd5b809150509250929050565b60008060008060808587031215611ba257600080fd5b611bab856118af565b93506020611bba8187016118af565b935060408601359250606086013567ffffffffffffffff80821115611bde57600080fd5b818801915088601f830112611bf257600080fd5b813581811115611c0457611c04611a25565b611c16601f8201601f19168501611a3b565b91508082528984828501011115611c2c57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008083601f840112611c5e57600080fd5b50813567ffffffffffffffff811115611c7657600080fd5b6020830191508360208260051b850101111561072c57600080fd5b60008083601f840112611ca357600080fd5b50813567ffffffffffffffff811115611cbb57600080fd5b60208301915083602082850101111561072c57600080fd5b60008060008060008060008060a0898b031215611cef57600080fd5b611cf8896118af565b9750611d0660208a016118af565b9650604089013567ffffffffffffffff80821115611d2357600080fd5b611d2f8c838d01611c4c565b909850965060608b0135915080821115611d4857600080fd5b611d548c838d01611c4c565b909650945060808b0135915080821115611d6d57600080fd5b50611d7a8b828c01611c91565b999c989b5096995094979396929594505050565b60008060408385031215611da157600080fd5b611daa836118af565b9150611db8602084016118af565b90509250929050565b60008060008060008060a08789031215611dda57600080fd5b611de3876118af565b9550611df1602088016118af565b94506040870135935060608701359250608087013567ffffffffffffffff811115611e1b57600080fd5b611e2789828a01611c91565b979a9699509497509295939492505050565b600181811c90821680611e4d57607f821691505b602082108103611e6d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611ef157611ef1611ec1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611f1b57611f1b611ef6565b500490565b60008219821115611f3357611f33611ec1565b500190565b600081518084526020808501945080840160005b83811015611f6857815187529582019590820190600101611f4c565b509495945050505050565b6001600160a01b0384168152606060208201819052600090611f9790830185611f38565b8281036040840152611fa98185611f38565b9695505050505050565b81835260006001600160fb1b03831115611fcc57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b0389811682528816602082015260a06040820181905260009061203f908301888a611fb3565b8281036060840152612052818789611fb3565b90508281036080840152612067818587611fe9565b9b9a5050505050505050505050565b60008351612088818460208801611919565b83519083019061209c818360208801611919565b64173539b7b760d91b9101908152600501949350505050565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03878116825286166020820152604081018590526060810184905260a0608082018190526000906121069083018486611fe9565b98975050505050505050565b60008282101561212457612124611ec1565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60006001820161218d5761218d611ec1565b5060010190565b6000826121a3576121a3611ef6565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611fa990830184611945565b6000602082840312156121ed57600080fd5b8151610b68816118e656fea2646970667358221220675bd399a0521b813b002ad0560fc1fad594010eb59d36d7c8d229eff9502a5b64736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a9586e4861df33d0740203744fd25a8c95df32d9000000000000000000000000000000000000000000000000000000000000008000000000000000000000000002937902a5e3734f156e168bd8685d0d17ee8a0800000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000004068747470733a2f2f617277656176652e6e65742f32454a7a61334c4f3837354e7870725455386d6f676949734643745963735951534647686f4e6b6a6473772f
-----Decoded View---------------
Arg [0] : tinyseedContractAddress_ (address): 0xA9586E4861Df33d0740203744FD25A8c95DF32D9
Arg [1] : baseURI_ (string): https://arweave.net/2EJza3LO875NxprTU8mogiIsFCtYcsYQSFGhoNkjdsw/
Arg [2] : royaltyRecipientAddress_ (address): 0x02937902A5e3734F156E168Bd8685d0D17EE8A08
Arg [3] : royaltyPercentageBasisPoints_ (uint256): 500
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000a9586e4861df33d0740203744fd25a8c95df32d9
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000002937902a5e3734f156e168bd8685d0d17ee8a08
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [5] : 68747470733a2f2f617277656176652e6e65742f32454a7a61334c4f3837354e
Arg [6] : 7870725455386d6f676949734643745963735951534647686f4e6b6a6473772f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.