Address Details
contract
0x32f2F7bd344acE041dA5f75D6948ad8f5dC97034
- Contract Name
- ERC721r
- Creator
- 0xf600c2–fea2f2 at 0x65f7ee–d28263
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 0 Transactions
- Transfers
- 0 Transfers
- Gas Used
- Fetching gas used...
- Last Balance Update
- 12118119
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- ERC721r
- Optimization enabled
- true
- Compiler version
- v0.8.0+commit.c7dfd78e
- Optimization runs
- 50
- EVM Version
- istanbul
- Verified at
- 2022-06-23T02:15:27.961652Z
project:/contracts/ERC721r.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/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. This does random batch minting. */ contract ERC721r is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 => uint256) private _availableTokens; uint256 private _numAvailableTokens; uint256 immutable _maxSupply; // 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_, uint256 maxSupply_ ) { _name = name_; _symbol = symbol_; _maxSupply = maxSupply_; _numAvailableTokens = maxSupply_; } /** * @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); } function totalSupply() public view virtual returns (uint256) { return _maxSupply - _numAvailableTokens; } function maxSupply() public view virtual returns (uint256) { return _maxSupply; } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require( owner != address(0), "ERC721: balance query for the zero address" ); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require( owner != address(0), "ERC721: owner query for nonexistent token" ); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be 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 = ERC721r.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require( _exists(tokenId), "ERC721: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved" ); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved" ); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require( _exists(tokenId), "ERC721: operator query for nonexistent token" ); address owner = ERC721r.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } function _mintIdWithoutBalanceUpdate(address to, uint256 tokenId) private { _beforeTokenTransfer(address(0), to, tokenId); _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } function _mintRandom(address to, uint256 _numToMint) internal virtual { require(_msgSender() == tx.origin, "Contracts cannot mint"); require(to != address(0), "ERC721: mint to the zero address"); require(_numToMint > 0, "ERC721r: need to mint at least one token"); // TODO: Probably don't need this as it will underflow and revert automatically in this case require( _numAvailableTokens >= _numToMint, "ERC721r: minting more tokens than available" ); uint256 updatedNumAvailableTokens = _numAvailableTokens; for (uint256 i; i < _numToMint; ++i) { // Do this ++ unchecked? uint256 tokenId = getRandomAvailableTokenId( to, updatedNumAvailableTokens ); _mintIdWithoutBalanceUpdate(to, tokenId); --updatedNumAvailableTokens; } _numAvailableTokens = updatedNumAvailableTokens; _balances[to] += _numToMint; } function getRandomAvailableTokenId( address to, uint256 updatedNumAvailableTokens ) internal returns (uint256) { uint256 randomNum = uint256( keccak256( abi.encode( to, tx.gasprice, block.number, block.timestamp, block.difficulty, blockhash(block.number - 1), address(this), updatedNumAvailableTokens ) ) ); uint256 randomIndex = randomNum % updatedNumAvailableTokens; return getAvailableTokenAtIndex(randomIndex, updatedNumAvailableTokens); } // Implements https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle. Code taken from CryptoPhunksV2 function getAvailableTokenAtIndex( uint256 indexToUse, uint256 updatedNumAvailableTokens ) internal returns (uint256) { uint256 valAtIndex = _availableTokens[indexToUse]; uint256 result; if (valAtIndex == 0) { // This means the index itself is still an available token result = indexToUse; } else { // This means the index itself is not an available token, but the val at that index is. result = valAtIndex; } uint256 lastIndex = updatedNumAvailableTokens - 1; if (indexToUse != lastIndex) { // Replace the value at indexToUse, now that it's been used. // Replace it with the data from the last index in the array, since we are going to decrease the array size afterwards. uint256 lastValInArray = _availableTokens[lastIndex]; if (lastValInArray == 0) { // This means the index itself is still an available token _availableTokens[indexToUse] = lastIndex; } else { // This means the index itself is not an available token, but the val at that index is. _availableTokens[indexToUse] = lastValInArray; // Gas refund courtsey of @dievardump delete _availableTokens[lastIndex]; } } return result; } // Not as good as minting a specific tokenId, but will behave the same at the start // allowing you to explicitly mint some tokens at launch. function _mintAtIndex(address to, uint256 index) internal virtual { require(_msgSender() == tx.origin, "Contracts cannot mint"); require(to != address(0), "ERC721: mint to the zero address"); require( _numAvailableTokens >= 1, "ERC721r: minting more tokens than available" ); uint256 tokenId = getAvailableTokenAtIndex(index, _numAvailableTokens); --_numAvailableTokens; _mintIdWithoutBalanceUpdate(to, tokenId); _balances[to] += 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( ERC721r.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner" ); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721r.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert( "ERC721: transfer to non ERC721Receiver implementer" ); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
/_openzeppelin/contracts/token/ERC721/IERC721.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
/_openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
/_openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
// 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); }
/_openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts/utils/Context.sol
// 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; } }
/_openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
/_openzeppelin/contracts/utils/introspection/ERC165.sol
// 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; } }
/_openzeppelin/contracts/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface 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); }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"},{"type":"uint256","name":"maxSupply_","internalType":"uint256"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"approved","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]}]
Contract Creation Code
0x60a06040523480156200001157600080fd5b50604051620015ea380380620015ea8339810160408190526200003491620001c2565b82516200004990600090602086019062000071565b5081516200005f90600190602085019062000071565b50608081905260035550620002859050565b8280546200007f9062000232565b90600052602060002090601f016020900481019282620000a35760008555620000ee565b82601f10620000be57805160ff1916838001178555620000ee565b82800160010185558215620000ee579182015b82811115620000ee578251825591602001919060010190620000d1565b50620000fc92915062000100565b5090565b5b80821115620000fc576000815560010162000101565b600082601f83011262000128578081fd5b81516001600160401b03808211156200014557620001456200026f565b6040516020601f8401601f19168201810183811183821017156200016d576200016d6200026f565b604052838252858401810187101562000184578485fd5b8492505b83831015620001a7578583018101518284018201529182019162000188565b83831115620001b857848185840101525b5095945050505050565b600080600060608486031215620001d7578283fd5b83516001600160401b0380821115620001ee578485fd5b620001fc8783880162000117565b9450602086015191508082111562000212578384fd5b50620002218682870162000117565b925050604084015190509250925092565b6002810460018216806200024757607f821691505b602082108114156200026957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b608051611342620002a8600039600081816103bf01526105a201526113426000f3fe608060405234801561001057600080fd5b50600436106100c55760003560e01c806301ffc9a7146100ca57806306fdde03146100f3578063081812fc14610108578063095ea7b31461012857806318160ddd1461013d57806323b872dd1461015257806342842e0e146101655780636352211e1461017857806370a082311461018b57806395d89b411461019e578063a22cb465146101a6578063b88d4fde146101b9578063c87b56dd146101cc578063d5abeb01146101df578063e985e9c5146101e7575b600080fd5b6100dd6100d8366004610d43565b6101fa565b6040516100ea9190610e3f565b60405180910390f35b6100fb610242565b6040516100ea9190610e4a565b61011b610116366004610d7b565b6102d4565b6040516100ea9190610dee565b61013b610136366004610d1a565b610320565b005b6101456103b8565b6040516100ea91906111cf565b61013b610160366004610bd9565b6103ed565b61013b610173366004610bd9565b610425565b61011b610186366004610d7b565b610440565b610145610199366004610b8d565b610475565b6100fb6104b9565b61013b6101b4366004610ce0565b6104c8565b61013b6101c7366004610c14565b6104de565b6100fb6101da366004610d7b565b61051d565b6101456105a0565b6100dd6101f5366004610ba7565b6105c4565b60006001600160e01b031982166380ac58cd60e01b148061022b57506001600160e01b03198216635b5e139f60e01b145b8061023a575061023a826105f2565b90505b919050565b60606000805461025190611247565b80601f016020809104026020016040519081016040528092919081815260200182805461027d90611247565b80156102ca5780601f1061029f576101008083540402835291602001916102ca565b820191906000526020600020905b8154815290600101906020018083116102ad57829003601f168201915b5050505050905090565b60006102df8261060b565b6103045760405162461bcd60e51b81526004016102fb906110a2565b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061032b82610440565b9050806001600160a01b0316836001600160a01b0316141561035f5760405162461bcd60e51b81526004016102fb9061113d565b806001600160a01b0316610371610628565b6001600160a01b0316148061038d575061038d816101f5610628565b6103a95760405162461bcd60e51b81526004016102fb90610fb7565b6103b3838361062c565b505050565b60006003547f00000000000000000000000000000000000000000000000000000000000000006103e89190611204565b905090565b6103fe6103f8610628565b8261069a565b61041a5760405162461bcd60e51b81526004016102fb9061117e565b6103b383838361071f565b6103b3838383604051806020016040528060008152506104de565b6000818152600460205260408120546001600160a01b03168061023a5760405162461bcd60e51b81526004016102fb90611059565b60006001600160a01b03821661049d5760405162461bcd60e51b81526004016102fb9061100f565b506001600160a01b031660009081526005602052604090205490565b60606001805461025190611247565b6104da6104d3610628565b8383610852565b5050565b6104ef6104e9610628565b8361069a565b61050b5760405162461bcd60e51b81526004016102fb9061117e565b610517848484846108f5565b50505050565b60606105288261060b565b6105445760405162461bcd60e51b81526004016102fb906110ee565b600061054e610928565b9050600081511161056e5760405180602001604052806000815250610599565b806105788461093a565b604051602001610589929190610dbf565b6040516020818303038152906040525b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6001600160e01b031981166301ffc9a760e01b14919050565b6000908152600460205260409020546001600160a01b0316151590565b3390565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061066182610440565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006106a58261060b565b6106c15760405162461bcd60e51b81526004016102fb90610f6b565b60006106cc83610440565b9050806001600160a01b0316846001600160a01b031614806107075750836001600160a01b03166106fc846102d4565b6001600160a01b0316145b80610717575061071781856105c4565b949350505050565b826001600160a01b031661073282610440565b6001600160a01b0316146107585760405162461bcd60e51b81526004016102fb90610eaf565b6001600160a01b03821661077e5760405162461bcd60e51b81526004016102fb90610ef4565b6107898383836103b3565b61079460008261062c565b6001600160a01b03831660009081526005602052604081208054600192906107bd908490611204565b90915550506001600160a01b03821660009081526005602052604081208054600192906107eb9084906111d8565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46103b38383836103b3565b816001600160a01b0316836001600160a01b031614156108845760405162461bcd60e51b81526004016102fb90610f38565b6001600160a01b0383811660008181526007602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906108e8908590610e3f565b60405180910390a3505050565b61090084848461071f565b61090c84848484610a55565b6105175760405162461bcd60e51b81526004016102fb90610e5d565b60408051602081019091526000815290565b60608161095f57506040805180820190915260018152600360fc1b602082015261023d565b8160005b8115610989578061097381611282565b91506109829050600a836111f0565b9150610963565b60008167ffffffffffffffff8111156109b257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156109dc576020820181803683370190505b5090505b8415610717576109f1600183611204565b91506109fe600a8661129d565b610a099060306111d8565b60f81b818381518110610a2c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350610a4e600a866111f0565b94506109e0565b6000610a69846001600160a01b0316610b70565b15610b6557836001600160a01b031663150b7a02610a85610628565b8786866040518563ffffffff1660e01b8152600401610aa79493929190610e02565b602060405180830381600087803b158015610ac157600080fd5b505af1925050508015610af1575060408051601f3d908101601f19168201909252610aee91810190610d5f565b60015b610b4b573d808015610b1f576040519150601f19603f3d011682016040523d82523d6000602084013e610b24565b606091505b508051610b435760405162461bcd60e51b81526004016102fb90610e5d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610717565b506001949350505050565b3b151590565b80356001600160a01b038116811461023d57600080fd5b600060208284031215610b9e578081fd5b61059982610b76565b60008060408385031215610bb9578081fd5b610bc283610b76565b9150610bd060208401610b76565b90509250929050565b600080600060608486031215610bed578081fd5b610bf684610b76565b9250610c0460208501610b76565b9150604084013590509250925092565b60008060008060808587031215610c29578081fd5b610c3285610b76565b93506020610c41818701610b76565b935060408601359250606086013567ffffffffffffffff80821115610c64578384fd5b818801915088601f830112610c77578384fd5b813581811115610c8957610c896112dd565b604051601f8201601f1916810185018381118282101715610cac57610cac6112dd565b60405281815283820185018b1015610cc2578586fd5b81858501868301379081019093019390935250939692955090935050565b60008060408385031215610cf2578182fd5b610cfb83610b76565b915060208301358015158114610d0f578182fd5b809150509250929050565b60008060408385031215610d2c578182fd5b610d3583610b76565b946020939093013593505050565b600060208284031215610d54578081fd5b8135610599816112f3565b600060208284031215610d70578081fd5b8151610599816112f3565b600060208284031215610d8c578081fd5b5035919050565b60008151808452610dab81602086016020860161121b565b601f01601f19169290920160200192915050565b60008351610dd181846020880161121b565b835190830190610de581836020880161121b565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610e3590830184610d93565b9695505050505050565b901515815260200190565b6000602082526105996020830184610d93565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776040820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b90815260200190565b600082198211156111eb576111eb6112b1565b500190565b6000826111ff576111ff6112c7565b500490565b600082821015611216576112166112b1565b500390565b60005b8381101561123657818101518382015260200161121e565b838111156105175750506000910152565b60028104600182168061125b57607f821691505b6020821081141561127c57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611296576112966112b1565b5060010190565b6000826112ac576112ac6112c7565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461130957600080fd5b5056fea2646970667358221220772490d6c8908ed72480c358026fb8534eaaca0d9ddca6ba0da2eef39f655a2c64736f6c63430008000033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000b4b6f6c6f7220547265657300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054b54524545000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106100c55760003560e01c806301ffc9a7146100ca57806306fdde03146100f3578063081812fc14610108578063095ea7b31461012857806318160ddd1461013d57806323b872dd1461015257806342842e0e146101655780636352211e1461017857806370a082311461018b57806395d89b411461019e578063a22cb465146101a6578063b88d4fde146101b9578063c87b56dd146101cc578063d5abeb01146101df578063e985e9c5146101e7575b600080fd5b6100dd6100d8366004610d43565b6101fa565b6040516100ea9190610e3f565b60405180910390f35b6100fb610242565b6040516100ea9190610e4a565b61011b610116366004610d7b565b6102d4565b6040516100ea9190610dee565b61013b610136366004610d1a565b610320565b005b6101456103b8565b6040516100ea91906111cf565b61013b610160366004610bd9565b6103ed565b61013b610173366004610bd9565b610425565b61011b610186366004610d7b565b610440565b610145610199366004610b8d565b610475565b6100fb6104b9565b61013b6101b4366004610ce0565b6104c8565b61013b6101c7366004610c14565b6104de565b6100fb6101da366004610d7b565b61051d565b6101456105a0565b6100dd6101f5366004610ba7565b6105c4565b60006001600160e01b031982166380ac58cd60e01b148061022b57506001600160e01b03198216635b5e139f60e01b145b8061023a575061023a826105f2565b90505b919050565b60606000805461025190611247565b80601f016020809104026020016040519081016040528092919081815260200182805461027d90611247565b80156102ca5780601f1061029f576101008083540402835291602001916102ca565b820191906000526020600020905b8154815290600101906020018083116102ad57829003601f168201915b5050505050905090565b60006102df8261060b565b6103045760405162461bcd60e51b81526004016102fb906110a2565b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061032b82610440565b9050806001600160a01b0316836001600160a01b0316141561035f5760405162461bcd60e51b81526004016102fb9061113d565b806001600160a01b0316610371610628565b6001600160a01b0316148061038d575061038d816101f5610628565b6103a95760405162461bcd60e51b81526004016102fb90610fb7565b6103b3838361062c565b505050565b60006003547f00000000000000000000000000000000000000000000000000000000000027106103e89190611204565b905090565b6103fe6103f8610628565b8261069a565b61041a5760405162461bcd60e51b81526004016102fb9061117e565b6103b383838361071f565b6103b3838383604051806020016040528060008152506104de565b6000818152600460205260408120546001600160a01b03168061023a5760405162461bcd60e51b81526004016102fb90611059565b60006001600160a01b03821661049d5760405162461bcd60e51b81526004016102fb9061100f565b506001600160a01b031660009081526005602052604090205490565b60606001805461025190611247565b6104da6104d3610628565b8383610852565b5050565b6104ef6104e9610628565b8361069a565b61050b5760405162461bcd60e51b81526004016102fb9061117e565b610517848484846108f5565b50505050565b60606105288261060b565b6105445760405162461bcd60e51b81526004016102fb906110ee565b600061054e610928565b9050600081511161056e5760405180602001604052806000815250610599565b806105788461093a565b604051602001610589929190610dbf565b6040516020818303038152906040525b9392505050565b7f000000000000000000000000000000000000000000000000000000000000271090565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6001600160e01b031981166301ffc9a760e01b14919050565b6000908152600460205260409020546001600160a01b0316151590565b3390565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061066182610440565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006106a58261060b565b6106c15760405162461bcd60e51b81526004016102fb90610f6b565b60006106cc83610440565b9050806001600160a01b0316846001600160a01b031614806107075750836001600160a01b03166106fc846102d4565b6001600160a01b0316145b80610717575061071781856105c4565b949350505050565b826001600160a01b031661073282610440565b6001600160a01b0316146107585760405162461bcd60e51b81526004016102fb90610eaf565b6001600160a01b03821661077e5760405162461bcd60e51b81526004016102fb90610ef4565b6107898383836103b3565b61079460008261062c565b6001600160a01b03831660009081526005602052604081208054600192906107bd908490611204565b90915550506001600160a01b03821660009081526005602052604081208054600192906107eb9084906111d8565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46103b38383836103b3565b816001600160a01b0316836001600160a01b031614156108845760405162461bcd60e51b81526004016102fb90610f38565b6001600160a01b0383811660008181526007602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906108e8908590610e3f565b60405180910390a3505050565b61090084848461071f565b61090c84848484610a55565b6105175760405162461bcd60e51b81526004016102fb90610e5d565b60408051602081019091526000815290565b60608161095f57506040805180820190915260018152600360fc1b602082015261023d565b8160005b8115610989578061097381611282565b91506109829050600a836111f0565b9150610963565b60008167ffffffffffffffff8111156109b257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156109dc576020820181803683370190505b5090505b8415610717576109f1600183611204565b91506109fe600a8661129d565b610a099060306111d8565b60f81b818381518110610a2c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350610a4e600a866111f0565b94506109e0565b6000610a69846001600160a01b0316610b70565b15610b6557836001600160a01b031663150b7a02610a85610628565b8786866040518563ffffffff1660e01b8152600401610aa79493929190610e02565b602060405180830381600087803b158015610ac157600080fd5b505af1925050508015610af1575060408051601f3d908101601f19168201909252610aee91810190610d5f565b60015b610b4b573d808015610b1f576040519150601f19603f3d011682016040523d82523d6000602084013e610b24565b606091505b508051610b435760405162461bcd60e51b81526004016102fb90610e5d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610717565b506001949350505050565b3b151590565b80356001600160a01b038116811461023d57600080fd5b600060208284031215610b9e578081fd5b61059982610b76565b60008060408385031215610bb9578081fd5b610bc283610b76565b9150610bd060208401610b76565b90509250929050565b600080600060608486031215610bed578081fd5b610bf684610b76565b9250610c0460208501610b76565b9150604084013590509250925092565b60008060008060808587031215610c29578081fd5b610c3285610b76565b93506020610c41818701610b76565b935060408601359250606086013567ffffffffffffffff80821115610c64578384fd5b818801915088601f830112610c77578384fd5b813581811115610c8957610c896112dd565b604051601f8201601f1916810185018381118282101715610cac57610cac6112dd565b60405281815283820185018b1015610cc2578586fd5b81858501868301379081019093019390935250939692955090935050565b60008060408385031215610cf2578182fd5b610cfb83610b76565b915060208301358015158114610d0f578182fd5b809150509250929050565b60008060408385031215610d2c578182fd5b610d3583610b76565b946020939093013593505050565b600060208284031215610d54578081fd5b8135610599816112f3565b600060208284031215610d70578081fd5b8151610599816112f3565b600060208284031215610d8c578081fd5b5035919050565b60008151808452610dab81602086016020860161121b565b601f01601f19169290920160200192915050565b60008351610dd181846020880161121b565b835190830190610de581836020880161121b565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090610e3590830184610d93565b9695505050505050565b901515815260200190565b6000602082526105996020830184610d93565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776040820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b90815260200190565b600082198211156111eb576111eb6112b1565b500190565b6000826111ff576111ff6112c7565b500490565b600082821015611216576112166112b1565b500390565b60005b8381101561123657818101518382015260200161121e565b838111156105175750506000910152565b60028104600182168061125b57607f821691505b6020821081141561127c57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611296576112966112b1565b5060010190565b6000826112ac576112ac6112c7565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461130957600080fd5b5056fea2646970667358221220772490d6c8908ed72480c358026fb8534eaaca0d9ddca6ba0da2eef39f655a2c64736f6c63430008000033