ERC-721
Source Code
Overview
Max Total Supply
3,000 LAP
Holders
2,806
Market
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract
Balance
2 LAPLoading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
LAP
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// created by cryptodo.app
// SPDX-License-Identifier: MIT
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);
}
}
}
}
/**
* @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);
}
}
/**
* @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;
}
}
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
bool private _paused;
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
/**
* @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() {
_setOwner(msg.sender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
/**
* @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);
}
/**
* @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;
}
/**
* @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);
}
/**
* @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);
}
/**
* @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;
}
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @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}.
*/
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
mapping(uint256 => address) private _owners;
mapping(address => uint256) private _balances;
mapping(uint256 => address) private _tokenApprovals;
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 returns (uint256) {
if (owner == address(0)) {
revert ERC721InvalidOwner(address(0));
}
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual returns (address) {
return _requireOwned(tokenId);
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
_requireOwned(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string.concat(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 {
_approve(to, tokenId, _msgSender());
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual returns (address) {
_requireOwned(tokenId);
return _getApproved(tokenId);
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
address previousOwner = _update(to, tokenId, _msgSender());
if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
transferFrom(from, to, tokenId);
_checkOnERC721Received(from, to, tokenId, data);
}
/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*
* IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
* core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances
* consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
* `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
return _owners[tokenId];
}
/**
* @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
*/
function _getApproved(uint256 tokenId) internal view virtual returns (address) {
return _tokenApprovals[tokenId];
}
/**
* @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
* particular (ignoring whether it is owned by `owner`).
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
return
spender != address(0) &&
(owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
}
/**
* @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
* Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
* the `spender` for the specific `tokenId`.
*
* WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
* assumption.
*/
function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
if (!_isAuthorized(owner, spender, tokenId)) {
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else {
revert ERC721InsufficientApproval(spender, tokenId);
}
}
}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
* a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
*
* WARNING: Increasing an account's balance using this function tends to be paired with an override of the
* {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
* remain consistent with one another.
*/
function _increaseBalance(address account, uint128 value) internal virtual {
unchecked {
_balances[account] += value;
}
}
/**
* @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
* (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that
* `auth` is either the owner of the token, or approved to operate on the token (by the owner).
*
* Emits a {Transfer} event.
*
* NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
*/
function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
address from = _ownerOf(tokenId);
// Perform (optional) operator check
if (auth != address(0)) {
_checkAuthorized(from, auth, tokenId);
}
// Execute the update
if (from != address(0)) {
// Clear approval. No need to re-authorize or emit the Approval event
_approve(address(0), tokenId, address(0), false);
unchecked {
_balances[from] -= 1;
}
}
if (to != address(0)) {
unchecked {
_balances[to] += 1;
}
}
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
return from;
}
/**
* @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 {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
_beforeTokenTransfer(address(0), to, tokenId);
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner != address(0)) {
revert ERC721InvalidSender(address(0));
}
}
/**
* @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
*
* 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 {
_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);
_checkOnERC721Received(address(0), to, tokenId, data);
}
/**
* @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 {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
address previousOwner = _update(address(0), tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
_beforeTokenTransfer(from, to, tokenId);
address previousOwner = _update(to, tokenId, address(0));
if (previousOwner == address(0)) {
revert ERC721NonexistentToken(tokenId);
} else if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
* are aware of the ERC721 standard 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 like {safeTransferFrom} in the sense that it invokes
* {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `tokenId` token must exist and be owned by `from`.
* - `to` cannot be the zero address.
* - `from` cannot be the zero address.
* - 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) internal {
_safeTransfer(from, to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
_transfer(from, to, tokenId);
_checkOnERC721Received(from, to, tokenId, data);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
* either the owner of the token, or approved to operate on all tokens held by this owner.
*
* Emits an {Approval} event.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address to, uint256 tokenId, address auth) internal {
_approve(to, tokenId, auth, true);
}
/**
* @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
* emitted in the context of transfers.
*/
function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
// Avoid reading the owner unless necessary
if (emitEvent || auth != address(0)) {
address owner = _requireOwned(tokenId);
// We do not use _isAuthorized because single-token approvals should not be able to call approve
if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
revert ERC721InvalidApprover(auth);
}
if (emitEvent) {
emit Approval(owner, to, tokenId);
}
}
_tokenApprovals[tokenId] = to;
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Requirements:
* - operator can't be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
if (operator == address(0)) {
revert ERC721InvalidOperator(operator);
}
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
* Returns the owner.
*
* Overrides to ownership logic should be done to {_ownerOf}.
*/
function _requireOwned(uint256 tokenId) internal view returns (address) {
address owner = _ownerOf(tokenId);
if (owner == address(0)) {
revert ERC721NonexistentToken(tokenId);
}
return owner;
}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
* recipient doesn't accept the token transfer. 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
*/
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {
if (to.code.length > 0) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
if (retval != IERC721Receiver.onERC721Received.selector) {
revert ERC721InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
revert ERC721InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @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 {}
}
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
/**
* @title ERC721 Burnable Token
* @dev ERC721 Token that can be burned (destroyed).
*/
abstract contract ERC721Burnable is Context, ERC721 {
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function burn(uint256 tokenId) public virtual {
// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
_update(address(0), tokenId, _msgSender());
}
}
/**
* @dev ERC721 token with pausable token transfers, minting and burning.
*
* Useful for scenarios such as preventing trades until the end of an evaluation
* period, or having an emergency switch for freezing all token transfers in the
* event of a large bug.
*
* IMPORTANT: This contract does not include public pause and unpause functions. In
* addition to inheriting this contract, you must define both functions, invoking the
* {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate
* access control, e.g. using {AccessControl} or {Ownable}. Not doing so will
* make the contract pause mechanism of the contract unreachable, and thus unusable.
*/
abstract contract ERC721Pausable is ERC721, Pausable {
/**
* @dev See {ERC721-_update}.
*
* Requirements:
*
* - the contract must not be paused.
*/
function _update(
address to,
uint256 tokenId,
address auth
) internal virtual override whenNotPaused returns (address) {
return super._update(to, tokenId, auth);
}
}
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @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` cannot be the zero address.
* - `to` cannot be the zero address.
*
* 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 override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32")
mstore(0x1c, hash)
message := keccak256(0x00, 0x3c)
}
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, "\x19\x01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
data := keccak256(ptr, 0x42)
}
}
/**
* @dev Returns an Ethereum Signed Data with intended validator, created from a
* `validator` and `data` according to the version 0 of EIP-191.
*
* See {recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x00", validator, data));
}
}
contract LAP is ERC721Enumerable, Ownable, ReentrancyGuard, ERC721Pausable , ERC721Burnable {
using ECDSA for bytes32;
uint256 public PRICE = 0.1 ether;
uint256 public constant TIME_FOR_REVEAL = 0;
uint256 public mintStartTime = 1739491200;
uint256 public mintEndTime = 1741910400;
address public founder = 0xaebF22D90E6E0948E0F4ecDA5612aea4d34c1c8a;
mapping(address => bool) private _blacklist;
mapping(address => uint256) private whitelist;
mapping(uint256 => uint256) private _entityBirthdays;
mapping(uint256 => string) private _ipfsHash;
string private _simpleIpfsHash;
bool private _isPublicSaleActive = false;
bool private _isSimpleIpfsHash = false;
string public tokenURIPrefix = "ipfs://";
string public tokenURISuffix = "/metadata.json";
string private _name = "Linea Alpha Pioneer";
string private _symbol = "LAP";
string private _baseTokenURI = "https://media.alphamind.co/nft/linea.nft/api/";
bool public isBlacklistEnabled = true;
bool public isWhitelistEnabled = false;
uint256 public burnedTokens;
mapping(address => bool) public allowedForBurn;
event SendETH(address indexed to, uint256 amount);
event SetNewPercent(address indexed to, uint256 percent);
event SetNewValue(string nameValue, uint256 oldValue, uint256 newValue);
event MintPeriodChanged(uint256 newMintStartTime, uint256 newMintEndTime);
event Blacklisted(address indexed account);
event Unblacklisted(address indexed account);
event WhitelistStatusChanged(bool newStatus);
constructor (address _allowBurn) ERC721(_name, _symbol) {
if (block.timestamp >= mintStartTime && block.timestamp <= mintEndTime) {
_isPublicSaleActive = true;
}
setAllowedForBurn(_allowBurn);
}
modifier updateSaleStatus() {
if (block.timestamp >= mintStartTime && block.timestamp <= mintEndTime && _isPublicSaleActive) {
_isPublicSaleActive = true;
} else {
_isPublicSaleActive = false;
}
_;
}
function migrateNfts(
address[] memory owners
) public onlyOwner {
for (uint256 i = 0; i < owners.length; i++) {
_mintMultiple(owners[i], 1);
}
}
function setAllowedForBurn(address account) public onlyOwner {
allowedForBurn[account] = true;
}
function burn(uint256 tokenId) public virtual override {
address owner = _ownerOf(tokenId);
require(owner == msg.sender || allowedForBurn[msg.sender], "You are not owner of this token");
ERC721._burn(tokenId);
burnedTokens += 1;
}
function setWhitelistStatus() external onlyOwner {
isWhitelistEnabled = !isWhitelistEnabled;
emit WhitelistStatusChanged(isWhitelistEnabled);
}
function setWhitelist(address[] memory _addresses, uint256[] memory _amounts) external onlyOwner {
require(_addresses.length == _amounts.length, "The number of addresses and amounts do not match");
for (uint i = 0; i < _addresses.length; i++) {
require(_addresses[i] != address(0), "one or few members is the zero address");
whitelist[_addresses[i]] = _amounts[i];
_blacklist[_addresses[i]] = false;
}
}
function isEligibleForWhitelist() public view returns (bool) {
return whitelist[msg.sender] > 0;
}
function mintTo(address to) external nonReentrant updateSaleStatus whenNotPaused () {
require(allowedForBurn[msg.sender], "Not eligible");
require(_isPublicSaleActive, "Public sale is not active");
_mintMultiple(to, 1);
}
function mint() external payable nonReentrant updateSaleStatus whenNotPaused () {
uint256 amount = msg.value / PRICE;
require(amount >= 1, "Can't mint less then 1 token");
require(_isPublicSaleActive, "Public sale is not active");
_mintMultiple(msg.sender, amount);
}
function _mintMultiple(address owner, uint256 amount) private {
require(!_blacklist[owner], "Blacklisted: minting not allowed");
if (isWhitelistEnabled) {
require(whitelist[owner] > 0, "You are not eligible for mint");
require(whitelist[owner] >= amount, "Your whitelist amount less than you try to mint");
}
if (isWhitelistEnabled) {
whitelist[owner] -= amount;
}
for (uint256 i = 0; i < amount; i++) {
uint256 tokenId = totalSupply() + burnedTokens;
_entityBirthdays[tokenId] = block.timestamp;
_safeMint(owner, tokenId);
}
}
function setIpfsHash(string[] memory ipfsHashs, uint256[] memory idTokens) external onlyOwner {
require(ipfsHashs.length == idTokens.length, "miscellaneous number of elements");
if(_isSimpleIpfsHash) {
_simpleIpfsHash = ipfsHashs[0];
return;
}
for (uint256 i = 0; i < idTokens.length; i++) {
bytes memory tempHash = bytes(_ipfsHash[idTokens[i]]);
require(tempHash.length == 0, "IPFS hash can be set only once");
_ipfsHash[idTokens[i]] = ipfsHashs[i];
}
}
function addToBlacklist(address account) public onlyOwner {
_blacklist[account] = true;
emit Blacklisted(account);
}
function removeFromBlacklist(address account) public onlyOwner {
_blacklist[account] = false;
emit Unblacklisted(account);
}
function isBlacklisted(address account) public view returns (bool) {
return _blacklist[account];
}
function setMintPeriod(uint256 _newMintStartTime, uint256 _newMintEndTime)
external
onlyOwner
{
require(
_newMintStartTime < _newMintEndTime,
"End time must be greater than start time"
);
mintStartTime = _newMintStartTime;
mintEndTime = _newMintEndTime;
emit MintPeriodChanged(_newMintStartTime, _newMintEndTime);
}
function setBaseTokenURI(string memory baseTokenURI) public onlyOwner {
_baseTokenURI = baseTokenURI;
}
function setNewPrice(uint256 newPrice) public onlyOwner {
emit SetNewValue("PRICE", PRICE, newPrice);
PRICE = newPrice;
}
function setFounder(address _newFounder) external onlyOwner {
require(_newFounder != address(0), "Zero address can't be founder");
require(_newFounder != founder, "New founder is equal prev founder");
founder = _newFounder;
}
function claimFunds() external {
require(owner() == _msgSender() || founder == _msgSender(), "You have no right to it");
sendETH(payable(founder), getContractBalance());
}
function sendETH(address payable to, uint256 amount) private nonReentrant() {
uint256 balance = getContractBalance();
amount = amount > balance ? balance : amount;
(bool sent, ) = to.call{value: amount}("");
require(sent, "Failed to send ETH");
emit SendETH(to, amount);
}
function getContractBalance() public view returns (uint256) {
return address(this).balance;
}
function tokensOfOwner(address user) external view returns (uint256[] memory ownerTokens) {
uint256 tokenCount = balanceOf(user);
if (tokenCount == 0) {
return new uint256[](0);
} else {
uint256[] memory output = new uint256[](tokenCount);
for (uint256 index = 0; index < tokenCount; index++) {
output[index] = tokenOfOwnerByIndex(user, index);
}
return output;
}
}
function getBirthday(uint256 tokenId) public view returns (uint256) {
require(tokenId < totalSupply(), "That entity has not been make yet");
return _entityBirthdays[tokenId];
}
function getIpfsTokenUri(uint256 tokenId) external view returns (string memory) {
require(tokenId < totalSupply(), "That entity has not been make yet");
require(getBirthday(tokenId) < block.timestamp + TIME_FOR_REVEAL, "That entity has not grown yet");
return string(abi.encodePacked(tokenURIPrefix, _ipfsHash[tokenId], tokenURISuffix));
}
function getIpfsHash(uint256 tokenId) external onlyOwner view returns (string memory) {
require(tokenId < totalSupply(), "That entity has not been make yet");
if(_isSimpleIpfsHash) {
return _simpleIpfsHash;
} else {
return _ipfsHash[tokenId];
}
}
function togglePublicSale() external onlyOwner {
_isPublicSaleActive = !_isPublicSaleActive;
}
function isPublicSaleActive() external view returns (bool status) {
return _isPublicSaleActive;
}
function _baseURI() internal view virtual override returns (string memory) {
return _baseTokenURI;
}
function _setTokenURIPrefix(string memory _tokenURIPrefix) external onlyOwner {
tokenURIPrefix = _tokenURIPrefix;
}
function _setTokenURISuffix(string memory _tokenURISuffix) external onlyOwner {
tokenURISuffix = _tokenURISuffix;
}
/**
* @dev Pauses the NFT, preventing any transfers. Only callable by the contract owner.
*/
function pause() external onlyOwner {
_pause();
}
/**
* @dev Unpauses the NFT, allowing transfers to occur again. Only callable by the contract owner.
*/
function unpause() external onlyOwner {
_unpause();
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
)
internal
virtual
override(ERC721, ERC721Enumerable)
whenNotPaused
{
super._beforeTokenTransfer(from, to, tokenId);
require(!_blacklist[from] && !_blacklist[to], "Blacklisted: token transfer prohibited");
}
function _update(
address to,
uint256 tokenId,
address auth
)
internal
virtual
override(ERC721 ,ERC721Pausable) returns (address) {
return super._update(to, tokenId, auth);
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
return super.supportsInterface(interfaceId);
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_allowBurn","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"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":"account","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMintStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMintEndTime","type":"uint256"}],"name":"MintPeriodChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SendETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"percent","type":"uint256"}],"name":"SetNewPercent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"nameValue","type":"string"},{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"SetNewValue","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"Unblacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newStatus","type":"bool"}],"name":"WhitelistStatusChanged","type":"event"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIME_FOR_REVEAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURIPrefix","type":"string"}],"name":"_setTokenURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURISuffix","type":"string"}],"name":"_setTokenURISuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addToBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedForBurn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"founder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBirthday","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getContractBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getIpfsHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getIpfsTokenUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBlacklistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEligibleForWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSaleActive","outputs":[{"internalType":"bool","name":"status","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"}],"name":"migrateNfts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeFromBlacklist","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":"account","type":"address"}],"name":"setAllowedForBurn","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":"string","name":"baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newFounder","type":"address"}],"name":"setFounder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"ipfsHashs","type":"string[]"},{"internalType":"uint256[]","name":"idTokens","type":"uint256[]"}],"name":"setIpfsHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMintStartTime","type":"uint256"},{"internalType":"uint256","name":"_newMintEndTime","type":"uint256"}],"name":"setMintPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setNewPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setWhitelistStatus","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":"togglePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURISuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"ownerTokens","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
67016345785d8a0000600d556367ae8780600e556367d37180600f55601080546001600160a01b03191673aebf22d90e6e0948e0f4ecda5612aea4d34c1c8a1790556016805461ffff1916905560c06040526007608090815266697066733a2f2f60c81b60a0526017906200007590826200049f565b5060408051808201909152600e81526d17b6b2ba30b230ba30973539b7b760911b6020820152601890620000aa90826200049f565b5060408051808201909152601381527f4c696e656120416c7068612050696f6e656572000000000000000000000000006020820152601990620000ee90826200049f565b5060408051808201909152600381526204c41560ec1b6020820152601a906200011890826200049f565b506040518060600160405280602d815260200162003e39602d9139601b906200014290826200049f565b50601c805461ffff191660011790553480156200015e57600080fd5b5060405162003e6638038062003e6683398101604081905262000181916200056b565b60198054620001909062000410565b80601f0160208091040260200160405190810160405280929190818152602001828054620001be9062000410565b80156200020f5780601f10620001e3576101008083540402835291602001916200020f565b820191906000526020600020905b815481529060010190602001808311620001f157829003601f168201915b5050505050601a8054620002239062000410565b80601f0160208091040260200160405190810160405280929190818152602001828054620002519062000410565b8015620002a25780601f106200027657610100808354040283529160200191620002a2565b820191906000526020600020905b8154815290600101906020018083116200028457829003601f168201915b50505050508160009081620002b891906200049f565b506001620002c782826200049f565b505050620002db336200032560201b60201c565b6001600b55600c805460ff19169055600e544210801590620002ff5750600f544211155b1562000313576016805460ff191660011790555b6200031e8162000377565b506200059d565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a546001600160a01b03163314620003d65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b6001600160a01b03166000908152601e60205260409020805460ff19166001179055565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200042557607f821691505b6020821081036200044657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200049a57600081815260208120601f850160051c81016020861015620004755750805b601f850160051c820191505b81811015620004965782815560010162000481565b5050505b505050565b81516001600160401b03811115620004bb57620004bb620003fa565b620004d381620004cc845462000410565b846200044c565b602080601f8311600181146200050b5760008415620004f25750858301515b600019600386901b1c1916600185901b17855562000496565b600085815260208120601f198616915b828110156200053c578886015182559484019460019091019084016200051b565b50858210156200055b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200057e57600080fd5b81516001600160a01b03811681146200059657600080fd5b9392505050565b61388c80620005ad6000396000f3fe60806040526004361061038c5760003560e01c8063755edd17116101dc578063c0ac998311610102578063dbbc853b116100a0578063ee8cdd4e1161006f578063ee8cdd4e146109ee578063f013e0e114610a0e578063f2fde38b14610a2e578063fe575a8714610a4e57600080fd5b8063dbbc853b14610984578063de49e4db14610999578063e222c7f9146109b9578063e985e9c5146109ce57600080fd5b8063c8d2524c116100dc578063c8d2524c1461090b578063cb645ccb1461092b578063d450fbc914610940578063d52236481461096057600080fd5b8063c0ac9983146108b6578063c3c2ae1d146108cb578063c87b56dd146108eb57600080fd5b80638d859f3e1161017a578063a22cb46511610149578063a22cb4651461084c578063a8d43bd81461086c578063ac30777314610881578063b88d4fde1461089657600080fd5b80638d859f3e146107ed5780638da5cb5b14610803578063931e2e491461082157806395d89b411461083757600080fd5b80638456cb59116101b65780638456cb59146107615780638462151c14610776578063878dd332146107a35780638a0c4fea146107bd57600080fd5b8063755edd171461070157806377325d7a146107215780637a341bc71461074157600080fd5b806342842e0e116102c15780635c975abb1161025f578063704150331161022e578063704150331461069657806370a08231146106b6578063715018a6146106d6578063717a002b146106eb57600080fd5b80635c975abb1461062b5780636352211e14610643578063657fc38d146106635780636f9fb98a1461068357600080fd5b806347b5dd541161029b57806347b5dd54146105b55780634d853ee5146105cb5780634f6ccce7146105eb578063537df3b61461060b57600080fd5b806342842e0e1461055557806342966c681461057557806344337ea11461059557600080fd5b8063184d69ab1161032e5780632f745c59116103085780632f745c59146104e057806330176e13146105005780633f4ba83a146105205780633f5645081461053557600080fd5b8063184d69ab146104895780631e84c413146104a857806323b872dd146104c057600080fd5b8063095ea7b31161036a578063095ea7b31461042057806310ebde42146104425780631249c58b1461046257806318160ddd1461046a57600080fd5b806301ffc9a71461039157806306fdde03146103c6578063081812fc146103e8575b600080fd5b34801561039d57600080fd5b506103b16103ac366004612eb7565b610a87565b60405190151581526020015b60405180910390f35b3480156103d257600080fd5b506103db610a98565b6040516103bd9190612f2c565b3480156103f457600080fd5b50610408610403366004612f3f565b610b2a565b6040516001600160a01b0390911681526020016103bd565b34801561042c57600080fd5b5061044061043b366004612f6f565b610b53565b005b34801561044e57600080fd5b5061044061045d366004613076565b610b62565b610440610bd7565b34801561047657600080fd5b506008545b6040519081526020016103bd565b34801561049557600080fd5b50601c546103b190610100900460ff1681565b3480156104b457600080fd5b5060165460ff166103b1565b3480156104cc57600080fd5b506104406104db3660046130ab565b610d0d565b3480156104ec57600080fd5b5061047b6104fb366004612f6f565b610d98565b34801561050c57600080fd5b5061044061051b36600461315f565b610e2e565b34801561052c57600080fd5b50610440610e64565b34801561054157600080fd5b5061044061055036600461315f565b610e98565b34801561056157600080fd5b506104406105703660046130ab565b610ece565b34801561058157600080fd5b50610440610590366004612f3f565b610eee565b3480156105a157600080fd5b506104406105b0366004613194565b610f94565b3480156105c157600080fd5b5061047b601d5481565b3480156105d757600080fd5b50601054610408906001600160a01b031681565b3480156105f757600080fd5b5061047b610606366004612f3f565b61100a565b34801561061757600080fd5b50610440610626366004613194565b61109d565b34801561063757600080fd5b50600c5460ff166103b1565b34801561064f57600080fd5b5061040861065e366004612f3f565b611110565b34801561066f57600080fd5b5061044061067e36600461315f565b61111b565b34801561068f57600080fd5b504761047b565b3480156106a257600080fd5b506103db6106b1366004612f3f565b611151565b3480156106c257600080fd5b5061047b6106d1366004613194565b61121a565b3480156106e257600080fd5b50610440611262565b3480156106f757600080fd5b5061047b600f5481565b34801561070d57600080fd5b5061044061071c366004613194565b611296565b34801561072d57600080fd5b5061044061073c3660046131af565b6113b0565b34801561074d57600080fd5b5061044061075c366004613194565b611481565b34801561076d57600080fd5b5061044061158b565b34801561078257600080fd5b50610796610791366004613194565b6115bd565b6040516103bd91906131d1565b3480156107af57600080fd5b50601c546103b19060ff1681565b3480156107c957600080fd5b506103b16107d8366004613194565b601e6020526000908152604090205460ff1681565b3480156107f957600080fd5b5061047b600d5481565b34801561080f57600080fd5b50600a546001600160a01b0316610408565b34801561082d57600080fd5b5061047b600e5481565b34801561084357600080fd5b506103db61167f565b34801561085857600080fd5b50610440610867366004613215565b61168e565b34801561087857600080fd5b50610440611699565b34801561088d57600080fd5b50610440611725565b3480156108a257600080fd5b506104406108b1366004613251565b6117aa565b3480156108c257600080fd5b506103db6117c1565b3480156108d757600080fd5b506104406108e6366004613194565b61184f565b3480156108f757600080fd5b506103db610906366004612f3f565b61189d565b34801561091757600080fd5b5061047b610926366004612f3f565b611905565b34801561093757600080fd5b5061047b600081565b34801561094c57600080fd5b506103db61095b366004612f3f565b611941565b34801561096c57600080fd5b503360009081526012602052604090205415156103b1565b34801561099057600080fd5b506103db611a4f565b3480156109a557600080fd5b506104406109b4366004613328565b611a5c565b3480156109c557600080fd5b50610440611c8d565b3480156109da57600080fd5b506103b16109e93660046133fc565b611ccb565b3480156109fa57600080fd5b50610440610a09366004612f3f565b611cf9565b348015610a1a57600080fd5b50610440610a2936600461342f565b611d82565b348015610a3a57600080fd5b50610440610a49366004613194565b611f64565b348015610a5a57600080fd5b506103b1610a69366004613194565b6001600160a01b031660009081526011602052604090205460ff1690565b6000610a9282611fff565b92915050565b606060008054610aa79061347c565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad39061347c565b8015610b205780601f10610af557610100808354040283529160200191610b20565b820191906000526020600020905b815481529060010190602001808311610b0357829003601f168201915b5050505050905090565b6000610b3582612024565b506000828152600460205260409020546001600160a01b0316610a92565b610b5e82823361205d565b5050565b600a546001600160a01b03163314610b955760405162461bcd60e51b8152600401610b8c906134b0565b60405180910390fd5b60005b8151811015610b5e57610bc5828281518110610bb657610bb66134e5565b6020026020010151600161206a565b80610bcf81613511565b915050610b98565b6002600b5403610bf95760405162461bcd60e51b8152600401610b8c9061352a565b6002600b55600e544210801590610c125750600f544211155b8015610c20575060165460ff165b15610c37576016805460ff19166001179055610c42565b6016805460ff191690555b610c4a612259565b6000600d5434610c5a9190613577565b90506001811015610cad5760405162461bcd60e51b815260206004820152601c60248201527f43616e2774206d696e74206c657373207468656e203120746f6b656e000000006044820152606401610b8c565b60165460ff16610cfb5760405162461bcd60e51b81526020600482015260196024820152785075626c69632073616c65206973206e6f742061637469766560381b6044820152606401610b8c565b610d05338261206a565b506001600b55565b6001600160a01b038216610d3757604051633250574960e11b815260006004820152602401610b8c565b6000610d4483833361227d565b9050836001600160a01b0316816001600160a01b031614610d92576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401610b8c565b50505050565b6000610da38361121a565b8210610e055760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b8c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610e585760405162461bcd60e51b8152600401610b8c906134b0565b601b610b5e82826135d9565b600a546001600160a01b03163314610e8e5760405162461bcd60e51b8152600401610b8c906134b0565b610e96612292565b565b600a546001600160a01b03163314610ec25760405162461bcd60e51b8152600401610b8c906134b0565b6017610b5e82826135d9565b610ee9838383604051806020016040528060008152506117aa565b505050565b6000818152600260205260409020546001600160a01b031633811480610f235750336000908152601e602052604090205460ff165b610f6f5760405162461bcd60e51b815260206004820152601f60248201527f596f7520617265206e6f74206f776e6572206f66207468697320746f6b656e006044820152606401610b8c565b610f78826122df565b6001601d6000828254610f8b9190613699565b90915550505050565b600a546001600160a01b03163314610fbe5760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b038116600081815260116020526040808220805460ff19166001179055517fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b8559190a250565b600061101560085490565b82106110785760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b8c565b6008828154811061108b5761108b6134e5565b90600052602060002001549050919050565b600a546001600160a01b031633146110c75760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b038116600081815260116020526040808220805460ff19169055517f7534c63860313c46c473e4e98328f37017e9674e2162faf1a3ad7a96236c3b7b9190a250565b6000610a9282612024565b600a546001600160a01b031633146111455760405162461bcd60e51b8152600401610b8c906134b0565b6018610b5e82826135d9565b606061115c60085490565b821061117a5760405162461bcd60e51b8152600401610b8c906136b1565b611185600042613699565b61118e83611905565b106111db5760405162461bcd60e51b815260206004820152601d60248201527f5468617420656e7469747920686173206e6f742067726f776e207965740000006044820152606401610b8c565b601760146000848152602001908152602001600020601860405160200161120493929190613765565b6040516020818303038152906040529050919050565b60006001600160a01b038216611246576040516322718ad960e21b815260006004820152602401610b8c565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461128c5760405162461bcd60e51b8152600401610b8c906134b0565b610e966000612333565b6002600b54036112b85760405162461bcd60e51b8152600401610b8c9061352a565b6002600b55600e5442108015906112d15750600f544211155b80156112df575060165460ff165b156112f6576016805460ff19166001179055611301565b6016805460ff191690555b611309612259565b336000908152601e602052604090205460ff166113575760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420656c696769626c6560a01b6044820152606401610b8c565b60165460ff166113a55760405162461bcd60e51b81526020600482015260196024820152785075626c69632073616c65206973206e6f742061637469766560381b6044820152606401610b8c565b610d0581600161206a565b600a546001600160a01b031633146113da5760405162461bcd60e51b8152600401610b8c906134b0565b80821061143a5760405162461bcd60e51b815260206004820152602860248201527f456e642074696d65206d7573742062652067726561746572207468616e2073746044820152676172742074696d6560c01b6064820152608401610b8c565b600e829055600f81905560408051838152602081018390527f8da114a60c42a34374a4db1437a7105ff2904ff5f6873c5aaa1eb33c030f0961910160405180910390a15050565b600a546001600160a01b031633146114ab5760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b0381166115015760405162461bcd60e51b815260206004820152601d60248201527f5a65726f20616464726573732063616e277420626520666f756e6465720000006044820152606401610b8c565b6010546001600160a01b03908116908216036115695760405162461bcd60e51b815260206004820152602160248201527f4e657720666f756e64657220697320657175616c207072657620666f756e64656044820152603960f91b6064820152608401610b8c565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031633146115b55760405162461bcd60e51b8152600401610b8c906134b0565b610e96612385565b606060006115ca8361121a565b9050806000036115ee5760408051600080825260208201909252905b509392505050565b60008167ffffffffffffffff81111561160957611609612f99565b604051908082528060200260200182016040528015611632578160200160208202803683370190505b50905060005b828110156115e65761164a8582610d98565b82828151811061165c5761165c6134e5565b60209081029190910101528061167181613511565b915050611638565b50919050565b606060018054610aa79061347c565b610b5e3383836123c2565b600a546001600160a01b031633146116c35760405162461bcd60e51b8152600401610b8c906134b0565b601c805460ff610100808304821615810261ff001990931692909217928390556040517f1cf28b997975c7be355bcef74f2f5019aa48253bc1e54b3c8b002471865fdba89361171b9390049091161515815260200190565b60405180910390a1565b600a546001600160a01b031633148061174857506010546001600160a01b031633145b6117945760405162461bcd60e51b815260206004820152601760248201527f596f752068617665206e6f20726967687420746f2069740000000000000000006044820152606401610b8c565b601054610e96906001600160a01b031647612461565b6117b5848484610d0d565b610d9284848484612580565b601780546117ce9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546117fa9061347c565b80156118475780601f1061181c57610100808354040283529160200191611847565b820191906000526020600020905b81548152906001019060200180831161182a57829003601f168201915b505050505081565b600a546001600160a01b031633146118795760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b03166000908152601e60205260409020805460ff19166001179055565b60606118a882612024565b5060006118b36126a9565b905060008151116118d357604051806020016040528060008152506118fe565b806118dd846126b8565b6040516020016118ee92919061378c565b6040516020818303038152906040525b9392505050565b600061191060085490565b821061192e5760405162461bcd60e51b8152600401610b8c906136b1565b5060009081526013602052604090205490565b600a546060906001600160a01b0316331461196e5760405162461bcd60e51b8152600401610b8c906134b0565b600854821061198f5760405162461bcd60e51b8152600401610b8c906136b1565b601654610100900460ff1615611a3157601580546119ac9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546119d89061347c565b8015611a255780601f106119fa57610100808354040283529160200191611a25565b820191906000526020600020905b815481529060010190602001808311611a0857829003601f168201915b50505050509050919050565b600082815260146020526040902080546119ac9061347c565b919050565b601880546117ce9061347c565b600a546001600160a01b03163314611a865760405162461bcd60e51b8152600401610b8c906134b0565b8051825114611ad75760405162461bcd60e51b815260206004820181905260248201527f6d697363656c6c616e656f7573206e756d626572206f6620656c656d656e74736044820152606401610b8c565b601654610100900460ff1615611b105781600081518110611afa57611afa6134e5565b602002602001015160159081610ee991906135d9565b60005b8151811015610ee957600060146000848481518110611b3457611b346134e5565b602002602001015181526020019081526020016000208054611b559061347c565b80601f0160208091040260200160405190810160405280929190818152602001828054611b819061347c565b8015611bce5780601f10611ba357610100808354040283529160200191611bce565b820191906000526020600020905b815481529060010190602001808311611bb157829003601f168201915b505050505090508051600014611c265760405162461bcd60e51b815260206004820152601e60248201527f4950465320686173682063616e20626520736574206f6e6c79206f6e636500006044820152606401610b8c565b838281518110611c3857611c386134e5565b602002602001015160146000858581518110611c5657611c566134e5565b602002602001015181526020019081526020016000209081611c7891906135d9565b50508080611c8590613511565b915050611b13565b600a546001600160a01b03163314611cb75760405162461bcd60e51b8152600401610b8c906134b0565b6016805460ff19811660ff90911615179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b03163314611d235760405162461bcd60e51b8152600401610b8c906134b0565b600d5460408051606080825260059082015264505249434560d81b6080820152602081019290925281018290527f0d072220716df8d505ad38ae8dbfe77b968e2c80bb73f08c38a08d5fe4f9911a9060a00160405180910390a1600d55565b600a546001600160a01b03163314611dac5760405162461bcd60e51b8152600401610b8c906134b0565b8051825114611e165760405162461bcd60e51b815260206004820152603060248201527f546865206e756d626572206f662061646472657373657320616e6420616d6f7560448201526f0dce8e640c8de40dcdee840dac2e8c6d60831b6064820152608401610b8c565b60005b8251811015610ee95760006001600160a01b0316838281518110611e3f57611e3f6134e5565b60200260200101516001600160a01b031603611eac5760405162461bcd60e51b815260206004820152602660248201527f6f6e65206f7220666577206d656d6265727320697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b8c565b818181518110611ebe57611ebe6134e5565b602002602001015160126000858481518110611edc57611edc6134e5565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550600060116000858481518110611f2057611f206134e5565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611f5c81613511565b915050611e19565b600a546001600160a01b03163314611f8e5760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b038116611ff35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b8c565b611ffc81612333565b50565b60006001600160e01b0319821663780e9d6360e01b1480610a925750610a92826127b9565b6000818152600260205260408120546001600160a01b031680610a9257604051637e27328960e01b815260048101849052602401610b8c565b610ee98383836001612809565b6001600160a01b03821660009081526011602052604090205460ff16156120d35760405162461bcd60e51b815260206004820181905260248201527f426c61636b6c69737465643a206d696e74696e67206e6f7420616c6c6f7765646044820152606401610b8c565b601c54610100900460ff16156121c8576001600160a01b0382166000908152601260205260409020546121485760405162461bcd60e51b815260206004820152601d60248201527f596f7520617265206e6f7420656c696769626c6520666f72206d696e740000006044820152606401610b8c565b6001600160a01b0382166000908152601260205260409020548111156121c85760405162461bcd60e51b815260206004820152602f60248201527f596f75722077686974656c69737420616d6f756e74206c657373207468616e2060448201526e1e5bdd481d1c9e481d1bc81b5a5b9d608a1b6064820152608401610b8c565b601c54610100900460ff1615612206576001600160a01b038216600090815260126020526040812080548392906122009084906137bb565b90915550505b60005b81811015610ee9576000601d5461221f60085490565b6122299190613699565b60008181526013602052604090204290559050612246848261290f565b508061225181613511565b915050612209565b600c5460ff1615610e965760405163d93c066560e01b815260040160405180910390fd5b600061228a848484612929565b949350505050565b61229a61293e565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200161171b565b60006122ea82611110565b90506122f881600084612961565b6000612307600084600061227d565b90506001600160a01b038116610ee957604051637e27328960e01b815260048101849052602401610b8c565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61238d612259565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122c73390565b6001600160a01b0382166123f457604051630b61174360e31b81526001600160a01b0383166004820152602401610b8c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6002600b54036124835760405162461bcd60e51b8152600401610b8c9061352a565b6002600b55478082116124965781612498565b805b91506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146124e7576040519150601f19603f3d011682016040523d82523d6000602084013e6124ec565b606091505b50509050806125325760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408aa8960731b6044820152606401610b8c565b836001600160a01b03167f2d7972e635b540e3a7d69ab075a726bac4112e45f631bde1b551cb069dcad6df8460405161256d91815260200190565b60405180910390a250506001600b555050565b6001600160a01b0383163b15610d9257604051630a85bd0160e11b81526001600160a01b0384169063150b7a02906125c29033908890879087906004016137d2565b6020604051808303816000875af19250505080156125fd575060408051601f3d908101601f191682019092526125fa9181019061380f565b60015b612666573d80801561262b576040519150601f19603f3d011682016040523d82523d6000602084013e612630565b606091505b50805160000361265e57604051633250574960e11b81526001600160a01b0385166004820152602401610b8c565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146126a257604051633250574960e11b81526001600160a01b0385166004820152602401610b8c565b5050505050565b6060601b8054610aa79061347c565b6060816000036126df5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561270957806126f381613511565b91506127029050600a83613577565b91506126e3565b60008167ffffffffffffffff81111561272457612724612f99565b6040519080825280601f01601f19166020018201604052801561274e576020820181803683370190505b5090505b841561228a576127636001836137bb565b9150612770600a8661382c565b61277b906030613699565b60f81b818381518110612790576127906134e5565b60200101906001600160f81b031916908160001a9053506127b2600a86613577565b9450612752565b60006001600160e01b031982166380ac58cd60e01b14806127ea57506001600160e01b03198216635b5e139f60e01b145b80610a9257506301ffc9a760e01b6001600160e01b0319831614610a92565b808061281d57506001600160a01b03821615155b156128df57600061282d84612024565b90506001600160a01b038316158015906128595750826001600160a01b0316816001600160a01b031614155b801561286c575061286a8184611ccb565b155b156128955760405163a9fbf51f60e01b81526001600160a01b0384166004820152602401610b8c565b81156128dd5783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b610b5e828260405180602001604052806000815250612a11565b6000612933612259565b61228a848484612a28565b600c5460ff16610e9657604051638dfc202b60e01b815260040160405180910390fd5b612969612259565b612974838383612b21565b6001600160a01b03831660009081526011602052604090205460ff161580156129b657506001600160a01b03821660009081526011602052604090205460ff16155b610ee95760405162461bcd60e51b815260206004820152602660248201527f426c61636b6c69737465643a20746f6b656e207472616e736665722070726f686044820152651a589a5d195960d21b6064820152608401610b8c565b612a1b8383612bd9565b610ee96000848484612580565b6000828152600260205260408120546001600160a01b0390811690831615612a5557612a55818486612c4a565b6001600160a01b03811615612a9357612a72600085600080612809565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615612ac2576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b6001600160a01b038316612b7c57612b7781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612b9f565b816001600160a01b0316836001600160a01b031614612b9f57612b9f8382612cae565b6001600160a01b038216612bb657610ee981612d4b565b826001600160a01b0316826001600160a01b031614610ee957610ee98282612dfa565b6001600160a01b038216612c0357604051633250574960e11b815260006004820152602401610b8c565b612c0f60008383612961565b6000612c1d8383600061227d565b90506001600160a01b03811615610ee9576040516339e3563760e11b815260006004820152602401610b8c565b612c55838383612e3e565b610ee9576001600160a01b038316612c8357604051637e27328960e01b815260048101829052602401610b8c565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401610b8c565b60006001612cbb8461121a565b612cc591906137bb565b600083815260076020526040902054909150808214612d18576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d5d906001906137bb565b60008381526009602052604081205460088054939450909284908110612d8557612d856134e5565b906000526020600020015490508060088381548110612da657612da66134e5565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612dde57612dde613840565b6001900381819060005260206000200160009055905550505050565b6000612e058361121a565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b0383161580159061228a5750826001600160a01b0316846001600160a01b03161480612e785750612e788484611ccb565b8061228a5750506000908152600460205260409020546001600160a01b03908116911614919050565b6001600160e01b031981168114611ffc57600080fd5b600060208284031215612ec957600080fd5b81356118fe81612ea1565b60005b83811015612eef578181015183820152602001612ed7565b83811115610d925750506000910152565b60008151808452612f18816020860160208601612ed4565b601f01601f19169290920160200192915050565b6020815260006118fe6020830184612f00565b600060208284031215612f5157600080fd5b5035919050565b80356001600160a01b0381168114611a4a57600080fd5b60008060408385031215612f8257600080fd5b612f8b83612f58565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612fd857612fd8612f99565b604052919050565b600067ffffffffffffffff821115612ffa57612ffa612f99565b5060051b60200190565b600082601f83011261301557600080fd5b8135602061302a61302583612fe0565b612faf565b82815260059290921b8401810191818101908684111561304957600080fd5b8286015b8481101561306b5761305e81612f58565b835291830191830161304d565b509695505050505050565b60006020828403121561308857600080fd5b813567ffffffffffffffff81111561309f57600080fd5b61228a84828501613004565b6000806000606084860312156130c057600080fd5b6130c984612f58565b92506130d760208501612f58565b9150604084013590509250925092565b600067ffffffffffffffff83111561310157613101612f99565b613114601f8401601f1916602001612faf565b905082815283838301111561312857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261315057600080fd5b6118fe838335602085016130e7565b60006020828403121561317157600080fd5b813567ffffffffffffffff81111561318857600080fd5b61228a8482850161313f565b6000602082840312156131a657600080fd5b6118fe82612f58565b600080604083850312156131c257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015613209578351835292840192918401916001016131ed565b50909695505050505050565b6000806040838503121561322857600080fd5b61323183612f58565b91506020830135801515811461324657600080fd5b809150509250929050565b6000806000806080858703121561326757600080fd5b61327085612f58565b935061327e60208601612f58565b925060408501359150606085013567ffffffffffffffff8111156132a157600080fd5b8501601f810187136132b257600080fd5b6132c1878235602084016130e7565b91505092959194509250565b600082601f8301126132de57600080fd5b813560206132ee61302583612fe0565b82815260059290921b8401810191818101908684111561330d57600080fd5b8286015b8481101561306b5780358352918301918301613311565b6000806040838503121561333b57600080fd5b823567ffffffffffffffff8082111561335357600080fd5b818501915085601f83011261336757600080fd5b8135602061337761302583612fe0565b82815260059290921b8401810191818101908984111561339657600080fd5b8286015b848110156133ce578035868111156133b25760008081fd5b6133c08c86838b010161313f565b84525091830191830161339a565b50965050860135925050808211156133e557600080fd5b506133f2858286016132cd565b9150509250929050565b6000806040838503121561340f57600080fd5b61341883612f58565b915061342660208401612f58565b90509250929050565b6000806040838503121561344257600080fd5b823567ffffffffffffffff8082111561345a57600080fd5b61346686838701613004565b935060208501359150808211156133e557600080fd5b600181811c9082168061349057607f821691505b60208210810361167957634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613523576135236134fb565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60008261358657613586613561565b500490565b601f821115610ee957600081815260208120601f850160051c810160208610156135b25750805b601f850160051c820191505b818110156135d1578281556001016135be565b505050505050565b815167ffffffffffffffff8111156135f3576135f3612f99565b61360781613601845461347c565b8461358b565b602080601f83116001811461363c57600084156136245750858301515b600019600386901b1c1916600185901b1785556135d1565b600085815260208120601f198616915b8281101561366b5788860151825594840194600190910190840161364c565b50858210156136895787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082198211156136ac576136ac6134fb565b500190565b60208082526021908201527f5468617420656e7469747920686173206e6f74206265656e206d616b652079656040820152601d60fa1b606082015260800190565b600081546136ff8161347c565b60018281168015613717576001811461372c5761375b565b60ff198416875282151583028701945061375b565b8560005260208060002060005b858110156137525781548a820152908401908201613739565b50505082870194505b5050505092915050565b600061378361377d61377784886136f2565b866136f2565b846136f2565b95945050505050565b6000835161379e818460208801612ed4565b8351908301906137b2818360208801612ed4565b01949350505050565b6000828210156137cd576137cd6134fb565b500390565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061380590830184612f00565b9695505050505050565b60006020828403121561382157600080fd5b81516118fe81612ea1565b60008261383b5761383b613561565b500690565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220fb3500bd994a4e1eff649d3bd7ac613be9a3aac78ae139df751eb1380499a95364736f6c634300080f003368747470733a2f2f6d656469612e616c7068616d696e642e636f2f6e66742f6c696e65612e6e66742f6170692f000000000000000000000000190f12fda98c98306b35a2ae0b4c7fe44b5afda9
Deployed Bytecode
0x60806040526004361061038c5760003560e01c8063755edd17116101dc578063c0ac998311610102578063dbbc853b116100a0578063ee8cdd4e1161006f578063ee8cdd4e146109ee578063f013e0e114610a0e578063f2fde38b14610a2e578063fe575a8714610a4e57600080fd5b8063dbbc853b14610984578063de49e4db14610999578063e222c7f9146109b9578063e985e9c5146109ce57600080fd5b8063c8d2524c116100dc578063c8d2524c1461090b578063cb645ccb1461092b578063d450fbc914610940578063d52236481461096057600080fd5b8063c0ac9983146108b6578063c3c2ae1d146108cb578063c87b56dd146108eb57600080fd5b80638d859f3e1161017a578063a22cb46511610149578063a22cb4651461084c578063a8d43bd81461086c578063ac30777314610881578063b88d4fde1461089657600080fd5b80638d859f3e146107ed5780638da5cb5b14610803578063931e2e491461082157806395d89b411461083757600080fd5b80638456cb59116101b65780638456cb59146107615780638462151c14610776578063878dd332146107a35780638a0c4fea146107bd57600080fd5b8063755edd171461070157806377325d7a146107215780637a341bc71461074157600080fd5b806342842e0e116102c15780635c975abb1161025f578063704150331161022e578063704150331461069657806370a08231146106b6578063715018a6146106d6578063717a002b146106eb57600080fd5b80635c975abb1461062b5780636352211e14610643578063657fc38d146106635780636f9fb98a1461068357600080fd5b806347b5dd541161029b57806347b5dd54146105b55780634d853ee5146105cb5780634f6ccce7146105eb578063537df3b61461060b57600080fd5b806342842e0e1461055557806342966c681461057557806344337ea11461059557600080fd5b8063184d69ab1161032e5780632f745c59116103085780632f745c59146104e057806330176e13146105005780633f4ba83a146105205780633f5645081461053557600080fd5b8063184d69ab146104895780631e84c413146104a857806323b872dd146104c057600080fd5b8063095ea7b31161036a578063095ea7b31461042057806310ebde42146104425780631249c58b1461046257806318160ddd1461046a57600080fd5b806301ffc9a71461039157806306fdde03146103c6578063081812fc146103e8575b600080fd5b34801561039d57600080fd5b506103b16103ac366004612eb7565b610a87565b60405190151581526020015b60405180910390f35b3480156103d257600080fd5b506103db610a98565b6040516103bd9190612f2c565b3480156103f457600080fd5b50610408610403366004612f3f565b610b2a565b6040516001600160a01b0390911681526020016103bd565b34801561042c57600080fd5b5061044061043b366004612f6f565b610b53565b005b34801561044e57600080fd5b5061044061045d366004613076565b610b62565b610440610bd7565b34801561047657600080fd5b506008545b6040519081526020016103bd565b34801561049557600080fd5b50601c546103b190610100900460ff1681565b3480156104b457600080fd5b5060165460ff166103b1565b3480156104cc57600080fd5b506104406104db3660046130ab565b610d0d565b3480156104ec57600080fd5b5061047b6104fb366004612f6f565b610d98565b34801561050c57600080fd5b5061044061051b36600461315f565b610e2e565b34801561052c57600080fd5b50610440610e64565b34801561054157600080fd5b5061044061055036600461315f565b610e98565b34801561056157600080fd5b506104406105703660046130ab565b610ece565b34801561058157600080fd5b50610440610590366004612f3f565b610eee565b3480156105a157600080fd5b506104406105b0366004613194565b610f94565b3480156105c157600080fd5b5061047b601d5481565b3480156105d757600080fd5b50601054610408906001600160a01b031681565b3480156105f757600080fd5b5061047b610606366004612f3f565b61100a565b34801561061757600080fd5b50610440610626366004613194565b61109d565b34801561063757600080fd5b50600c5460ff166103b1565b34801561064f57600080fd5b5061040861065e366004612f3f565b611110565b34801561066f57600080fd5b5061044061067e36600461315f565b61111b565b34801561068f57600080fd5b504761047b565b3480156106a257600080fd5b506103db6106b1366004612f3f565b611151565b3480156106c257600080fd5b5061047b6106d1366004613194565b61121a565b3480156106e257600080fd5b50610440611262565b3480156106f757600080fd5b5061047b600f5481565b34801561070d57600080fd5b5061044061071c366004613194565b611296565b34801561072d57600080fd5b5061044061073c3660046131af565b6113b0565b34801561074d57600080fd5b5061044061075c366004613194565b611481565b34801561076d57600080fd5b5061044061158b565b34801561078257600080fd5b50610796610791366004613194565b6115bd565b6040516103bd91906131d1565b3480156107af57600080fd5b50601c546103b19060ff1681565b3480156107c957600080fd5b506103b16107d8366004613194565b601e6020526000908152604090205460ff1681565b3480156107f957600080fd5b5061047b600d5481565b34801561080f57600080fd5b50600a546001600160a01b0316610408565b34801561082d57600080fd5b5061047b600e5481565b34801561084357600080fd5b506103db61167f565b34801561085857600080fd5b50610440610867366004613215565b61168e565b34801561087857600080fd5b50610440611699565b34801561088d57600080fd5b50610440611725565b3480156108a257600080fd5b506104406108b1366004613251565b6117aa565b3480156108c257600080fd5b506103db6117c1565b3480156108d757600080fd5b506104406108e6366004613194565b61184f565b3480156108f757600080fd5b506103db610906366004612f3f565b61189d565b34801561091757600080fd5b5061047b610926366004612f3f565b611905565b34801561093757600080fd5b5061047b600081565b34801561094c57600080fd5b506103db61095b366004612f3f565b611941565b34801561096c57600080fd5b503360009081526012602052604090205415156103b1565b34801561099057600080fd5b506103db611a4f565b3480156109a557600080fd5b506104406109b4366004613328565b611a5c565b3480156109c557600080fd5b50610440611c8d565b3480156109da57600080fd5b506103b16109e93660046133fc565b611ccb565b3480156109fa57600080fd5b50610440610a09366004612f3f565b611cf9565b348015610a1a57600080fd5b50610440610a2936600461342f565b611d82565b348015610a3a57600080fd5b50610440610a49366004613194565b611f64565b348015610a5a57600080fd5b506103b1610a69366004613194565b6001600160a01b031660009081526011602052604090205460ff1690565b6000610a9282611fff565b92915050565b606060008054610aa79061347c565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad39061347c565b8015610b205780601f10610af557610100808354040283529160200191610b20565b820191906000526020600020905b815481529060010190602001808311610b0357829003601f168201915b5050505050905090565b6000610b3582612024565b506000828152600460205260409020546001600160a01b0316610a92565b610b5e82823361205d565b5050565b600a546001600160a01b03163314610b955760405162461bcd60e51b8152600401610b8c906134b0565b60405180910390fd5b60005b8151811015610b5e57610bc5828281518110610bb657610bb66134e5565b6020026020010151600161206a565b80610bcf81613511565b915050610b98565b6002600b5403610bf95760405162461bcd60e51b8152600401610b8c9061352a565b6002600b55600e544210801590610c125750600f544211155b8015610c20575060165460ff165b15610c37576016805460ff19166001179055610c42565b6016805460ff191690555b610c4a612259565b6000600d5434610c5a9190613577565b90506001811015610cad5760405162461bcd60e51b815260206004820152601c60248201527f43616e2774206d696e74206c657373207468656e203120746f6b656e000000006044820152606401610b8c565b60165460ff16610cfb5760405162461bcd60e51b81526020600482015260196024820152785075626c69632073616c65206973206e6f742061637469766560381b6044820152606401610b8c565b610d05338261206a565b506001600b55565b6001600160a01b038216610d3757604051633250574960e11b815260006004820152602401610b8c565b6000610d4483833361227d565b9050836001600160a01b0316816001600160a01b031614610d92576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401610b8c565b50505050565b6000610da38361121a565b8210610e055760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b8c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610e585760405162461bcd60e51b8152600401610b8c906134b0565b601b610b5e82826135d9565b600a546001600160a01b03163314610e8e5760405162461bcd60e51b8152600401610b8c906134b0565b610e96612292565b565b600a546001600160a01b03163314610ec25760405162461bcd60e51b8152600401610b8c906134b0565b6017610b5e82826135d9565b610ee9838383604051806020016040528060008152506117aa565b505050565b6000818152600260205260409020546001600160a01b031633811480610f235750336000908152601e602052604090205460ff165b610f6f5760405162461bcd60e51b815260206004820152601f60248201527f596f7520617265206e6f74206f776e6572206f66207468697320746f6b656e006044820152606401610b8c565b610f78826122df565b6001601d6000828254610f8b9190613699565b90915550505050565b600a546001600160a01b03163314610fbe5760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b038116600081815260116020526040808220805460ff19166001179055517fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b8559190a250565b600061101560085490565b82106110785760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b8c565b6008828154811061108b5761108b6134e5565b90600052602060002001549050919050565b600a546001600160a01b031633146110c75760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b038116600081815260116020526040808220805460ff19169055517f7534c63860313c46c473e4e98328f37017e9674e2162faf1a3ad7a96236c3b7b9190a250565b6000610a9282612024565b600a546001600160a01b031633146111455760405162461bcd60e51b8152600401610b8c906134b0565b6018610b5e82826135d9565b606061115c60085490565b821061117a5760405162461bcd60e51b8152600401610b8c906136b1565b611185600042613699565b61118e83611905565b106111db5760405162461bcd60e51b815260206004820152601d60248201527f5468617420656e7469747920686173206e6f742067726f776e207965740000006044820152606401610b8c565b601760146000848152602001908152602001600020601860405160200161120493929190613765565b6040516020818303038152906040529050919050565b60006001600160a01b038216611246576040516322718ad960e21b815260006004820152602401610b8c565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461128c5760405162461bcd60e51b8152600401610b8c906134b0565b610e966000612333565b6002600b54036112b85760405162461bcd60e51b8152600401610b8c9061352a565b6002600b55600e5442108015906112d15750600f544211155b80156112df575060165460ff165b156112f6576016805460ff19166001179055611301565b6016805460ff191690555b611309612259565b336000908152601e602052604090205460ff166113575760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420656c696769626c6560a01b6044820152606401610b8c565b60165460ff166113a55760405162461bcd60e51b81526020600482015260196024820152785075626c69632073616c65206973206e6f742061637469766560381b6044820152606401610b8c565b610d0581600161206a565b600a546001600160a01b031633146113da5760405162461bcd60e51b8152600401610b8c906134b0565b80821061143a5760405162461bcd60e51b815260206004820152602860248201527f456e642074696d65206d7573742062652067726561746572207468616e2073746044820152676172742074696d6560c01b6064820152608401610b8c565b600e829055600f81905560408051838152602081018390527f8da114a60c42a34374a4db1437a7105ff2904ff5f6873c5aaa1eb33c030f0961910160405180910390a15050565b600a546001600160a01b031633146114ab5760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b0381166115015760405162461bcd60e51b815260206004820152601d60248201527f5a65726f20616464726573732063616e277420626520666f756e6465720000006044820152606401610b8c565b6010546001600160a01b03908116908216036115695760405162461bcd60e51b815260206004820152602160248201527f4e657720666f756e64657220697320657175616c207072657620666f756e64656044820152603960f91b6064820152608401610b8c565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031633146115b55760405162461bcd60e51b8152600401610b8c906134b0565b610e96612385565b606060006115ca8361121a565b9050806000036115ee5760408051600080825260208201909252905b509392505050565b60008167ffffffffffffffff81111561160957611609612f99565b604051908082528060200260200182016040528015611632578160200160208202803683370190505b50905060005b828110156115e65761164a8582610d98565b82828151811061165c5761165c6134e5565b60209081029190910101528061167181613511565b915050611638565b50919050565b606060018054610aa79061347c565b610b5e3383836123c2565b600a546001600160a01b031633146116c35760405162461bcd60e51b8152600401610b8c906134b0565b601c805460ff610100808304821615810261ff001990931692909217928390556040517f1cf28b997975c7be355bcef74f2f5019aa48253bc1e54b3c8b002471865fdba89361171b9390049091161515815260200190565b60405180910390a1565b600a546001600160a01b031633148061174857506010546001600160a01b031633145b6117945760405162461bcd60e51b815260206004820152601760248201527f596f752068617665206e6f20726967687420746f2069740000000000000000006044820152606401610b8c565b601054610e96906001600160a01b031647612461565b6117b5848484610d0d565b610d9284848484612580565b601780546117ce9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546117fa9061347c565b80156118475780601f1061181c57610100808354040283529160200191611847565b820191906000526020600020905b81548152906001019060200180831161182a57829003601f168201915b505050505081565b600a546001600160a01b031633146118795760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b03166000908152601e60205260409020805460ff19166001179055565b60606118a882612024565b5060006118b36126a9565b905060008151116118d357604051806020016040528060008152506118fe565b806118dd846126b8565b6040516020016118ee92919061378c565b6040516020818303038152906040525b9392505050565b600061191060085490565b821061192e5760405162461bcd60e51b8152600401610b8c906136b1565b5060009081526013602052604090205490565b600a546060906001600160a01b0316331461196e5760405162461bcd60e51b8152600401610b8c906134b0565b600854821061198f5760405162461bcd60e51b8152600401610b8c906136b1565b601654610100900460ff1615611a3157601580546119ac9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546119d89061347c565b8015611a255780601f106119fa57610100808354040283529160200191611a25565b820191906000526020600020905b815481529060010190602001808311611a0857829003601f168201915b50505050509050919050565b600082815260146020526040902080546119ac9061347c565b919050565b601880546117ce9061347c565b600a546001600160a01b03163314611a865760405162461bcd60e51b8152600401610b8c906134b0565b8051825114611ad75760405162461bcd60e51b815260206004820181905260248201527f6d697363656c6c616e656f7573206e756d626572206f6620656c656d656e74736044820152606401610b8c565b601654610100900460ff1615611b105781600081518110611afa57611afa6134e5565b602002602001015160159081610ee991906135d9565b60005b8151811015610ee957600060146000848481518110611b3457611b346134e5565b602002602001015181526020019081526020016000208054611b559061347c565b80601f0160208091040260200160405190810160405280929190818152602001828054611b819061347c565b8015611bce5780601f10611ba357610100808354040283529160200191611bce565b820191906000526020600020905b815481529060010190602001808311611bb157829003601f168201915b505050505090508051600014611c265760405162461bcd60e51b815260206004820152601e60248201527f4950465320686173682063616e20626520736574206f6e6c79206f6e636500006044820152606401610b8c565b838281518110611c3857611c386134e5565b602002602001015160146000858581518110611c5657611c566134e5565b602002602001015181526020019081526020016000209081611c7891906135d9565b50508080611c8590613511565b915050611b13565b600a546001600160a01b03163314611cb75760405162461bcd60e51b8152600401610b8c906134b0565b6016805460ff19811660ff90911615179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600a546001600160a01b03163314611d235760405162461bcd60e51b8152600401610b8c906134b0565b600d5460408051606080825260059082015264505249434560d81b6080820152602081019290925281018290527f0d072220716df8d505ad38ae8dbfe77b968e2c80bb73f08c38a08d5fe4f9911a9060a00160405180910390a1600d55565b600a546001600160a01b03163314611dac5760405162461bcd60e51b8152600401610b8c906134b0565b8051825114611e165760405162461bcd60e51b815260206004820152603060248201527f546865206e756d626572206f662061646472657373657320616e6420616d6f7560448201526f0dce8e640c8de40dcdee840dac2e8c6d60831b6064820152608401610b8c565b60005b8251811015610ee95760006001600160a01b0316838281518110611e3f57611e3f6134e5565b60200260200101516001600160a01b031603611eac5760405162461bcd60e51b815260206004820152602660248201527f6f6e65206f7220666577206d656d6265727320697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b8c565b818181518110611ebe57611ebe6134e5565b602002602001015160126000858481518110611edc57611edc6134e5565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550600060116000858481518110611f2057611f206134e5565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611f5c81613511565b915050611e19565b600a546001600160a01b03163314611f8e5760405162461bcd60e51b8152600401610b8c906134b0565b6001600160a01b038116611ff35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b8c565b611ffc81612333565b50565b60006001600160e01b0319821663780e9d6360e01b1480610a925750610a92826127b9565b6000818152600260205260408120546001600160a01b031680610a9257604051637e27328960e01b815260048101849052602401610b8c565b610ee98383836001612809565b6001600160a01b03821660009081526011602052604090205460ff16156120d35760405162461bcd60e51b815260206004820181905260248201527f426c61636b6c69737465643a206d696e74696e67206e6f7420616c6c6f7765646044820152606401610b8c565b601c54610100900460ff16156121c8576001600160a01b0382166000908152601260205260409020546121485760405162461bcd60e51b815260206004820152601d60248201527f596f7520617265206e6f7420656c696769626c6520666f72206d696e740000006044820152606401610b8c565b6001600160a01b0382166000908152601260205260409020548111156121c85760405162461bcd60e51b815260206004820152602f60248201527f596f75722077686974656c69737420616d6f756e74206c657373207468616e2060448201526e1e5bdd481d1c9e481d1bc81b5a5b9d608a1b6064820152608401610b8c565b601c54610100900460ff1615612206576001600160a01b038216600090815260126020526040812080548392906122009084906137bb565b90915550505b60005b81811015610ee9576000601d5461221f60085490565b6122299190613699565b60008181526013602052604090204290559050612246848261290f565b508061225181613511565b915050612209565b600c5460ff1615610e965760405163d93c066560e01b815260040160405180910390fd5b600061228a848484612929565b949350505050565b61229a61293e565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200161171b565b60006122ea82611110565b90506122f881600084612961565b6000612307600084600061227d565b90506001600160a01b038116610ee957604051637e27328960e01b815260048101849052602401610b8c565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61238d612259565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122c73390565b6001600160a01b0382166123f457604051630b61174360e31b81526001600160a01b0383166004820152602401610b8c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6002600b54036124835760405162461bcd60e51b8152600401610b8c9061352a565b6002600b55478082116124965781612498565b805b91506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146124e7576040519150601f19603f3d011682016040523d82523d6000602084013e6124ec565b606091505b50509050806125325760405162461bcd60e51b815260206004820152601260248201527108cc2d2d8cac840e8de40e6cadcc8408aa8960731b6044820152606401610b8c565b836001600160a01b03167f2d7972e635b540e3a7d69ab075a726bac4112e45f631bde1b551cb069dcad6df8460405161256d91815260200190565b60405180910390a250506001600b555050565b6001600160a01b0383163b15610d9257604051630a85bd0160e11b81526001600160a01b0384169063150b7a02906125c29033908890879087906004016137d2565b6020604051808303816000875af19250505080156125fd575060408051601f3d908101601f191682019092526125fa9181019061380f565b60015b612666573d80801561262b576040519150601f19603f3d011682016040523d82523d6000602084013e612630565b606091505b50805160000361265e57604051633250574960e11b81526001600160a01b0385166004820152602401610b8c565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b146126a257604051633250574960e11b81526001600160a01b0385166004820152602401610b8c565b5050505050565b6060601b8054610aa79061347c565b6060816000036126df5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561270957806126f381613511565b91506127029050600a83613577565b91506126e3565b60008167ffffffffffffffff81111561272457612724612f99565b6040519080825280601f01601f19166020018201604052801561274e576020820181803683370190505b5090505b841561228a576127636001836137bb565b9150612770600a8661382c565b61277b906030613699565b60f81b818381518110612790576127906134e5565b60200101906001600160f81b031916908160001a9053506127b2600a86613577565b9450612752565b60006001600160e01b031982166380ac58cd60e01b14806127ea57506001600160e01b03198216635b5e139f60e01b145b80610a9257506301ffc9a760e01b6001600160e01b0319831614610a92565b808061281d57506001600160a01b03821615155b156128df57600061282d84612024565b90506001600160a01b038316158015906128595750826001600160a01b0316816001600160a01b031614155b801561286c575061286a8184611ccb565b155b156128955760405163a9fbf51f60e01b81526001600160a01b0384166004820152602401610b8c565b81156128dd5783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b610b5e828260405180602001604052806000815250612a11565b6000612933612259565b61228a848484612a28565b600c5460ff16610e9657604051638dfc202b60e01b815260040160405180910390fd5b612969612259565b612974838383612b21565b6001600160a01b03831660009081526011602052604090205460ff161580156129b657506001600160a01b03821660009081526011602052604090205460ff16155b610ee95760405162461bcd60e51b815260206004820152602660248201527f426c61636b6c69737465643a20746f6b656e207472616e736665722070726f686044820152651a589a5d195960d21b6064820152608401610b8c565b612a1b8383612bd9565b610ee96000848484612580565b6000828152600260205260408120546001600160a01b0390811690831615612a5557612a55818486612c4a565b6001600160a01b03811615612a9357612a72600085600080612809565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615612ac2576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b6001600160a01b038316612b7c57612b7781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612b9f565b816001600160a01b0316836001600160a01b031614612b9f57612b9f8382612cae565b6001600160a01b038216612bb657610ee981612d4b565b826001600160a01b0316826001600160a01b031614610ee957610ee98282612dfa565b6001600160a01b038216612c0357604051633250574960e11b815260006004820152602401610b8c565b612c0f60008383612961565b6000612c1d8383600061227d565b90506001600160a01b03811615610ee9576040516339e3563760e11b815260006004820152602401610b8c565b612c55838383612e3e565b610ee9576001600160a01b038316612c8357604051637e27328960e01b815260048101829052602401610b8c565b60405163177e802f60e01b81526001600160a01b038316600482015260248101829052604401610b8c565b60006001612cbb8461121a565b612cc591906137bb565b600083815260076020526040902054909150808214612d18576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d5d906001906137bb565b60008381526009602052604081205460088054939450909284908110612d8557612d856134e5565b906000526020600020015490508060088381548110612da657612da66134e5565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612dde57612dde613840565b6001900381819060005260206000200160009055905550505050565b6000612e058361121a565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b0383161580159061228a5750826001600160a01b0316846001600160a01b03161480612e785750612e788484611ccb565b8061228a5750506000908152600460205260409020546001600160a01b03908116911614919050565b6001600160e01b031981168114611ffc57600080fd5b600060208284031215612ec957600080fd5b81356118fe81612ea1565b60005b83811015612eef578181015183820152602001612ed7565b83811115610d925750506000910152565b60008151808452612f18816020860160208601612ed4565b601f01601f19169290920160200192915050565b6020815260006118fe6020830184612f00565b600060208284031215612f5157600080fd5b5035919050565b80356001600160a01b0381168114611a4a57600080fd5b60008060408385031215612f8257600080fd5b612f8b83612f58565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612fd857612fd8612f99565b604052919050565b600067ffffffffffffffff821115612ffa57612ffa612f99565b5060051b60200190565b600082601f83011261301557600080fd5b8135602061302a61302583612fe0565b612faf565b82815260059290921b8401810191818101908684111561304957600080fd5b8286015b8481101561306b5761305e81612f58565b835291830191830161304d565b509695505050505050565b60006020828403121561308857600080fd5b813567ffffffffffffffff81111561309f57600080fd5b61228a84828501613004565b6000806000606084860312156130c057600080fd5b6130c984612f58565b92506130d760208501612f58565b9150604084013590509250925092565b600067ffffffffffffffff83111561310157613101612f99565b613114601f8401601f1916602001612faf565b905082815283838301111561312857600080fd5b828260208301376000602084830101529392505050565b600082601f83011261315057600080fd5b6118fe838335602085016130e7565b60006020828403121561317157600080fd5b813567ffffffffffffffff81111561318857600080fd5b61228a8482850161313f565b6000602082840312156131a657600080fd5b6118fe82612f58565b600080604083850312156131c257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015613209578351835292840192918401916001016131ed565b50909695505050505050565b6000806040838503121561322857600080fd5b61323183612f58565b91506020830135801515811461324657600080fd5b809150509250929050565b6000806000806080858703121561326757600080fd5b61327085612f58565b935061327e60208601612f58565b925060408501359150606085013567ffffffffffffffff8111156132a157600080fd5b8501601f810187136132b257600080fd5b6132c1878235602084016130e7565b91505092959194509250565b600082601f8301126132de57600080fd5b813560206132ee61302583612fe0565b82815260059290921b8401810191818101908684111561330d57600080fd5b8286015b8481101561306b5780358352918301918301613311565b6000806040838503121561333b57600080fd5b823567ffffffffffffffff8082111561335357600080fd5b818501915085601f83011261336757600080fd5b8135602061337761302583612fe0565b82815260059290921b8401810191818101908984111561339657600080fd5b8286015b848110156133ce578035868111156133b25760008081fd5b6133c08c86838b010161313f565b84525091830191830161339a565b50965050860135925050808211156133e557600080fd5b506133f2858286016132cd565b9150509250929050565b6000806040838503121561340f57600080fd5b61341883612f58565b915061342660208401612f58565b90509250929050565b6000806040838503121561344257600080fd5b823567ffffffffffffffff8082111561345a57600080fd5b61346686838701613004565b935060208501359150808211156133e557600080fd5b600181811c9082168061349057607f821691505b60208210810361167957634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613523576135236134fb565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60008261358657613586613561565b500490565b601f821115610ee957600081815260208120601f850160051c810160208610156135b25750805b601f850160051c820191505b818110156135d1578281556001016135be565b505050505050565b815167ffffffffffffffff8111156135f3576135f3612f99565b61360781613601845461347c565b8461358b565b602080601f83116001811461363c57600084156136245750858301515b600019600386901b1c1916600185901b1785556135d1565b600085815260208120601f198616915b8281101561366b5788860151825594840194600190910190840161364c565b50858210156136895787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082198211156136ac576136ac6134fb565b500190565b60208082526021908201527f5468617420656e7469747920686173206e6f74206265656e206d616b652079656040820152601d60fa1b606082015260800190565b600081546136ff8161347c565b60018281168015613717576001811461372c5761375b565b60ff198416875282151583028701945061375b565b8560005260208060002060005b858110156137525781548a820152908401908201613739565b50505082870194505b5050505092915050565b600061378361377d61377784886136f2565b866136f2565b846136f2565b95945050505050565b6000835161379e818460208801612ed4565b8351908301906137b2818360208801612ed4565b01949350505050565b6000828210156137cd576137cd6134fb565b500390565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061380590830184612f00565b9695505050505050565b60006020828403121561382157600080fd5b81516118fe81612ea1565b60008261383b5761383b613561565b500690565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220fb3500bd994a4e1eff649d3bd7ac613be9a3aac78ae139df751eb1380499a95364736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000190f12fda98c98306b35a2ae0b4c7fe44b5afda9
-----Decoded View---------------
Arg [0] : _allowBurn (address): 0x190F12fDa98c98306b35a2aE0B4c7FE44B5aFda9
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000190f12fda98c98306b35a2ae0b4c7fe44b5afda9
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.