Overview
TokenID
0
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Mechworm
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import '@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import 'base64-sol/base64.sol'; /* Presenting … … … … The Mark I Mech Suit, piloted by Edwone A contract wrapper that imbues Edwone with new scientific abilities. Introducing: the “Public Yoink” mechanic. Should Edwone ever get stuck again, Anyone can call the "yoink" function to free the NFT and have it visit a wallet of their choosing. from there Edwone may continue the mission to visit every wallet on the Ethereum blockchain. ——//—— With special thanks to Worm Disciples: - outerpockets.eth for the mech suit idea, prototype, and code review - markegli.eth for code review - meuleman.eth for evangelism */ contract Mechworm is Ownable, ERC721, ERC721Holder { using Strings for uint256; constructor(address _edwone) ERC721('Mechworm', 'MECH') { edwone = _edwone; } // // VARIABLES // // address of the Edwone contract address public edwone; // timestamp of the last time the mechworm was transferred uint256 public lastVisitTimestamp; // time before the mechworm can be yoinked by anyone uint256 public maxVisitDuration = 7 days; // on-chain SVG & JSON data to store & assemble art mapping(bytes16 => string) variables; mapping(bytes16 => bytes16[]) sequences; Template public template; struct Template { bytes16 name; // title of the NFT bytes16 desc; // description of the NFT (text under image) bytes16 graphics; // how to assemble the SVG bytes16 metadata; // how to assemble the JSON bytes16 imageURI; // encoding of the SVG for URIs bytes16 tokenURI; // encoding of the JSON for URIs } // // TRANSFERS // function transferFrom( address from, address to, uint tokenId ) public override { require( _isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not owner nor approved' ); lastVisitTimestamp = block.timestamp; _flashEject(from); _transfer(from, to, tokenId); } function safeTransferFrom( address from, address to, uint tokenId ) public override { safeTransferFrom(from, to, tokenId, ''); } function safeTransferFrom( address from, address to, uint tokenId, bytes memory _data ) public override { require( _isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not owner nor approved' ); lastVisitTimestamp = block.timestamp; _flashEject(from); _safeTransfer(from, to, tokenId, _data); } // wrapping in a try catch to prevent reverts function _flashEject(address target) internal { try this.flashEject(target) {} catch {} } // transfers Edwone to the address AND immediately yoinks // (this is what patches the yoink vulnerability) function flashEject(address target) external { require( _msgSender() == address(this), 'MECH: eject must be called from within the contract' ); // DON'T mint holograms for the owner OR disciples if (target != owner() && !IEdwone(edwone).isDisciple(target)) { IEdwone(edwone).propagate(target); IEdwone(edwone).yoink(); } } // now anyone can yoink the mechworm! function yoink() public { // if not the owner, do these checks if (_msgSender() != owner()) { // check time passed since last visit require( block.timestamp - lastVisitTimestamp >= maxVisitDuration, 'MECH: not enough time has passed since last visit' ); // ensure sender is not a disciple require( !IEdwone(edwone).isDisciple(_msgSender()), 'MECH: yoink caller cannot be a disciple' ); // ensure mechworm is not held by owner require( ownerOf(0) != owner(), 'MECH: cannot yoink from owner' ); } lastVisitTimestamp = block.timestamp; // we still want to leave a hologram for yoinks _flashEject(ownerOf(0)); _transfer(ownerOf(0), _msgSender(), 0); } // now anyone can yoink the mechworm TO someone else! function yoinkTo(address target) public { if (_msgSender() != owner()) { // check time passed since last visit require( block.timestamp - lastVisitTimestamp >= maxVisitDuration, 'MECH: not enough time has passed since last visit' ); // ensure target is not a disciple require( !IEdwone(edwone).isDisciple(target), 'MECH: yoinkTo target cannot be a disciple' ); // ensure mechworm is not held by owner require( ownerOf(0) != owner(), 'MECH: cannot yoink from owner' ); } lastVisitTimestamp = block.timestamp; // we still want to leave a hologram for yoinks _flashEject(ownerOf(0)); _transfer(ownerOf(0), target, 0); } function propagate(address to) public { safeTransferFrom(_msgSender(), to, 0); } // // VISUAL // // for a tokenId, return the SVG raw text function getGraphics(uint tokenId) public view returns (string memory) { return assembleSequence(tokenId, template.graphics); } // for a tokenId, return the JSON raw text function getMetadata(uint tokenId) public view returns (string memory) { return assembleSequence(tokenId, template.metadata); } // for a tokenId, return the SVG base64 encoded for data URI function imageURI(uint tokenId) public view returns (string memory) { return assembleSequence(tokenId, template.imageURI); } // for a tokenId, return the JSON base64 encoded for data URI function tokenURI(uint tokenId) public view override returns (string memory) { return assembleSequence(tokenId, template.tokenURI); } function assembleSequence(uint tokenId, bytes16 _sequence) internal view returns (string memory) { bytes16[] memory sequence = sequences[_sequence]; return assembleSequence(tokenId, sequence); } function assembleSequence(uint tokenId, bytes16[] memory sequence) internal view returns (string memory) { string memory acc; /* This loop does these things: 1. replace '_token_id' with the actual token id 2. recursively assemble any nested sequences (start with `$`) 3. encode sequence into base64 4. accumulate the variables */ for (uint i; i < sequence.length; i++) { // 1: replace '_token_id' with the actual token id if (sequence[i] == bytes16('_token_id')) { acc = join(acc, tokenId.toString()); } // 2: recursively assemble any nested sequences else if (sequence[i][0] == '$') { acc = join(acc, assembleSequence(tokenId, sequence[i])); } // 3: encode sequence into base64 else if (sequence[i][0] == '{') { string memory ecc; uint numEncode; // 3.1: figure out how many variables are to be encoded for (uint j = i + 1; j < sequence.length; j++) { if (sequence[j][0] == '}' && sequence[j][1] == sequence[i][1]) { break; } else { numEncode++; } } // 3.2: create a new build sequence bytes16[] memory encodeSequence = new bytes16[](numEncode); // 3.3: populate the new build sequence uint k; for (uint j = i + 1; j < sequence.length; j++) { if (k < numEncode) { encodeSequence[k] = sequence[j]; k++; i++; // CRITICAL: this increments the MAIN loop to prevent duplicates } else { break; } } // 3.4: encode & assemble the new build sequence ecc = assembleSequence(tokenId, encodeSequence); // 3.5: join the encoded string to the accumulated string acc = join(acc, encodeBase64(ecc)); } // 4: accumulate the variables else { acc = join(acc, variables[sequence[i]]); } } return acc; } function join(string memory _a, string memory _b) internal pure returns (string memory) { return string(abi.encodePacked(bytes(_a), bytes(_b))); } function encodeBase64(string memory _str) internal pure returns (string memory) { return string(abi.encodePacked(Base64.encode(bytes(_str)))); } // // OWNER // // put Edwone into the mech suit function insertWormIntoMech() external onlyOwner { // 1. ensure the Mechworm contract is the holder of the Edwone token require( address(this) == IERC721(edwone).ownerOf(0), 'MECH: must be ownerOf Edwone token' ); // 2. ensure that the Mechworm contract is the owner of the Edwone contract require( address(this) == Ownable(edwone).owner(), 'MECH: must be owner of Edwone contract' ); // 3. if mech suit has been minted, transfer to owner if (_exists(0)) { _transfer(ownerOf(0), owner(), 0); } // otherwise, mint it to the owner else { _mint(owner(), 0); } } // remove Edwone from the mech suit function ejectWormFromMech() external onlyOwner { // 1. transfer the Edwone token to the owner IERC721(edwone).transferFrom(address(this), owner(), 0); // 2. transfer ownership of the Edwone contract to the owner Ownable(edwone).transferOwnership(owner()); // 3. return the mech suit to the owner _transfer(ownerOf(0), owner(), 0); } // set how long the mech suit can visit before it can be yoinked function setMaxVisitDuration(uint256 _maxVisitDuration) external onlyOwner { maxVisitDuration = _maxVisitDuration; } // on-chain stuff function addVariables(bytes16[] memory keys, string[] memory vals) external onlyOwner { for (uint i; i < keys.length; i++) { variables[keys[i]] = vals[i]; } } function addSequences(bytes16[] memory keys, bytes16[][] memory vals) external onlyOwner { for (uint i; i < keys.length; i++) { sequences[keys[i]] = vals[i]; } } function addTemplate( bytes16 _name, bytes16 _desc, bytes16 _graphics, bytes16 _metadata, bytes16 _imageURI, bytes16 _tokenURI ) external onlyOwner { template = Template({ name: _name, desc: _desc, graphics: _graphics, metadata: _metadata, imageURI: _imageURI, tokenURI: _tokenURI }); } // withdraw balance function getPaid() external payable onlyOwner { require(payable(_msgSender()).send(address(this).balance)); } // accept ether sent receive() external payable {} } interface IEdwone { function isDisciple(address _address) external view returns (bool); function yoink() external; function propagate(address to) external; }
// 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.8.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 = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
{ "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":"_edwone","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"bytes16[]","name":"keys","type":"bytes16[]"},{"internalType":"bytes16[][]","name":"vals","type":"bytes16[][]"}],"name":"addSequences","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes16","name":"_name","type":"bytes16"},{"internalType":"bytes16","name":"_desc","type":"bytes16"},{"internalType":"bytes16","name":"_graphics","type":"bytes16"},{"internalType":"bytes16","name":"_metadata","type":"bytes16"},{"internalType":"bytes16","name":"_imageURI","type":"bytes16"},{"internalType":"bytes16","name":"_tokenURI","type":"bytes16"}],"name":"addTemplate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes16[]","name":"keys","type":"bytes16[]"},{"internalType":"string[]","name":"vals","type":"string[]"}],"name":"addVariables","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"edwone","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ejectWormFromMech","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"flashEject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getGraphics","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMetadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPaid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"imageURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"insertWormIntoMech","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastVisitTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxVisitDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","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":[{"internalType":"address","name":"to","type":"address"}],"name":"propagate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxVisitDuration","type":"uint256"}],"name":"setMaxVisitDuration","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":[],"name":"template","outputs":[{"internalType":"bytes16","name":"name","type":"bytes16"},{"internalType":"bytes16","name":"desc","type":"bytes16"},{"internalType":"bytes16","name":"graphics","type":"bytes16"},{"internalType":"bytes16","name":"metadata","type":"bytes16"},{"internalType":"bytes16","name":"imageURI","type":"bytes16"},{"internalType":"bytes16","name":"tokenURI","type":"bytes16"}],"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":"yoink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"yoinkTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405262093a806009553480156200001857600080fd5b5060405162003347380380620033478339810160408190526200003b91620001e2565b604051806040016040528060088152602001674d656368776f726d60c01b8152506040518060400160405280600481526020016309a8a86960e31b815250620000936200008d620000e860201b60201c565b620000ec565b8151620000a89060019060208501906200013c565b508051620000be9060029060208401906200013c565b5050600780546001600160a01b0319166001600160a01b0393909316929092179091555062000251565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200014a9062000214565b90600052602060002090601f0160209004810192826200016e5760008555620001b9565b82601f106200018957805160ff1916838001178555620001b9565b82800160010185558215620001b9579182015b82811115620001b95782518255916020019190600101906200019c565b50620001c7929150620001cb565b5090565b5b80821115620001c75760008155600101620001cc565b600060208284031215620001f557600080fd5b81516001600160a01b03811681146200020d57600080fd5b9392505050565b600181811c908216806200022957607f821691505b602082108114156200024b57634e487b7160e01b600052602260045260246000fd5b50919050565b6130e680620002616000396000f3fe6080604052600436106102085760003560e01c8063715018a611610118578063b88d4fde116100a0578063e985e9c51161006f578063e985e9c514610638578063ea675a5c14610681578063ee407e6c14610696578063f2fde38b146106b6578063f94c20b9146106d657600080fd5b8063b88d4fde146105d0578063c4f86aa6146105f0578063c87b56dd14610610578063cf41d6f81461063057600080fd5b806390f761fe116100e757806390f761fe1461054657806395d89b41146105665780639846cd9e1461057b578063a22cb46514610590578063a574cea4146105b057600080fd5b8063715018a6146104d357806378a882e8146104e85780638da5cb5b146105085780638f742d161461052657600080fd5b80634b6049af1161019b578063653634cd1161016a578063653634cd146103cd5780636b73e23f146103ed5780636c11b15c1461040d5780636f2ddd931461042d57806370a08231146104b357600080fd5b80634b6049af1461035e5780634d39fd85146103735780635c2a8296146103975780636352211e146103ad57600080fd5b8063095ea7b3116101d7578063095ea7b3146102c5578063150b7a02146102e557806323b872dd1461031e57806342842e0e1461033e57600080fd5b806301ffc9a71461021457806306fdde0314610249578063074b27031461026b578063081812fc1461028d57600080fd5b3661020f57005b600080fd5b34801561022057600080fd5b5061023461022f366004612c5b565b6106f6565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b5061025e610748565b6040516102409190612d62565b34801561027757600080fd5b5061028b61028636600461286c565b6107da565b005b34801561029957600080fd5b506102ad6102a8366004612c95565b6109a3565b6040516001600160a01b039091168152602001610240565b3480156102d157600080fd5b5061028b6102e03660046129d5565b6109ca565b3480156102f157600080fd5b50610305610300366004612927565b610ae0565b6040516001600160e01b03199091168152602001610240565b34801561032a57600080fd5b5061028b6103393660046128e6565b610af1565b34801561034a57600080fd5b5061028b6103593660046128e6565b610b2f565b34801561036a57600080fd5b5061028b610b4a565b34801561037f57600080fd5b5061038960085481565b604051908152602001610240565b3480156103a357600080fd5b5061038960095481565b3480156103b957600080fd5b506102ad6103c8366004612c95565b610c7e565b3480156103d957600080fd5b5061028b6103e836600461286c565b610cde565b3480156103f957600080fd5b5061028b610408366004612adc565b610eb0565b34801561041957600080fd5b5061028b610428366004612be7565b610f44565b34801561043957600080fd5b50600c54600d54600e5461047092608081811b93600160801b92839004821b9381831b9391829004831b9281811b92909104901b86565b604080516001600160801b0319978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c001610240565b3480156104bf57600080fd5b506103896104ce36600461286c565b610fbe565b3480156104df57600080fd5b5061028b611044565b3480156104f457600080fd5b5061025e610503366004612c95565b611056565b34801561051457600080fd5b506000546001600160a01b03166102ad565b34801561053257600080fd5b5061025e610541366004612c95565b61106a565b34801561055257600080fd5b5061028b610561366004612c95565b61107e565b34801561057257600080fd5b5061025e61108b565b34801561058757600080fd5b5061028b61109a565b34801561059c57600080fd5b5061028b6105ab3660046129a7565b61125a565b3480156105bc57600080fd5b5061025e6105cb366004612c95565b611269565b3480156105dc57600080fd5b5061028b6105eb366004612927565b611284565b3480156105fc57600080fd5b506007546102ad906001600160a01b031681565b34801561061c57600080fd5b5061025e61062b366004612c95565b6112c9565b61028b6112e4565b34801561064457600080fd5b506102346106533660046128ad565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561068d57600080fd5b5061028b611310565b3480156106a257600080fd5b5061028b6106b136600461286c565b611556565b3480156106c257600080fd5b5061028b6106d136600461286c565b611562565b3480156106e257600080fd5b5061028b6106f1366004612a01565b6115d8565b60006001600160e01b031982166380ac58cd60e01b148061072757506001600160e01b03198216635b5e139f60e01b145b8061074257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461075790612f9f565b80601f016020809104026020016040519081016040528092919081815260200182805461078390612f9f565b80156107d05780601f106107a5576101008083540402835291602001916107d0565b820191906000526020600020905b8154815290600101906020018083116107b357829003601f168201915b5050505050905090565b6000546001600160a01b03163314610975576009546008546107fc9042612f5c565b10156108235760405162461bcd60e51b815260040161081a90612d75565b60405180910390fd5b6007546040516388072c7960e01b81526001600160a01b038381166004830152909116906388072c799060240160206040518083038186803b15801561086857600080fd5b505afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a09190612bca565b156108ff5760405162461bcd60e51b815260206004820152602960248201527f4d4543483a20796f696e6b546f207461726765742063616e6e6f742062652061604482015268206469736369706c6560b81b606482015260840161081a565b6000546001600160a01b03166001600160a01b031661091e6000610c7e565b6001600160a01b031614156109755760405162461bcd60e51b815260206004820152601d60248201527f4d4543483a2063616e6e6f7420796f696e6b2066726f6d206f776e6572000000604482015260640161081a565b4260085561098b6109866000610c7e565b61166c565b6109a06109986000610c7e565b8260006116c5565b50565b60006109ae82611836565b506000908152600560205260409020546001600160a01b031690565b60006109d582610c7e565b9050806001600160a01b0316836001600160a01b03161415610a435760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161081a565b336001600160a01b0382161480610a5f5750610a5f8133610653565b610ad15760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161081a565b610adb8383611895565b505050565b630a85bd0160e11b5b949350505050565b610afb3382611903565b610b175760405162461bcd60e51b815260040161081a90612e5d565b42600855610b248361166c565b610adb8383836116c5565b610adb83838360405180602001604052806000815250611284565b610b52611981565b6007546001600160a01b03166323b872dd30610b766000546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260006044820152606401600060405180830381600087803b158015610bc557600080fd5b505af1158015610bd9573d6000803e3d6000fd5b50506007546001600160a01b0316915063f2fde38b9050610c026000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b158015610c4357600080fd5b505af1158015610c57573d6000803e3d6000fd5b50505050610c7c610c686000610c7e565b6000546001600160a01b03165b60006116c5565b565b6000818152600360205260408120546001600160a01b0316806107425760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161081a565b333014610d495760405162461bcd60e51b815260206004820152603360248201527f4d4543483a20656a656374206d7573742062652063616c6c65642066726f6d206044820152721dda5d1a1a5b881d1a194818dbdb9d1c9858dd606a1b606482015260840161081a565b6000546001600160a01b03828116911614801590610de157506007546040516388072c7960e01b81526001600160a01b038381166004830152909116906388072c799060240160206040518083038186803b158015610da757600080fd5b505afa158015610dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddf9190612bca565b155b156109a057600754604051633b901f9b60e21b81526001600160a01b0383811660048301529091169063ee407e6c90602401600060405180830381600087803b158015610e2d57600080fd5b505af1158015610e41573d6000803e3d6000fd5b50505050600760009054906101000a90046001600160a01b03166001600160a01b0316639846cd9e6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9557600080fd5b505af1158015610ea9573d6000803e3d6000fd5b5050505050565b610eb8611981565b60005b8251811015610adb57818181518110610ed657610ed661300b565b6020026020010151600a6000858481518110610ef457610ef461300b565b60200260200101516001600160801b0319166001600160801b03191681526020019081526020016000209080519060200190610f3192919061263c565b5080610f3c81612fda565b915050610ebb565b610f4c611981565b6040805160c0810182526001600160801b03198881168252878116602083015286811692820192909252848216606082015283821660808083019190915291831660a09091015295861c600160801b95871c860217600c5592851c91851c840291909117600d55831c921c0217600e55565b60006001600160a01b0382166110285760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161081a565b506001600160a01b031660009081526004602052604090205490565b61104c611981565b610c7c60006119db565b600d5460609061074290839060801b611a2b565b600e5460609061074290839060801b611a2b565b611086611981565b600955565b60606002805461075790612f9f565b6000546001600160a01b03163314611236576009546008546110bc9042612f5c565b10156110da5760405162461bcd60e51b815260040161081a90612d75565b6007546001600160a01b03166388072c79336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561112b57600080fd5b505afa15801561113f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111639190612bca565b156111c05760405162461bcd60e51b815260206004820152602760248201527f4d4543483a20796f696e6b2063616c6c65722063616e6e6f742062652061206460448201526669736369706c6560c81b606482015260840161081a565b6000546001600160a01b03166001600160a01b03166111df6000610c7e565b6001600160a01b031614156112365760405162461bcd60e51b815260206004820152601d60248201527f4d4543483a2063616e6e6f7420796f696e6b2066726f6d206f776e6572000000604482015260640161081a565b426008556112476109866000610c7e565b610c7c6112546000610c7e565b33610c75565b611265338383611ac9565b5050565b600d54606090610742908390600160801b900460801b611a2b565b61128e3383611903565b6112aa5760405162461bcd60e51b815260040161081a90612e5d565b426008556112b78461166c565b6112c384848484611b98565b50505050565b600e54606090610742908390600160801b900460801b611a2b565b6112ec611981565b60405133904780156108fc02916000818181858888f19350505050610c7c57600080fd5b611318611981565b6007546040516331a9108f60e11b8152600060048201526001600160a01b0390911690636352211e9060240160206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113949190612890565b6001600160a01b0316306001600160a01b0316146113ff5760405162461bcd60e51b815260206004820152602260248201527f4d4543483a206d757374206265206f776e65724f66204564776f6e6520746f6b60448201526132b760f11b606482015260840161081a565b600760009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561144d57600080fd5b505afa158015611461573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114859190612890565b6001600160a01b0316306001600160a01b0316146114f45760405162461bcd60e51b815260206004820152602660248201527f4d4543483a206d757374206265206f776e6572206f66204564776f6e6520636f6044820152651b9d1c9858dd60d21b606482015260840161081a565b6000805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546001600160a01b03161561153a57610c7c610c686000610c7e565b610c7c61154f6000546001600160a01b031690565b6000611bcb565b6109a033826000610b2f565b61156a611981565b6001600160a01b0381166115cf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081a565b6109a0816119db565b6115e0611981565b60005b8251811015610adb578181815181106115fe576115fe61300b565b6020026020010151600b600085848151811061161c5761161c61300b565b60200260200101516001600160801b0319166001600160801b031916815260200190815260200160002090805190602001906116599291906126c0565b508061166481612fda565b9150506115e3565b60405163653634cd60e01b81526001600160a01b0382166004820152309063653634cd90602401600060405180830381600087803b1580156116ad57600080fd5b505af19250505080156116be575060015b6109a05750565b826001600160a01b03166116d882610c7e565b6001600160a01b0316146116fe5760405162461bcd60e51b815260040161081a90612e18565b6001600160a01b0382166117605760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161081a565b61176d8383836001611d64565b826001600160a01b031661178082610c7e565b6001600160a01b0316146117a65760405162461bcd60e51b815260040161081a90612e18565b600081815260056020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260048552838620805460001901905590871680865283862080546001019055868652600390945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000818152600360205260409020546001600160a01b03166109a05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161081a565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118ca82610c7e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061190f83610c7e565b9050806001600160a01b0316846001600160a01b0316148061195657506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b80610ae95750836001600160a01b031661196f846109a3565b6001600160a01b031614949350505050565b6000546001600160a01b03163314610c7c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161081a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160801b031981166000908152600b60209081526040808320805482518185028101850190935280835260609493830182828015611ab857602002820191906000526020600020906000905b82829054906101000a900460801b6001600160801b03191681526020019060100190602082600f01049283019260010382029150808411611a7a5790505b50505050509050610ae98482611dec565b816001600160a01b0316836001600160a01b03161415611b2b5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161081a565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611ba38484846116c5565b611baf84848484612202565b6112c35760405162461bcd60e51b815260040161081a90612dc6565b6001600160a01b038216611c215760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161081a565b6000818152600360205260409020546001600160a01b031615611c865760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081a565b611c94600083836001611d64565b6000818152600360205260409020546001600160a01b031615611cf95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081a565b6001600160a01b038216600081815260046020908152604080832080546001019055848352600390915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60018111156112c3576001600160a01b03841615611daa576001600160a01b03841660009081526004602052604081208054839290611da4908490612f5c565b90915550505b6001600160a01b038316156112c3576001600160a01b03831660009081526004602052604081208054839290611de1908490612f03565b909155505050505050565b60608060005b83518110156121fa576817dd1bdad95b97da5960ba1b6001600160801b031916848281518110611e2457611e2461300b565b60200260200101516001600160801b0319161415611e5557611e4e82611e498761230c565b6123a1565b91506121e8565b838181518110611e6757611e6761300b565b6020026020010151600060108110611e8157611e8161300b565b1a60f81b6001600160f81b031916600960fa1b1415611ec157611e4e82611e4987878581518110611eb457611eb461300b565b6020026020010151611a2b565b838181518110611ed357611ed361300b565b6020026020010151600060108110611eed57611eed61300b565b1a60f81b6001600160f81b031916607b60f81b1415612113576060600080611f16846001612f03565b90505b865181101561200857868181518110611f3457611f3461300b565b6020026020010151600060108110611f4e57611f4e61300b565b1a60f81b6001600160f81b031916607d60f81b148015611fdf5750868481518110611f7b57611f7b61300b565b6020026020010151600160108110611f9557611f9561300b565b1a60f81b6001600160f81b031916878281518110611fb557611fb561300b565b6020026020010151600160108110611fcf57611fcf61300b565b1a60f81b6001600160f81b031916145b15611fe957612008565b81611ff381612fda565b9250508061200081612fda565b915050611f19565b5060008167ffffffffffffffff81111561202457612024613021565b60405190808252806020026020018201604052801561204d578160200160208202803683370190505b50905060008061205e866001612f03565b90505b88518110156120ee57838210156120d7578881815181106120845761208461300b565b602002602001015183838151811061209e5761209e61300b565b6001600160801b031990921660209283029190910190910152816120c181612fda565b92505085806120cf90612fda565b9650506120dc565b6120ee565b806120e681612fda565b915050612061565b506120f98983611dec565b935061210886611e49866123cd565b9550505050506121e8565b6121e582600a600087858151811061212d5761212d61300b565b60200260200101516001600160801b0319166001600160801b0319168152602001908152602001600020805461216290612f9f565b80601f016020809104026020016040519081016040528092919081815260200182805461218e90612f9f565b80156121db5780601f106121b0576101008083540402835291602001916121db565b820191906000526020600020905b8154815290600101906020018083116121be57829003601f168201915b50505050506123a1565b91505b806121f281612fda565b915050611df2565b509392505050565b60006001600160a01b0384163b1561230457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612246903390899088908890600401612d25565b602060405180830381600087803b15801561226057600080fd5b505af1925050508015612290575060408051601f3d908101601f1916820190925261228d91810190612c78565b60015b6122ea573d8080156122be576040519150601f19603f3d011682016040523d82523d6000602084013e6122c3565b606091505b5080516122e25760405162461bcd60e51b815260040161081a90612dc6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610ae9565b506001610ae9565b60606000612319836123fe565b600101905060008167ffffffffffffffff81111561233957612339613021565b6040519080825280601f01601f191660200182016040528015612363576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461239c576121fa565b61236d565b606082826040516020016123b6929190612cda565b604051602081830303815290604052905092915050565b60606123d8826124d6565b6040516020016123e89190612d09565b6040516020818303038152906040529050919050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061243d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612469576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061248757662386f26fc10000830492506010015b6305f5e100831061249f576305f5e100830492506008015b61271083106124b357612710830492506004015b606483106124c5576064830492506002015b600a83106107425760010192915050565b60608151600014156124f657505060408051602081019091526000815290565b600060405180606001604052806040815260200161307160409139905060006003845160026125259190612f03565b61252f9190612f1b565b61253a906004612f3d565b90506000612549826020612f03565b67ffffffffffffffff81111561256157612561613021565b6040519080825280601f01601f19166020018201604052801561258b576020820181803683370190505b509050818152600183018586518101602084015b818310156125f7576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161259f565b60038951066001811461261157600281146126225761262e565b613d3d60f01b60011983015261262e565b603d60f81b6000198301525b509398975050505050505050565b82805461264890612f9f565b90600052602060002090601f01602090048101928261266a57600085556126b0565b82601f1061268357805160ff19168380011785556126b0565b828001600101855582156126b0579182015b828111156126b0578251825591602001919060010190612695565b506126bc929150612769565b5090565b828054828255906000526020600020906001016002900481019282156126b05791602002820160005b8382111561272d57835183826101000a8154816001600160801b03021916908360801c02179055509260200192601001602081600f010492830192600103026126e9565b80156127605782816101000a8154906001600160801b030219169055601001602081600f0104928301926001030261272d565b50506126bc9291505b5b808211156126bc576000815560010161276a565b600067ffffffffffffffff83111561279857612798613021565b6127ab601f8401601f1916602001612eae565b90508281528383830111156127bf57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126127e757600080fd5b813560206127fc6127f783612edf565b612eae565b80838252828201915082860187848660051b890101111561281c57600080fd5b60005b85811015612842576128308261284f565b8452928401929084019060010161281f565b5090979650505050505050565b80356001600160801b03198116811461286757600080fd5b919050565b60006020828403121561287e57600080fd5b813561288981613037565b9392505050565b6000602082840312156128a257600080fd5b815161288981613037565b600080604083850312156128c057600080fd5b82356128cb81613037565b915060208301356128db81613037565b809150509250929050565b6000806000606084860312156128fb57600080fd5b833561290681613037565b9250602084013561291681613037565b929592945050506040919091013590565b6000806000806080858703121561293d57600080fd5b843561294881613037565b9350602085013561295881613037565b925060408501359150606085013567ffffffffffffffff81111561297b57600080fd5b8501601f8101871361298c57600080fd5b61299b8782356020840161277e565b91505092959194509250565b600080604083850312156129ba57600080fd5b82356129c581613037565b915060208301356128db8161304c565b600080604083850312156129e857600080fd5b82356129f381613037565b946020939093013593505050565b60008060408385031215612a1457600080fd5b823567ffffffffffffffff80821115612a2c57600080fd5b612a38868387016127d6565b9350602091508185013581811115612a4f57600080fd5b8501601f81018713612a6057600080fd5b8035612a6e6127f782612edf565b8082825285820191508584018a878560051b8701011115612a8e57600080fd5b6000805b85811015612ac957823588811115612aa8578283fd5b612ab68e8b838b01016127d6565b8652509388019391880191600101612a92565b5050508096505050505050509250929050565b6000806040808486031215612af057600080fd5b833567ffffffffffffffff80821115612b0857600080fd5b612b14878388016127d6565b9450602091508186013581811115612b2b57600080fd5b8601601f81018813612b3c57600080fd5b8035612b4a6127f782612edf565b8082825285820191508584018b878560051b8701011115612b6a57600080fd5b60005b84811015612bb857813587811115612b8457600080fd5b8601603f81018e13612b9557600080fd5b612ba58e8a8301358c840161277e565b8552509287019290870190600101612b6d565b50989b909a5098505050505050505050565b600060208284031215612bdc57600080fd5b81516128898161304c565b60008060008060008060c08789031215612c0057600080fd5b612c098761284f565b9550612c176020880161284f565b9450612c256040880161284f565b9350612c336060880161284f565b9250612c416080880161284f565b9150612c4f60a0880161284f565b90509295509295509295565b600060208284031215612c6d57600080fd5b81356128898161305a565b600060208284031215612c8a57600080fd5b81516128898161305a565b600060208284031215612ca757600080fd5b5035919050565b60008151808452612cc6816020860160208601612f73565b601f01601f19169290920160200192915050565b60008351612cec818460208801612f73565b835190830190612d00818360208801612f73565b01949350505050565b60008251612d1b818460208701612f73565b9190910192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d5890830184612cae565b9695505050505050565b6020815260006128896020830184612cae565b60208082526031908201527f4d4543483a206e6f7420656e6f7567682074696d652068617320706173736564604082015270081cda5b98d9481b185cdd081d9a5cda5d607a1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715612ed757612ed7613021565b604052919050565b600067ffffffffffffffff821115612ef957612ef9613021565b5060051b60200190565b60008219821115612f1657612f16612ff5565b500190565b600082612f3857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612f5757612f57612ff5565b500290565b600082821015612f6e57612f6e612ff5565b500390565b60005b83811015612f8e578181015183820152602001612f76565b838111156112c35750506000910152565b600181811c90821680612fb357607f821691505b60208210811415612fd457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612fee57612fee612ff5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146109a057600080fd5b80151581146109a057600080fd5b6001600160e01b0319811681146109a057600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212201b47a44dc0656b7344346a546397e879cc47097ccfc77626b7b6b24471a76fbb64736f6c63430008070033000000000000000000000000f65d6475869f61c6dce6ac194b6a7dbe45a91c63
Deployed Bytecode
0x6080604052600436106102085760003560e01c8063715018a611610118578063b88d4fde116100a0578063e985e9c51161006f578063e985e9c514610638578063ea675a5c14610681578063ee407e6c14610696578063f2fde38b146106b6578063f94c20b9146106d657600080fd5b8063b88d4fde146105d0578063c4f86aa6146105f0578063c87b56dd14610610578063cf41d6f81461063057600080fd5b806390f761fe116100e757806390f761fe1461054657806395d89b41146105665780639846cd9e1461057b578063a22cb46514610590578063a574cea4146105b057600080fd5b8063715018a6146104d357806378a882e8146104e85780638da5cb5b146105085780638f742d161461052657600080fd5b80634b6049af1161019b578063653634cd1161016a578063653634cd146103cd5780636b73e23f146103ed5780636c11b15c1461040d5780636f2ddd931461042d57806370a08231146104b357600080fd5b80634b6049af1461035e5780634d39fd85146103735780635c2a8296146103975780636352211e146103ad57600080fd5b8063095ea7b3116101d7578063095ea7b3146102c5578063150b7a02146102e557806323b872dd1461031e57806342842e0e1461033e57600080fd5b806301ffc9a71461021457806306fdde0314610249578063074b27031461026b578063081812fc1461028d57600080fd5b3661020f57005b600080fd5b34801561022057600080fd5b5061023461022f366004612c5b565b6106f6565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b5061025e610748565b6040516102409190612d62565b34801561027757600080fd5b5061028b61028636600461286c565b6107da565b005b34801561029957600080fd5b506102ad6102a8366004612c95565b6109a3565b6040516001600160a01b039091168152602001610240565b3480156102d157600080fd5b5061028b6102e03660046129d5565b6109ca565b3480156102f157600080fd5b50610305610300366004612927565b610ae0565b6040516001600160e01b03199091168152602001610240565b34801561032a57600080fd5b5061028b6103393660046128e6565b610af1565b34801561034a57600080fd5b5061028b6103593660046128e6565b610b2f565b34801561036a57600080fd5b5061028b610b4a565b34801561037f57600080fd5b5061038960085481565b604051908152602001610240565b3480156103a357600080fd5b5061038960095481565b3480156103b957600080fd5b506102ad6103c8366004612c95565b610c7e565b3480156103d957600080fd5b5061028b6103e836600461286c565b610cde565b3480156103f957600080fd5b5061028b610408366004612adc565b610eb0565b34801561041957600080fd5b5061028b610428366004612be7565b610f44565b34801561043957600080fd5b50600c54600d54600e5461047092608081811b93600160801b92839004821b9381831b9391829004831b9281811b92909104901b86565b604080516001600160801b0319978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c001610240565b3480156104bf57600080fd5b506103896104ce36600461286c565b610fbe565b3480156104df57600080fd5b5061028b611044565b3480156104f457600080fd5b5061025e610503366004612c95565b611056565b34801561051457600080fd5b506000546001600160a01b03166102ad565b34801561053257600080fd5b5061025e610541366004612c95565b61106a565b34801561055257600080fd5b5061028b610561366004612c95565b61107e565b34801561057257600080fd5b5061025e61108b565b34801561058757600080fd5b5061028b61109a565b34801561059c57600080fd5b5061028b6105ab3660046129a7565b61125a565b3480156105bc57600080fd5b5061025e6105cb366004612c95565b611269565b3480156105dc57600080fd5b5061028b6105eb366004612927565b611284565b3480156105fc57600080fd5b506007546102ad906001600160a01b031681565b34801561061c57600080fd5b5061025e61062b366004612c95565b6112c9565b61028b6112e4565b34801561064457600080fd5b506102346106533660046128ad565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561068d57600080fd5b5061028b611310565b3480156106a257600080fd5b5061028b6106b136600461286c565b611556565b3480156106c257600080fd5b5061028b6106d136600461286c565b611562565b3480156106e257600080fd5b5061028b6106f1366004612a01565b6115d8565b60006001600160e01b031982166380ac58cd60e01b148061072757506001600160e01b03198216635b5e139f60e01b145b8061074257506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461075790612f9f565b80601f016020809104026020016040519081016040528092919081815260200182805461078390612f9f565b80156107d05780601f106107a5576101008083540402835291602001916107d0565b820191906000526020600020905b8154815290600101906020018083116107b357829003601f168201915b5050505050905090565b6000546001600160a01b03163314610975576009546008546107fc9042612f5c565b10156108235760405162461bcd60e51b815260040161081a90612d75565b60405180910390fd5b6007546040516388072c7960e01b81526001600160a01b038381166004830152909116906388072c799060240160206040518083038186803b15801561086857600080fd5b505afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a09190612bca565b156108ff5760405162461bcd60e51b815260206004820152602960248201527f4d4543483a20796f696e6b546f207461726765742063616e6e6f742062652061604482015268206469736369706c6560b81b606482015260840161081a565b6000546001600160a01b03166001600160a01b031661091e6000610c7e565b6001600160a01b031614156109755760405162461bcd60e51b815260206004820152601d60248201527f4d4543483a2063616e6e6f7420796f696e6b2066726f6d206f776e6572000000604482015260640161081a565b4260085561098b6109866000610c7e565b61166c565b6109a06109986000610c7e565b8260006116c5565b50565b60006109ae82611836565b506000908152600560205260409020546001600160a01b031690565b60006109d582610c7e565b9050806001600160a01b0316836001600160a01b03161415610a435760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161081a565b336001600160a01b0382161480610a5f5750610a5f8133610653565b610ad15760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161081a565b610adb8383611895565b505050565b630a85bd0160e11b5b949350505050565b610afb3382611903565b610b175760405162461bcd60e51b815260040161081a90612e5d565b42600855610b248361166c565b610adb8383836116c5565b610adb83838360405180602001604052806000815250611284565b610b52611981565b6007546001600160a01b03166323b872dd30610b766000546001600160a01b031690565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260006044820152606401600060405180830381600087803b158015610bc557600080fd5b505af1158015610bd9573d6000803e3d6000fd5b50506007546001600160a01b0316915063f2fde38b9050610c026000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b158015610c4357600080fd5b505af1158015610c57573d6000803e3d6000fd5b50505050610c7c610c686000610c7e565b6000546001600160a01b03165b60006116c5565b565b6000818152600360205260408120546001600160a01b0316806107425760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161081a565b333014610d495760405162461bcd60e51b815260206004820152603360248201527f4d4543483a20656a656374206d7573742062652063616c6c65642066726f6d206044820152721dda5d1a1a5b881d1a194818dbdb9d1c9858dd606a1b606482015260840161081a565b6000546001600160a01b03828116911614801590610de157506007546040516388072c7960e01b81526001600160a01b038381166004830152909116906388072c799060240160206040518083038186803b158015610da757600080fd5b505afa158015610dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddf9190612bca565b155b156109a057600754604051633b901f9b60e21b81526001600160a01b0383811660048301529091169063ee407e6c90602401600060405180830381600087803b158015610e2d57600080fd5b505af1158015610e41573d6000803e3d6000fd5b50505050600760009054906101000a90046001600160a01b03166001600160a01b0316639846cd9e6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e9557600080fd5b505af1158015610ea9573d6000803e3d6000fd5b5050505050565b610eb8611981565b60005b8251811015610adb57818181518110610ed657610ed661300b565b6020026020010151600a6000858481518110610ef457610ef461300b565b60200260200101516001600160801b0319166001600160801b03191681526020019081526020016000209080519060200190610f3192919061263c565b5080610f3c81612fda565b915050610ebb565b610f4c611981565b6040805160c0810182526001600160801b03198881168252878116602083015286811692820192909252848216606082015283821660808083019190915291831660a09091015295861c600160801b95871c860217600c5592851c91851c840291909117600d55831c921c0217600e55565b60006001600160a01b0382166110285760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161081a565b506001600160a01b031660009081526004602052604090205490565b61104c611981565b610c7c60006119db565b600d5460609061074290839060801b611a2b565b600e5460609061074290839060801b611a2b565b611086611981565b600955565b60606002805461075790612f9f565b6000546001600160a01b03163314611236576009546008546110bc9042612f5c565b10156110da5760405162461bcd60e51b815260040161081a90612d75565b6007546001600160a01b03166388072c79336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561112b57600080fd5b505afa15801561113f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111639190612bca565b156111c05760405162461bcd60e51b815260206004820152602760248201527f4d4543483a20796f696e6b2063616c6c65722063616e6e6f742062652061206460448201526669736369706c6560c81b606482015260840161081a565b6000546001600160a01b03166001600160a01b03166111df6000610c7e565b6001600160a01b031614156112365760405162461bcd60e51b815260206004820152601d60248201527f4d4543483a2063616e6e6f7420796f696e6b2066726f6d206f776e6572000000604482015260640161081a565b426008556112476109866000610c7e565b610c7c6112546000610c7e565b33610c75565b611265338383611ac9565b5050565b600d54606090610742908390600160801b900460801b611a2b565b61128e3383611903565b6112aa5760405162461bcd60e51b815260040161081a90612e5d565b426008556112b78461166c565b6112c384848484611b98565b50505050565b600e54606090610742908390600160801b900460801b611a2b565b6112ec611981565b60405133904780156108fc02916000818181858888f19350505050610c7c57600080fd5b611318611981565b6007546040516331a9108f60e11b8152600060048201526001600160a01b0390911690636352211e9060240160206040518083038186803b15801561135c57600080fd5b505afa158015611370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113949190612890565b6001600160a01b0316306001600160a01b0316146113ff5760405162461bcd60e51b815260206004820152602260248201527f4d4543483a206d757374206265206f776e65724f66204564776f6e6520746f6b60448201526132b760f11b606482015260840161081a565b600760009054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561144d57600080fd5b505afa158015611461573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114859190612890565b6001600160a01b0316306001600160a01b0316146114f45760405162461bcd60e51b815260206004820152602660248201527f4d4543483a206d757374206265206f776e6572206f66204564776f6e6520636f6044820152651b9d1c9858dd60d21b606482015260840161081a565b6000805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546001600160a01b03161561153a57610c7c610c686000610c7e565b610c7c61154f6000546001600160a01b031690565b6000611bcb565b6109a033826000610b2f565b61156a611981565b6001600160a01b0381166115cf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081a565b6109a0816119db565b6115e0611981565b60005b8251811015610adb578181815181106115fe576115fe61300b565b6020026020010151600b600085848151811061161c5761161c61300b565b60200260200101516001600160801b0319166001600160801b031916815260200190815260200160002090805190602001906116599291906126c0565b508061166481612fda565b9150506115e3565b60405163653634cd60e01b81526001600160a01b0382166004820152309063653634cd90602401600060405180830381600087803b1580156116ad57600080fd5b505af19250505080156116be575060015b6109a05750565b826001600160a01b03166116d882610c7e565b6001600160a01b0316146116fe5760405162461bcd60e51b815260040161081a90612e18565b6001600160a01b0382166117605760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161081a565b61176d8383836001611d64565b826001600160a01b031661178082610c7e565b6001600160a01b0316146117a65760405162461bcd60e51b815260040161081a90612e18565b600081815260056020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260048552838620805460001901905590871680865283862080546001019055868652600390945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000818152600360205260409020546001600160a01b03166109a05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161081a565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118ca82610c7e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061190f83610c7e565b9050806001600160a01b0316846001600160a01b0316148061195657506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b80610ae95750836001600160a01b031661196f846109a3565b6001600160a01b031614949350505050565b6000546001600160a01b03163314610c7c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161081a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160801b031981166000908152600b60209081526040808320805482518185028101850190935280835260609493830182828015611ab857602002820191906000526020600020906000905b82829054906101000a900460801b6001600160801b03191681526020019060100190602082600f01049283019260010382029150808411611a7a5790505b50505050509050610ae98482611dec565b816001600160a01b0316836001600160a01b03161415611b2b5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161081a565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611ba38484846116c5565b611baf84848484612202565b6112c35760405162461bcd60e51b815260040161081a90612dc6565b6001600160a01b038216611c215760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161081a565b6000818152600360205260409020546001600160a01b031615611c865760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081a565b611c94600083836001611d64565b6000818152600360205260409020546001600160a01b031615611cf95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081a565b6001600160a01b038216600081815260046020908152604080832080546001019055848352600390915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60018111156112c3576001600160a01b03841615611daa576001600160a01b03841660009081526004602052604081208054839290611da4908490612f5c565b90915550505b6001600160a01b038316156112c3576001600160a01b03831660009081526004602052604081208054839290611de1908490612f03565b909155505050505050565b60608060005b83518110156121fa576817dd1bdad95b97da5960ba1b6001600160801b031916848281518110611e2457611e2461300b565b60200260200101516001600160801b0319161415611e5557611e4e82611e498761230c565b6123a1565b91506121e8565b838181518110611e6757611e6761300b565b6020026020010151600060108110611e8157611e8161300b565b1a60f81b6001600160f81b031916600960fa1b1415611ec157611e4e82611e4987878581518110611eb457611eb461300b565b6020026020010151611a2b565b838181518110611ed357611ed361300b565b6020026020010151600060108110611eed57611eed61300b565b1a60f81b6001600160f81b031916607b60f81b1415612113576060600080611f16846001612f03565b90505b865181101561200857868181518110611f3457611f3461300b565b6020026020010151600060108110611f4e57611f4e61300b565b1a60f81b6001600160f81b031916607d60f81b148015611fdf5750868481518110611f7b57611f7b61300b565b6020026020010151600160108110611f9557611f9561300b565b1a60f81b6001600160f81b031916878281518110611fb557611fb561300b565b6020026020010151600160108110611fcf57611fcf61300b565b1a60f81b6001600160f81b031916145b15611fe957612008565b81611ff381612fda565b9250508061200081612fda565b915050611f19565b5060008167ffffffffffffffff81111561202457612024613021565b60405190808252806020026020018201604052801561204d578160200160208202803683370190505b50905060008061205e866001612f03565b90505b88518110156120ee57838210156120d7578881815181106120845761208461300b565b602002602001015183838151811061209e5761209e61300b565b6001600160801b031990921660209283029190910190910152816120c181612fda565b92505085806120cf90612fda565b9650506120dc565b6120ee565b806120e681612fda565b915050612061565b506120f98983611dec565b935061210886611e49866123cd565b9550505050506121e8565b6121e582600a600087858151811061212d5761212d61300b565b60200260200101516001600160801b0319166001600160801b0319168152602001908152602001600020805461216290612f9f565b80601f016020809104026020016040519081016040528092919081815260200182805461218e90612f9f565b80156121db5780601f106121b0576101008083540402835291602001916121db565b820191906000526020600020905b8154815290600101906020018083116121be57829003601f168201915b50505050506123a1565b91505b806121f281612fda565b915050611df2565b509392505050565b60006001600160a01b0384163b1561230457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612246903390899088908890600401612d25565b602060405180830381600087803b15801561226057600080fd5b505af1925050508015612290575060408051601f3d908101601f1916820190925261228d91810190612c78565b60015b6122ea573d8080156122be576040519150601f19603f3d011682016040523d82523d6000602084013e6122c3565b606091505b5080516122e25760405162461bcd60e51b815260040161081a90612dc6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610ae9565b506001610ae9565b60606000612319836123fe565b600101905060008167ffffffffffffffff81111561233957612339613021565b6040519080825280601f01601f191660200182016040528015612363576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461239c576121fa565b61236d565b606082826040516020016123b6929190612cda565b604051602081830303815290604052905092915050565b60606123d8826124d6565b6040516020016123e89190612d09565b6040516020818303038152906040529050919050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061243d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612469576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061248757662386f26fc10000830492506010015b6305f5e100831061249f576305f5e100830492506008015b61271083106124b357612710830492506004015b606483106124c5576064830492506002015b600a83106107425760010192915050565b60608151600014156124f657505060408051602081019091526000815290565b600060405180606001604052806040815260200161307160409139905060006003845160026125259190612f03565b61252f9190612f1b565b61253a906004612f3d565b90506000612549826020612f03565b67ffffffffffffffff81111561256157612561613021565b6040519080825280601f01601f19166020018201604052801561258b576020820181803683370190505b509050818152600183018586518101602084015b818310156125f7576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161259f565b60038951066001811461261157600281146126225761262e565b613d3d60f01b60011983015261262e565b603d60f81b6000198301525b509398975050505050505050565b82805461264890612f9f565b90600052602060002090601f01602090048101928261266a57600085556126b0565b82601f1061268357805160ff19168380011785556126b0565b828001600101855582156126b0579182015b828111156126b0578251825591602001919060010190612695565b506126bc929150612769565b5090565b828054828255906000526020600020906001016002900481019282156126b05791602002820160005b8382111561272d57835183826101000a8154816001600160801b03021916908360801c02179055509260200192601001602081600f010492830192600103026126e9565b80156127605782816101000a8154906001600160801b030219169055601001602081600f0104928301926001030261272d565b50506126bc9291505b5b808211156126bc576000815560010161276a565b600067ffffffffffffffff83111561279857612798613021565b6127ab601f8401601f1916602001612eae565b90508281528383830111156127bf57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126127e757600080fd5b813560206127fc6127f783612edf565b612eae565b80838252828201915082860187848660051b890101111561281c57600080fd5b60005b85811015612842576128308261284f565b8452928401929084019060010161281f565b5090979650505050505050565b80356001600160801b03198116811461286757600080fd5b919050565b60006020828403121561287e57600080fd5b813561288981613037565b9392505050565b6000602082840312156128a257600080fd5b815161288981613037565b600080604083850312156128c057600080fd5b82356128cb81613037565b915060208301356128db81613037565b809150509250929050565b6000806000606084860312156128fb57600080fd5b833561290681613037565b9250602084013561291681613037565b929592945050506040919091013590565b6000806000806080858703121561293d57600080fd5b843561294881613037565b9350602085013561295881613037565b925060408501359150606085013567ffffffffffffffff81111561297b57600080fd5b8501601f8101871361298c57600080fd5b61299b8782356020840161277e565b91505092959194509250565b600080604083850312156129ba57600080fd5b82356129c581613037565b915060208301356128db8161304c565b600080604083850312156129e857600080fd5b82356129f381613037565b946020939093013593505050565b60008060408385031215612a1457600080fd5b823567ffffffffffffffff80821115612a2c57600080fd5b612a38868387016127d6565b9350602091508185013581811115612a4f57600080fd5b8501601f81018713612a6057600080fd5b8035612a6e6127f782612edf565b8082825285820191508584018a878560051b8701011115612a8e57600080fd5b6000805b85811015612ac957823588811115612aa8578283fd5b612ab68e8b838b01016127d6565b8652509388019391880191600101612a92565b5050508096505050505050509250929050565b6000806040808486031215612af057600080fd5b833567ffffffffffffffff80821115612b0857600080fd5b612b14878388016127d6565b9450602091508186013581811115612b2b57600080fd5b8601601f81018813612b3c57600080fd5b8035612b4a6127f782612edf565b8082825285820191508584018b878560051b8701011115612b6a57600080fd5b60005b84811015612bb857813587811115612b8457600080fd5b8601603f81018e13612b9557600080fd5b612ba58e8a8301358c840161277e565b8552509287019290870190600101612b6d565b50989b909a5098505050505050505050565b600060208284031215612bdc57600080fd5b81516128898161304c565b60008060008060008060c08789031215612c0057600080fd5b612c098761284f565b9550612c176020880161284f565b9450612c256040880161284f565b9350612c336060880161284f565b9250612c416080880161284f565b9150612c4f60a0880161284f565b90509295509295509295565b600060208284031215612c6d57600080fd5b81356128898161305a565b600060208284031215612c8a57600080fd5b81516128898161305a565b600060208284031215612ca757600080fd5b5035919050565b60008151808452612cc6816020860160208601612f73565b601f01601f19169290920160200192915050565b60008351612cec818460208801612f73565b835190830190612d00818360208801612f73565b01949350505050565b60008251612d1b818460208701612f73565b9190910192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d5890830184612cae565b9695505050505050565b6020815260006128896020830184612cae565b60208082526031908201527f4d4543483a206e6f7420656e6f7567682074696d652068617320706173736564604082015270081cda5b98d9481b185cdd081d9a5cda5d607a1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715612ed757612ed7613021565b604052919050565b600067ffffffffffffffff821115612ef957612ef9613021565b5060051b60200190565b60008219821115612f1657612f16612ff5565b500190565b600082612f3857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612f5757612f57612ff5565b500290565b600082821015612f6e57612f6e612ff5565b500390565b60005b83811015612f8e578181015183820152602001612f76565b838111156112c35750506000910152565b600181811c90821680612fb357607f821691505b60208210811415612fd457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612fee57612fee612ff5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146109a057600080fd5b80151581146109a057600080fd5b6001600160e01b0319811681146109a057600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212201b47a44dc0656b7344346a546397e879cc47097ccfc77626b7b6b24471a76fbb64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f65d6475869f61c6dce6ac194b6a7dbe45a91c63
-----Decoded View---------------
Arg [0] : _edwone (address): 0xf65D6475869F61c6dce6aC194B6a7dbE45a91c63
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f65d6475869f61c6dce6ac194b6a7dbe45a91c63
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.