Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 754 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Approval For... | 24637017 | 30 hrs ago | IN | 0 ETH | 0.00002486 | ||||
| Set Approval For... | 23647014 | 139 days ago | IN | 0 ETH | 0.00002651 | ||||
| Set Approval For... | 23343880 | 182 days ago | IN | 0 ETH | 0.00003204 | ||||
| Set Approval For... | 23096273 | 216 days ago | IN | 0 ETH | 0.0000153 | ||||
| Set Approval For... | 23013532 | 228 days ago | IN | 0 ETH | 0.00003544 | ||||
| Set Approval For... | 22676583 | 275 days ago | IN | 0 ETH | 0.00019484 | ||||
| Set Approval For... | 22582206 | 288 days ago | IN | 0 ETH | 0.00025496 | ||||
| Set Approval For... | 22451726 | 306 days ago | IN | 0 ETH | 0.00033999 | ||||
| Set Approval For... | 22451725 | 306 days ago | IN | 0 ETH | 0.0003374 | ||||
| Set Approval For... | 22451724 | 306 days ago | IN | 0 ETH | 0.00033074 | ||||
| Set Approval For... | 22361832 | 319 days ago | IN | 0 ETH | 0.00002189 | ||||
| Set Approval For... | 21986743 | 371 days ago | IN | 0 ETH | 0.00003449 | ||||
| Set Approval For... | 21880509 | 386 days ago | IN | 0 ETH | 0.00002964 | ||||
| Set Approval For... | 21579476 | 428 days ago | IN | 0 ETH | 0.00026299 | ||||
| Set Approval For... | 21502034 | 439 days ago | IN | 0 ETH | 0.00030956 | ||||
| Set Approval For... | 21114075 | 493 days ago | IN | 0 ETH | 0.0002715 | ||||
| Transfer From | 21074582 | 499 days ago | IN | 0 ETH | 0.00047681 | ||||
| Safe Transfer Fr... | 20698848 | 551 days ago | IN | 0 ETH | 0.00013648 | ||||
| Set Approval For... | 20319315 | 604 days ago | IN | 0 ETH | 0.00020559 | ||||
| Set Approval For... | 20107091 | 634 days ago | IN | 0 ETH | 0.00006381 | ||||
| Set Approval For... | 19950927 | 656 days ago | IN | 0 ETH | 0.00013411 | ||||
| Set Approval For... | 19832980 | 672 days ago | IN | 0 ETH | 0.00026601 | ||||
| Set Approval For... | 19832964 | 672 days ago | IN | 0 ETH | 0.00022905 | ||||
| Safe Transfer Fr... | 19660906 | 696 days ago | IN | 0 ETH | 0.00116157 | ||||
| Safe Transfer Fr... | 19574202 | 708 days ago | IN | 0 ETH | 0.00133856 |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ERC721Custom
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import 'erc721a/contracts/ERC721A.sol';
import './IERC721Custom.sol';
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract ERC721Custom is IERC721Custom, ERC721A, AccessControl, ReentrancyGuard {
using Strings for uint256;
uint256 public freeMintLimit;
uint256 public maxSupply;
uint256 public mintPrice;
uint256 public maxBatchMint = 5;
bytes32 public merkleRoot;
string public baseURI;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public freeMintClaimed;
bool public airdropDone = false;
address public devAddress = 0xEfF5ffD4659b9FaB41c2371B775d37F00b287CCf;
constructor(
address _admin,
string memory _baseURI,
string memory _tokenName,
string memory _tokenSymbol,
bytes32 _merkleRoot,
uint256 _mintPrice,
uint256 _freeMintLimit,
uint256 _maxSupply
) ERC721A(_tokenName, _tokenSymbol) {
_setupRole(DEFAULT_ADMIN_ROLE, _admin);
baseURI = _baseURI;
merkleRoot = _merkleRoot;
mintPrice = _mintPrice;
freeMintLimit = _freeMintLimit;
maxSupply = _maxSupply;
}
modifier _onlyAdmin() {
require(
hasRole(DEFAULT_ADMIN_ROLE, msg.sender),
"You are not allowed to perform this operation"
);
_;
}
modifier payableMintCompliance(uint256 _amount) {
require(airdropDone, "Cant mint before the end of airdrop");
require(_amount > 0 && _amount <= maxBatchMint, "You can mint from 1 to 5 token not less, not more, less is more");
require(totalSupply() + _amount <= maxSupply, "Sorry bro no more token you miss your luck");
require(msg.value >= mintPrice * _amount, "We said it's payable not free it's 0.002 ETH each NFT");
_;
}
modifier freeMintCompliance(address to) {
require(airdropDone, "Cant mint before the end of airdrop");
require(totalSupply() + 1 <= freeMintLimit, "There is only 100 free NFT you miss your luck bro, be water");
require(!freeMintClaimed[to], "You already claim a free mint with this wallet, create a new one we know you, fucking botters");
_;
}
function checkMerkleProof(address to, bytes32[] calldata _merkleProof) public view returns(bool) {
bytes32 leaf = keccak256(abi.encodePacked(to));
if (!MerkleProof.verify(_merkleProof, merkleRoot, leaf)) {
return false;
}
if (whitelistClaimed[to]) {
return false;
}
return true;
}
function mintWhitelist(address to, bytes32[] calldata _merkleProof) public {
require(totalSupply() + 1 <= maxSupply, "Sorry bro no more token you miss your luck");
require(checkMerkleProof(to, _merkleProof), "Address is not whitelisted or have already claim");
whitelistClaimed[to] = true;
_safeMint(to, 1);
}
function freeMint(address to) public freeMintCompliance(to) {
freeMintClaimed[to] = true;
_safeMint(to, 1);
}
function payableMint(address to, uint256 amount) public payable payableMintCompliance(amount) {
_safeMint(to, amount);
}
function mint(uint256 amount) public payable {
if (totalSupply() + 1 <= freeMintLimit) {
freeMint(_msgSender());
} else {
payableMint(_msgSender(), amount);
}
}
function withdrawFund(address to) public _onlyAdmin nonReentrant {
require(address(this).balance > 0, "No fund to withdraw I know you like money but go work moron");
(bool hs, ) = payable(devAddress).call{value: address(this).balance * 22 / 100}('');
require(hs);
(bool os, ) = payable(to).call{value: address(this).balance}('');
require(os);
}
function setAirdropDone(bool _state) public _onlyAdmin {
airdropDone = _state;
}
function _startTokenId() internal view virtual override returns (uint256) {
return 1;
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, AccessControl)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override(ERC721A)
returns (string memory)
{
return string(abi.encodePacked(baseTokenURI(), _tokenId.toString(), '.json'));
}
function baseTokenURI() public view returns (string memory) {
return baseURI;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
/**
* @dev Interface used to make a custom mint with whitelist and batch mint after freemint
*
*
*
*/
interface IERC721Custom {
/**
* @dev Function use to check a merkle proof with the whitelist stored in contract
*
* - `address to`: address of the wallet
* - `bytes32[] _merkleProof`: Proof use to check with the merkle root
*
*/
function checkMerkleProof(address to, bytes32[] calldata _merkleProof) external view returns(bool);
/**
* @dev Function use to airdrop token
*
* - `address to`: address of the wallet
* - `bytes32[] _merkleProof`: Proof use to check with the merkle root
*
* Requirements:
*
* - Caller must be Admin
*/
function mintWhitelist(address to, bytes32[] calldata _merkleProof) external;
/**
* @dev Function use to free mint token 1 by 1
*
* - `address to`: address of the wallet
*
* Requirements:
*
* - TotalSupply must be lower than freemintLimit
* - Airdrop must be done
*/
function freeMint(address to) external;
/**
* @dev Function use to mint token payable in batchmint 1 to 5
*
* - `address to`: address of the wallet
* - `uint256 amount`: Amount of token to mint
*
* Requirements:
*
* - TotalSupply + amount must be lower than maxSupply
* - TotalSupply must be greater than freemintLimit
* - Airdrop must be done
*/
function payableMint(address to, uint256 amount) external payable;
/**
* @dev Function use to mint
*
* It will automatically dispatch to the free or payable mint
* each free or payable have requirements and must failed if you cant mint
*/
function mint(uint256 amount) external payable;
/**
* @dev Function use to get back the fund
*
* - `address to`: address of the wallet
*
* Requirements:
*
* - Caller must be Admin
*/
function withdrawFund(address to) external;
/**
* @dev Function use to set airdrop done
*
* Requirements:
*
* - Caller must be Admin
*/
function setAirdropDone(bool _state) external;
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721A.sol';
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
// =============================================================
// ADDRESS DATA OPERATIONS
// =============================================================
/**
* @dev Returns the number of tokens in `owner`'s account.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @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, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// Invariant:
// There will always be an initialized ownership slot
// (i.e. `ownership.addr != address(0) && ownership.burned == false`)
// before an unintialized ownership slot
// (i.e. `ownership.addr == address(0) && ownership.burned == false`)
// Hence, `curr` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* @dev Returns the unpacked `TokenOwnership` struct from `packed`.
*/
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
ownership.burned = packed & _BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
}
/**
* @dev Packs ownership data into a single uint256.
*/
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
/**
* @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
*/
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
// For branchless setting of the `nextInitialized` flag.
assembly {
// `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @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) public payable virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
/**
* @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) public virtual override {
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted. See {_mint}.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
*/
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, _BITMASK_ADDRESS)
// `msgSender == owner || msgSender == approvedAddress`.
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
}
}
// =============================================================
// TRANSFER OPERATIONS
// =============================================================
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* 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
) public payable virtual override {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable virtual override {
safeTransferFrom(from, to, tokenId, '');
}
/**
* @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 memory _data
) public payable virtual override {
transferFrom(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @dev Hook that is called before a set of serially-ordered token IDs
* are about to be transferred. This includes minting.
* And also called before burning one token.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* 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, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token IDs
* have been transferred. This includes minting.
* And also called after one token has been burned.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* `from` - Previous owner of the given token ID.
* `to` - Target address that will receive the token.
* `tokenId` - Token ID to be transferred.
* `_data` - Optional data to send along with the call.
*
* Returns whether the call correctly returned the expected magic value.
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
// =============================================================
// MINT OPERATIONS
// =============================================================
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event for each mint.
*/
function _mint(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// `balance` and `numberMinted` have a maximum limit of 2**64.
// `tokenId` has a maximum limit of 2**256.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
uint256 toMasked;
uint256 end = startTokenId + quantity;
// Use assembly to loop and emit the `Transfer` event for gas savings.
// The duplicated `log4` removes an extra check and reduces stack juggling.
// The assembly, together with the surrounding Solidity code, have been
// delicately arranged to nudge the compiler into producing optimized opcodes.
assembly {
// Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
toMasked := and(to, _BITMASK_ADDRESS)
// Emit the `Transfer` event.
log4(
0, // Start of data (0, since no data).
0, // End of data (0, since no data).
_TRANSFER_EVENT_SIGNATURE, // Signature.
0, // `address(0)`.
toMasked, // `to`.
startTokenId // `tokenId`.
)
// The `iszero(eq(,))` check ensures that large values of `quantity`
// that overflows uint256 will make the loop run out of gas.
// The compiler will optimize the `iszero` away for performance.
for {
let tokenId := add(startTokenId, 1)
} iszero(eq(tokenId, end)) {
tokenId := add(tokenId, 1)
} {
// Emit the `Transfer` event. Similar to above.
log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
}
}
if (toMasked == 0) revert MintToZeroAddress();
_currentIndex = end;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* This function is intended for efficient minting only during contract creation.
*
* It emits only one {ConsecutiveTransfer} as defined in
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
* instead of a sequence of {Transfer} event(s).
*
* Calling this function outside of contract creation WILL make your contract
* non-compliant with the ERC721 standard.
* For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
* {ConsecutiveTransfer} event is only permissible during contract creation.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {ConsecutiveTransfer} event.
*/
function _mintERC2309(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are unrealistic due to the above check for `quantity` to be below the limit.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
_currentIndex = startTokenId + quantity;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* See {_mint}.
*
* Emits a {Transfer} event for each mint.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
_mint(to, quantity);
unchecked {
if (to.code.length != 0) {
uint256 end = _currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (index < end);
// Reentrancy protection.
if (_currentIndex != end) revert();
}
}
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
// =============================================================
// BURN OPERATIONS
// =============================================================
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
address from = address(uint160(prevOwnershipPacked));
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
if (approvalCheck) {
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// Updates:
// - `balance -= 1`.
// - `numberBurned += 1`.
//
// We can directly decrement the balance, and increment the number burned.
// This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
_packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;
// Updates:
// - `address` to the last owner.
// - `startTimestamp` to the timestamp of burning.
// - `burned` to `true`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
from,
(_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
// Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
unchecked {
_burnCounter++;
}
}
// =============================================================
// EXTRA DATA OPERATIONS
// =============================================================
/**
* @dev Directly sets the extra data for the ownership data `index`.
*/
function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
uint256 packed = _packedOwnerships[index];
if (packed == 0) revert OwnershipNotInitializedForExtraData();
uint256 extraDataCasted;
// Cast `extraData` with assembly to avoid redundant masking.
assembly {
extraDataCasted := extraData
}
packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
_packedOwnerships[index] = packed;
}
/**
* @dev Called during each token transfer to set the 24bit `extraData` field.
* Intended to be overridden by the cosumer contract.
*
* `previousExtraData` - the value of `extraData` before transfer.
*
* 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, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual returns (uint24) {}
/**
* @dev Returns the next extra data for the packed ownership data.
* The returned result is shifted into position.
*/
function _nextExtraData(
address from,
address to,
uint256 prevOwnershipPacked
) private view returns (uint256) {
uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
}
// =============================================================
// OTHER OPERATIONS
// =============================================================
/**
* @dev Returns the message sender (defaults to `msg.sender`).
*
* If you are writing GSN compatible contracts, you need to override this function.
*/
function _msgSenderERC721A() internal view virtual returns (address) {
return msg.sender;
}
/**
* @dev Converts a uint256 to its ASCII string decimal representation.
*/
function _toString(uint256 value) internal pure virtual returns (string memory str) {
assembly {
// The maximum value of a uint256 contains 78 digits (1 byte per digit), but
// we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
// We will need 1 word for the trailing zeros padding, 1 word for the length,
// and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
let m := add(mload(0x40), 0xa0)
// Update the free memory pointer to allocate.
mstore(0x40, m)
// Assign the `str` to the end.
str := sub(m, 0x20)
// Zeroize the slot after the string.
mstore(str, 0)
// Cache the end of the memory to calculate the length later.
let end := str
// We write the string from rightmost digit to leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
// prettier-ignore
for { let temp := value } 1 {} {
str := sub(str, 1)
// Write the character to the pointer.
// The ASCII index of the '0' character is 48.
mstore8(str, add(48, mod(temp, 10)))
// Keep dividing `temp` until zero.
temp := div(temp, 10)
// prettier-ignore
if iszero(temp) { break }
}
let length := sub(end, str)
// Move the pointer 32 bytes leftwards to make room for the length.
str := sub(str, 0x20)
// Store the length.
mstore(str, length)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* May emit a {RoleGranted} event.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @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 making 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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Calldata version of {verify}
*
* _Available since v4.7._
*/
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
* from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
* hash matches the root of the tree. When processing the proof, the pairs
* of leafs & pre-images are assumed to be sorted.
*
* _Available since v4.4._
*/
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Calldata version of {processProof}
*
* _Available since v4.7._
*/
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
/**
* @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* _Available since v4.7._
*/
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
/**
* @dev Calldata version of {multiProofVerify}
*
* _Available since v4.7._
*/
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
/**
* @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
* consuming from one or the other at each step according to the instructions given by
* `proofFlags`.
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
// consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
// `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
// the merkle tree.
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
// The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
// `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
// At each step, we compute the next hash using two values:
// - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
// get the next hash.
// - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
// `proof` array.
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the
* ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
// =============================================================
// STRUCTS
// =============================================================
struct TokenOwnership {
// The address of the owner.
address addr;
// Stores the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
uint24 extraData;
}
// =============================================================
// TOKEN COUNTERS
// =============================================================
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() external view returns (uint256);
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
// =============================================================
// IERC721
// =============================================================
/**
* @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,
bytes calldata data
) external payable;
/**
* @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
/**
* @dev Transfers `tokenId` 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 payable;
/**
* @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 payable;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @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);
// =============================================================
// IERC2309
// =============================================================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId`
* (inclusive) is transferred from `from` to `to`, as defined in the
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
*
* See {_mintERC2309} for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"},{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"_mintPrice","type":"uint256"},{"internalType":"uint256","name":"_freeMintLimit","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airdropDone","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"checkMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"freeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"freeMintClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"maxBatchMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"payableMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setAirdropDone","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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"withdrawFund","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040526005600d55601280546001600160a81b03191674eff5ffd4659b9fab41c2371b775d37f00b287ccf001790553480156200003d57600080fd5b50604051620026dc380380620026dc83398101604081905262000060916200025d565b85856002620000708382620003b8565b5060036200007f8282620003b8565b506001600090815560016009556200009b9250905089620000c7565b600f620000a98882620003b8565b50600e93909355600c91909155600a55600b55506200048492505050565b620000d38282620000d7565b5050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620000d35760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001373390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200019357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001c057600080fd5b81516001600160401b0380821115620001dd57620001dd62000198565b604051601f8301601f19908116603f0116810190828211818310171562000208576200020862000198565b816040528381526020925086838588010111156200022557600080fd5b600091505b838210156200024957858201830151818301840152908201906200022a565b600093810190920192909252949350505050565b600080600080600080600080610100898b0312156200027b57600080fd5b62000286896200017b565b60208a01519098506001600160401b0380821115620002a457600080fd5b620002b28c838d01620001ae565b985060408b0151915080821115620002c957600080fd5b620002d78c838d01620001ae565b975060608b0151915080821115620002ee57600080fd5b50620002fd8b828c01620001ae565b9550506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b600181811c908216806200033e57607f821691505b6020821081036200035f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003b357600081815260208120601f850160051c810160208610156200038e5750805b601f850160051c820191505b81811015620003af578281556001016200039a565b5050505b505050565b81516001600160401b03811115620003d457620003d462000198565b620003ec81620003e5845462000329565b8462000365565b602080601f8311600181146200042457600084156200040b5750858301515b600019600386901b1c1916600185901b178555620003af565b600085815260208120601f198616915b82811015620004555788860151825594840194600190910190840162000434565b5085821015620004745787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61224880620004946000396000f3fe6080604052600436106102255760003560e01c80636c0360eb11610123578063d1b5e912116100ab578063db4bec441161006f578063db4bec44146105e1578063dd8e210314610611578063e0ec7c3614610631578063e985e9c514610661578063fa07ce1d146106aa57600080fd5b8063d1b5e91214610563578063d2223b6414610583578063d547741f14610596578063d547cfb7146105b6578063d5abeb01146105cb57600080fd5b8063a0712d68116100f2578063a0712d68146104e8578063a217fddf146104fb578063a22cb46514610510578063b88d4fde14610530578063c87b56dd1461054357600080fd5b80636c0360eb1461047e57806370a082311461049357806391d14854146104b357806395d89b41146104d357600080fd5b8063248a9ca3116101b157806342842e0e1161017557806342842e0e146103fb5780634ca64b5d1461040e5780635376f1a3146104285780636352211e146104485780636817c76c1461046857600080fd5b8063248a9ca3146103505780632eb4a7ab146103805780632f2ff15d1461039657806336568abe146103b65780633ad10ef6146103d657600080fd5b8063095ea7b3116101f8578063095ea7b3146102dd57806309a3a9c1146102f25780630e99579a1461030857806318160ddd1461032857806323b872dd1461033d57600080fd5b806301ffc9a71461022a57806306fdde031461025f578063081812fc1461028157806308346d85146102b9575b600080fd5b34801561023657600080fd5b5061024a610245366004611bc0565b6106ca565b60405190151581526020015b60405180910390f35b34801561026b57600080fd5b506102746106db565b6040516102569190611c2d565b34801561028d57600080fd5b506102a161029c366004611c40565b61076d565b6040516001600160a01b039091168152602001610256565b3480156102c557600080fd5b506102cf600a5481565b604051908152602001610256565b6102f06102eb366004611c75565b6107b1565b005b3480156102fe57600080fd5b506102cf600d5481565b34801561031457600080fd5b506102f0610323366004611caf565b610851565b34801561033457600080fd5b506102cf610894565b6102f061034b366004611cca565b6108a2565b34801561035c57600080fd5b506102cf61036b366004611c40565b60009081526008602052604090206001015490565b34801561038c57600080fd5b506102cf600e5481565b3480156103a257600080fd5b506102f06103b1366004611d06565b610a3a565b3480156103c257600080fd5b506102f06103d1366004611d06565b610a64565b3480156103e257600080fd5b506012546102a19061010090046001600160a01b031681565b6102f0610409366004611cca565b610ae2565b34801561041a57600080fd5b5060125461024a9060ff1681565b34801561043457600080fd5b506102f0610443366004611d32565b610afd565b34801561045457600080fd5b506102a1610463366004611c40565b610cd2565b34801561047457600080fd5b506102cf600c5481565b34801561048a57600080fd5b50610274610cdd565b34801561049f57600080fd5b506102cf6104ae366004611d32565b610d6b565b3480156104bf57600080fd5b5061024a6104ce366004611d06565b610dba565b3480156104df57600080fd5b50610274610de5565b6102f06104f6366004611c40565b610df4565b34801561050757600080fd5b506102cf600081565b34801561051c57600080fd5b506102f061052b366004611d4d565b610e25565b6102f061053e366004611d8d565b610e91565b34801561054f57600080fd5b5061027461055e366004611c40565b610edb565b34801561056f57600080fd5b5061024a61057e366004611e69565b610f15565b6102f0610591366004611c75565b610fd8565b3480156105a257600080fd5b506102f06105b1366004611d06565b611139565b3480156105c257600080fd5b5061027461115e565b3480156105d757600080fd5b506102cf600b5481565b3480156105ed57600080fd5b5061024a6105fc366004611d32565b60106020526000908152604090205460ff1681565b34801561061d57600080fd5b506102f061062c366004611e69565b61116d565b34801561063d57600080fd5b5061024a61064c366004611d32565b60116020526000908152604090205460ff1681565b34801561066d57600080fd5b5061024a61067c366004611eef565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156106b657600080fd5b506102f06106c5366004611d32565b611242565b60006106d5826113d6565b92915050565b6060600280546106ea90611f19565b80601f016020809104026020016040519081016040528092919081815260200182805461071690611f19565b80156107635780601f1061073857610100808354040283529160200191610763565b820191906000526020600020905b81548152906001019060200180831161074657829003601f168201915b5050505050905090565b60006107788261140b565b610795576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006107bc82610cd2565b9050336001600160a01b038216146107f5576107d8813361067c565b6107f5576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61085c600033610dba565b6108815760405162461bcd60e51b815260040161087890611f53565b60405180910390fd5b6012805460ff1916911515919091179055565b600154600054036000190190565b60006108ad82611440565b9050836001600160a01b0316816001600160a01b0316146108e05760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761092d57610910863361067c565b61092d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661095457604051633a954ecd60e21b815260040160405180910390fd5b801561095f57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036109f1576001840160008181526004602052604081205490036109ef5760005481146109ef5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600082815260086020526040902060010154610a55816114af565b610a5f83836114b9565b505050565b6001600160a01b0381163314610ad45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610878565b610ade828261153f565b5050565b610a5f83838360405180602001604052806000815250610e91565b610b08600033610dba565b610b245760405162461bcd60e51b815260040161087890611f53565b600260095403610b765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610878565b600260095547610bee5760405162461bcd60e51b815260206004820152603b60248201527f4e6f2066756e6420746f2077697468647261772049206b6e6f7720796f75206c60448201527f696b65206d6f6e65792062757420676f20776f726b206d6f726f6e00000000006064820152608401610878565b60125460009061010090046001600160a01b03166064610c0f476016611fb6565b610c199190611fe3565b604051600081818185875af1925050503d8060008114610c55576040519150601f19603f3d011682016040523d82523d6000602084013e610c5a565b606091505b5050905080610c6857600080fd5b6000826001600160a01b03164760405160006040518083038185875af1925050503d8060008114610cb5576040519150601f19603f3d011682016040523d82523d6000602084013e610cba565b606091505b5050905080610cc857600080fd5b5050600160095550565b60006106d582611440565b600f8054610cea90611f19565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1690611f19565b8015610d635780601f10610d3857610100808354040283529160200191610d63565b820191906000526020600020905b815481529060010190602001808311610d4657829003601f168201915b505050505081565b60006001600160a01b038216610d94576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546106ea90611f19565b600a54610dff610894565b610e0a906001611ff7565b11610e1b57610e1833611242565b50565b610e183382610fd8565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e9c8484846108a2565b6001600160a01b0383163b15610ed557610eb8848484846115a6565b610ed5576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060610ee561115e565b610eee83611692565b604051602001610eff92919061200a565b6040516020818303038152906040529050919050565b6040516bffffffffffffffffffffffff19606085901b1660208201526000908190603401604051602081830303815290604052805190602001209050610f9284848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150849050611793565b610fa0576000915050610fd1565b6001600160a01b03851660009081526010602052604090205460ff1615610fcb576000915050610fd1565b60019150505b9392505050565b601254819060ff16610ffc5760405162461bcd60e51b815260040161087890612049565b60008111801561100e5750600d548111155b6110805760405162461bcd60e51b815260206004820152603f60248201527f596f752063616e206d696e742066726f6d203120746f203520746f6b656e206e60448201527f6f74206c6573732c206e6f74206d6f72652c206c657373206973206d6f7265006064820152608401610878565b600b548161108c610894565b6110969190611ff7565b11156110b45760405162461bcd60e51b81526004016108789061208c565b80600c546110c29190611fb6565b34101561112f5760405162461bcd60e51b815260206004820152603560248201527f5765207361696420697427732070617961626c65206e6f74206672656520697460448201527409dcc80c0b8c0c0c8811551208195858da08139195605a1b6064820152608401610878565b610a5f83836117a9565b600082815260086020526040902060010154611154816114af565b610a5f838361153f565b6060600f80546106ea90611f19565b600b54611178610894565b611183906001611ff7565b11156111a15760405162461bcd60e51b81526004016108789061208c565b6111ac838383610f15565b6112115760405162461bcd60e51b815260206004820152603060248201527f41646472657373206973206e6f742077686974656c6973746564206f7220686160448201526f766520616c726561647920636c61696d60801b6064820152608401610878565b6001600160a01b0383166000908152601060205260409020805460ff19166001908117909155610a5f9084906117a9565b601254819060ff166112665760405162461bcd60e51b815260040161087890612049565b600a54611271610894565b61127c906001611ff7565b11156112f05760405162461bcd60e51b815260206004820152603b60248201527f5468657265206973206f6e6c79203130302066726565204e465420796f75206d60448201527f69737320796f7572206c75636b2062726f2c20626520776174657200000000006064820152608401610878565b6001600160a01b03811660009081526011602052604090205460ff16156113a55760405162461bcd60e51b815260206004820152605d60248201527f596f7520616c726561647920636c61696d20612066726565206d696e7420776960448201527f746820746869732077616c6c65742c206372656174652061206e6577206f6e6560648201527f207765206b6e6f7720796f752c206675636b696e6720626f7474657273000000608482015260a401610878565b6001600160a01b0382166000908152601160205260409020805460ff19166001908117909155610ade9083906117a9565b60006001600160e01b03198216637965db0b60e01b14806106d557506301ffc9a760e01b6001600160e01b03198316146106d5565b60008160011115801561141f575060005482105b80156106d5575050600090815260046020526040902054600160e01b161590565b60008180600111611496576000548110156114965760008181526004602052604081205490600160e01b82169003611494575b80600003610fd1575060001901600081815260046020526040902054611473565b505b604051636f96cda160e11b815260040160405180910390fd5b610e1881336117c3565b6114c38282610dba565b610ade5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114fb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115498282610dba565b15610ade5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906115db9033908990889088906004016120d6565b6020604051808303816000875af1925050508015611616575060408051601f3d908101601f1916820190925261161391810190612113565b60015b611674573d808015611644576040519150601f19603f3d011682016040523d82523d6000602084013e611649565b606091505b50805160000361166c576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060816000036116b95750506040805180820190915260018152600360fc1b602082015290565b8160005b81156116e357806116cd81612130565b91506116dc9050600a83611fe3565b91506116bd565b60008167ffffffffffffffff8111156116fe576116fe611d77565b6040519080825280601f01601f191660200182016040528015611728576020820181803683370190505b5090505b841561168a5761173d600183612149565b915061174a600a8661215c565b611755906030611ff7565b60f81b81838151811061176a5761176a612170565b60200101906001600160f81b031916908160001a90535061178c600a86611fe3565b945061172c565b6000826117a08584611827565b14949350505050565b610ade828260405180602001604052806000815250611874565b6117cd8282610dba565b610ade576117e5816001600160a01b031660146118e1565b6117f08360206118e1565b604051602001611801929190612186565b60408051601f198184030181529082905262461bcd60e51b825261087891600401611c2d565b600081815b845181101561186c576118588286838151811061184b5761184b612170565b6020026020010151611a7d565b91508061186481612130565b91505061182c565b509392505050565b61187e8383611aac565b6001600160a01b0383163b15610a5f576000548281035b6118a860008683806001019450866115a6565b6118c5576040516368d2bf6b60e11b815260040160405180910390fd5b8181106118955781600054146118da57600080fd5b5050505050565b606060006118f0836002611fb6565b6118fb906002611ff7565b67ffffffffffffffff81111561191357611913611d77565b6040519080825280601f01601f19166020018201604052801561193d576020820181803683370190505b509050600360fc1b8160008151811061195857611958612170565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061198757611987612170565b60200101906001600160f81b031916908160001a90535060006119ab846002611fb6565b6119b6906001611ff7565b90505b6001811115611a2e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106119ea576119ea612170565b1a60f81b828281518110611a0057611a00612170565b60200101906001600160f81b031916908160001a90535060049490941c93611a27816121fb565b90506119b9565b508315610fd15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610878565b6000818310611a99576000828152602084905260409020610fd1565b6000838152602083905260409020610fd1565b6000805490829003611ad15760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611b8057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611b48565b5081600003611ba157604051622e076360e81b815260040160405180910390fd5b60005550505050565b6001600160e01b031981168114610e1857600080fd5b600060208284031215611bd257600080fd5b8135610fd181611baa565b60005b83811015611bf8578181015183820152602001611be0565b50506000910152565b60008151808452611c19816020860160208601611bdd565b601f01601f19169290920160200192915050565b602081526000610fd16020830184611c01565b600060208284031215611c5257600080fd5b5035919050565b80356001600160a01b0381168114611c7057600080fd5b919050565b60008060408385031215611c8857600080fd5b611c9183611c59565b946020939093013593505050565b80358015158114611c7057600080fd5b600060208284031215611cc157600080fd5b610fd182611c9f565b600080600060608486031215611cdf57600080fd5b611ce884611c59565b9250611cf660208501611c59565b9150604084013590509250925092565b60008060408385031215611d1957600080fd5b82359150611d2960208401611c59565b90509250929050565b600060208284031215611d4457600080fd5b610fd182611c59565b60008060408385031215611d6057600080fd5b611d6983611c59565b9150611d2960208401611c9f565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611da357600080fd5b611dac85611c59565b9350611dba60208601611c59565b925060408501359150606085013567ffffffffffffffff80821115611dde57600080fd5b818701915087601f830112611df257600080fd5b813581811115611e0457611e04611d77565b604051601f8201601f19908116603f01168101908382118183101715611e2c57611e2c611d77565b816040528281528a6020848701011115611e4557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080600060408486031215611e7e57600080fd5b611e8784611c59565b9250602084013567ffffffffffffffff80821115611ea457600080fd5b818601915086601f830112611eb857600080fd5b813581811115611ec757600080fd5b8760208260051b8501011115611edc57600080fd5b6020830194508093505050509250925092565b60008060408385031215611f0257600080fd5b611f0b83611c59565b9150611d2960208401611c59565b600181811c90821680611f2d57607f821691505b602082108103611f4d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f596f7520617265206e6f7420616c6c6f77656420746f20706572666f726d207460408201526c3434b99037b832b930ba34b7b760991b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176106d5576106d5611fa0565b634e487b7160e01b600052601260045260246000fd5b600082611ff257611ff2611fcd565b500490565b808201808211156106d5576106d5611fa0565b6000835161201c818460208801611bdd565b835190830190612030818360208801611bdd565b64173539b7b760d91b9101908152600501949350505050565b60208082526023908201527f43616e74206d696e74206265666f72652074686520656e64206f6620616972646040820152620726f760ec1b606082015260800190565b6020808252602a908201527f536f7272792062726f206e6f206d6f726520746f6b656e20796f75206d69737360408201526920796f7572206c75636b60b01b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061210990830184611c01565b9695505050505050565b60006020828403121561212557600080fd5b8151610fd181611baa565b60006001820161214257612142611fa0565b5060010190565b818103818111156106d5576106d5611fa0565b60008261216b5761216b611fcd565b500690565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516121be816017850160208801611bdd565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516121ef816028840160208801611bdd565b01602801949350505050565b60008161220a5761220a611fa0565b50600019019056fea264697066735822122076a306d6c9d4c7e4792cb95358d0451119e373099bc82a0d2563baf6ff5f19c264736f6c634300081100330000000000000000000000003377a47ee263188eaddc733d7ea663ddad681d840000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a04e2684db8906fd80d7be09eae6fa3d9d52c692df7bf5ca81f770489440f2dd9d00000000000000000000000000000000000000000000000000071afd498d0000000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000003780000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d533738445455657048744334786b5571534d53397837786662476162696b68416267774a546d7546754571642f000000000000000000000000000000000000000000000000000000000000000000000000000000000010436c6f6e657320456d706972652041490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044345414900000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102255760003560e01c80636c0360eb11610123578063d1b5e912116100ab578063db4bec441161006f578063db4bec44146105e1578063dd8e210314610611578063e0ec7c3614610631578063e985e9c514610661578063fa07ce1d146106aa57600080fd5b8063d1b5e91214610563578063d2223b6414610583578063d547741f14610596578063d547cfb7146105b6578063d5abeb01146105cb57600080fd5b8063a0712d68116100f2578063a0712d68146104e8578063a217fddf146104fb578063a22cb46514610510578063b88d4fde14610530578063c87b56dd1461054357600080fd5b80636c0360eb1461047e57806370a082311461049357806391d14854146104b357806395d89b41146104d357600080fd5b8063248a9ca3116101b157806342842e0e1161017557806342842e0e146103fb5780634ca64b5d1461040e5780635376f1a3146104285780636352211e146104485780636817c76c1461046857600080fd5b8063248a9ca3146103505780632eb4a7ab146103805780632f2ff15d1461039657806336568abe146103b65780633ad10ef6146103d657600080fd5b8063095ea7b3116101f8578063095ea7b3146102dd57806309a3a9c1146102f25780630e99579a1461030857806318160ddd1461032857806323b872dd1461033d57600080fd5b806301ffc9a71461022a57806306fdde031461025f578063081812fc1461028157806308346d85146102b9575b600080fd5b34801561023657600080fd5b5061024a610245366004611bc0565b6106ca565b60405190151581526020015b60405180910390f35b34801561026b57600080fd5b506102746106db565b6040516102569190611c2d565b34801561028d57600080fd5b506102a161029c366004611c40565b61076d565b6040516001600160a01b039091168152602001610256565b3480156102c557600080fd5b506102cf600a5481565b604051908152602001610256565b6102f06102eb366004611c75565b6107b1565b005b3480156102fe57600080fd5b506102cf600d5481565b34801561031457600080fd5b506102f0610323366004611caf565b610851565b34801561033457600080fd5b506102cf610894565b6102f061034b366004611cca565b6108a2565b34801561035c57600080fd5b506102cf61036b366004611c40565b60009081526008602052604090206001015490565b34801561038c57600080fd5b506102cf600e5481565b3480156103a257600080fd5b506102f06103b1366004611d06565b610a3a565b3480156103c257600080fd5b506102f06103d1366004611d06565b610a64565b3480156103e257600080fd5b506012546102a19061010090046001600160a01b031681565b6102f0610409366004611cca565b610ae2565b34801561041a57600080fd5b5060125461024a9060ff1681565b34801561043457600080fd5b506102f0610443366004611d32565b610afd565b34801561045457600080fd5b506102a1610463366004611c40565b610cd2565b34801561047457600080fd5b506102cf600c5481565b34801561048a57600080fd5b50610274610cdd565b34801561049f57600080fd5b506102cf6104ae366004611d32565b610d6b565b3480156104bf57600080fd5b5061024a6104ce366004611d06565b610dba565b3480156104df57600080fd5b50610274610de5565b6102f06104f6366004611c40565b610df4565b34801561050757600080fd5b506102cf600081565b34801561051c57600080fd5b506102f061052b366004611d4d565b610e25565b6102f061053e366004611d8d565b610e91565b34801561054f57600080fd5b5061027461055e366004611c40565b610edb565b34801561056f57600080fd5b5061024a61057e366004611e69565b610f15565b6102f0610591366004611c75565b610fd8565b3480156105a257600080fd5b506102f06105b1366004611d06565b611139565b3480156105c257600080fd5b5061027461115e565b3480156105d757600080fd5b506102cf600b5481565b3480156105ed57600080fd5b5061024a6105fc366004611d32565b60106020526000908152604090205460ff1681565b34801561061d57600080fd5b506102f061062c366004611e69565b61116d565b34801561063d57600080fd5b5061024a61064c366004611d32565b60116020526000908152604090205460ff1681565b34801561066d57600080fd5b5061024a61067c366004611eef565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156106b657600080fd5b506102f06106c5366004611d32565b611242565b60006106d5826113d6565b92915050565b6060600280546106ea90611f19565b80601f016020809104026020016040519081016040528092919081815260200182805461071690611f19565b80156107635780601f1061073857610100808354040283529160200191610763565b820191906000526020600020905b81548152906001019060200180831161074657829003601f168201915b5050505050905090565b60006107788261140b565b610795576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006107bc82610cd2565b9050336001600160a01b038216146107f5576107d8813361067c565b6107f5576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61085c600033610dba565b6108815760405162461bcd60e51b815260040161087890611f53565b60405180910390fd5b6012805460ff1916911515919091179055565b600154600054036000190190565b60006108ad82611440565b9050836001600160a01b0316816001600160a01b0316146108e05760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761092d57610910863361067c565b61092d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661095457604051633a954ecd60e21b815260040160405180910390fd5b801561095f57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036109f1576001840160008181526004602052604081205490036109ef5760005481146109ef5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b600082815260086020526040902060010154610a55816114af565b610a5f83836114b9565b505050565b6001600160a01b0381163314610ad45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610878565b610ade828261153f565b5050565b610a5f83838360405180602001604052806000815250610e91565b610b08600033610dba565b610b245760405162461bcd60e51b815260040161087890611f53565b600260095403610b765760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610878565b600260095547610bee5760405162461bcd60e51b815260206004820152603b60248201527f4e6f2066756e6420746f2077697468647261772049206b6e6f7720796f75206c60448201527f696b65206d6f6e65792062757420676f20776f726b206d6f726f6e00000000006064820152608401610878565b60125460009061010090046001600160a01b03166064610c0f476016611fb6565b610c199190611fe3565b604051600081818185875af1925050503d8060008114610c55576040519150601f19603f3d011682016040523d82523d6000602084013e610c5a565b606091505b5050905080610c6857600080fd5b6000826001600160a01b03164760405160006040518083038185875af1925050503d8060008114610cb5576040519150601f19603f3d011682016040523d82523d6000602084013e610cba565b606091505b5050905080610cc857600080fd5b5050600160095550565b60006106d582611440565b600f8054610cea90611f19565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1690611f19565b8015610d635780601f10610d3857610100808354040283529160200191610d63565b820191906000526020600020905b815481529060010190602001808311610d4657829003601f168201915b505050505081565b60006001600160a01b038216610d94576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546106ea90611f19565b600a54610dff610894565b610e0a906001611ff7565b11610e1b57610e1833611242565b50565b610e183382610fd8565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e9c8484846108a2565b6001600160a01b0383163b15610ed557610eb8848484846115a6565b610ed5576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060610ee561115e565b610eee83611692565b604051602001610eff92919061200a565b6040516020818303038152906040529050919050565b6040516bffffffffffffffffffffffff19606085901b1660208201526000908190603401604051602081830303815290604052805190602001209050610f9284848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150849050611793565b610fa0576000915050610fd1565b6001600160a01b03851660009081526010602052604090205460ff1615610fcb576000915050610fd1565b60019150505b9392505050565b601254819060ff16610ffc5760405162461bcd60e51b815260040161087890612049565b60008111801561100e5750600d548111155b6110805760405162461bcd60e51b815260206004820152603f60248201527f596f752063616e206d696e742066726f6d203120746f203520746f6b656e206e60448201527f6f74206c6573732c206e6f74206d6f72652c206c657373206973206d6f7265006064820152608401610878565b600b548161108c610894565b6110969190611ff7565b11156110b45760405162461bcd60e51b81526004016108789061208c565b80600c546110c29190611fb6565b34101561112f5760405162461bcd60e51b815260206004820152603560248201527f5765207361696420697427732070617961626c65206e6f74206672656520697460448201527409dcc80c0b8c0c0c8811551208195858da08139195605a1b6064820152608401610878565b610a5f83836117a9565b600082815260086020526040902060010154611154816114af565b610a5f838361153f565b6060600f80546106ea90611f19565b600b54611178610894565b611183906001611ff7565b11156111a15760405162461bcd60e51b81526004016108789061208c565b6111ac838383610f15565b6112115760405162461bcd60e51b815260206004820152603060248201527f41646472657373206973206e6f742077686974656c6973746564206f7220686160448201526f766520616c726561647920636c61696d60801b6064820152608401610878565b6001600160a01b0383166000908152601060205260409020805460ff19166001908117909155610a5f9084906117a9565b601254819060ff166112665760405162461bcd60e51b815260040161087890612049565b600a54611271610894565b61127c906001611ff7565b11156112f05760405162461bcd60e51b815260206004820152603b60248201527f5468657265206973206f6e6c79203130302066726565204e465420796f75206d60448201527f69737320796f7572206c75636b2062726f2c20626520776174657200000000006064820152608401610878565b6001600160a01b03811660009081526011602052604090205460ff16156113a55760405162461bcd60e51b815260206004820152605d60248201527f596f7520616c726561647920636c61696d20612066726565206d696e7420776960448201527f746820746869732077616c6c65742c206372656174652061206e6577206f6e6560648201527f207765206b6e6f7720796f752c206675636b696e6720626f7474657273000000608482015260a401610878565b6001600160a01b0382166000908152601160205260409020805460ff19166001908117909155610ade9083906117a9565b60006001600160e01b03198216637965db0b60e01b14806106d557506301ffc9a760e01b6001600160e01b03198316146106d5565b60008160011115801561141f575060005482105b80156106d5575050600090815260046020526040902054600160e01b161590565b60008180600111611496576000548110156114965760008181526004602052604081205490600160e01b82169003611494575b80600003610fd1575060001901600081815260046020526040902054611473565b505b604051636f96cda160e11b815260040160405180910390fd5b610e1881336117c3565b6114c38282610dba565b610ade5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556114fb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6115498282610dba565b15610ade5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906115db9033908990889088906004016120d6565b6020604051808303816000875af1925050508015611616575060408051601f3d908101601f1916820190925261161391810190612113565b60015b611674573d808015611644576040519150601f19603f3d011682016040523d82523d6000602084013e611649565b606091505b50805160000361166c576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060816000036116b95750506040805180820190915260018152600360fc1b602082015290565b8160005b81156116e357806116cd81612130565b91506116dc9050600a83611fe3565b91506116bd565b60008167ffffffffffffffff8111156116fe576116fe611d77565b6040519080825280601f01601f191660200182016040528015611728576020820181803683370190505b5090505b841561168a5761173d600183612149565b915061174a600a8661215c565b611755906030611ff7565b60f81b81838151811061176a5761176a612170565b60200101906001600160f81b031916908160001a90535061178c600a86611fe3565b945061172c565b6000826117a08584611827565b14949350505050565b610ade828260405180602001604052806000815250611874565b6117cd8282610dba565b610ade576117e5816001600160a01b031660146118e1565b6117f08360206118e1565b604051602001611801929190612186565b60408051601f198184030181529082905262461bcd60e51b825261087891600401611c2d565b600081815b845181101561186c576118588286838151811061184b5761184b612170565b6020026020010151611a7d565b91508061186481612130565b91505061182c565b509392505050565b61187e8383611aac565b6001600160a01b0383163b15610a5f576000548281035b6118a860008683806001019450866115a6565b6118c5576040516368d2bf6b60e11b815260040160405180910390fd5b8181106118955781600054146118da57600080fd5b5050505050565b606060006118f0836002611fb6565b6118fb906002611ff7565b67ffffffffffffffff81111561191357611913611d77565b6040519080825280601f01601f19166020018201604052801561193d576020820181803683370190505b509050600360fc1b8160008151811061195857611958612170565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061198757611987612170565b60200101906001600160f81b031916908160001a90535060006119ab846002611fb6565b6119b6906001611ff7565b90505b6001811115611a2e576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106119ea576119ea612170565b1a60f81b828281518110611a0057611a00612170565b60200101906001600160f81b031916908160001a90535060049490941c93611a27816121fb565b90506119b9565b508315610fd15760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610878565b6000818310611a99576000828152602084905260409020610fd1565b6000838152602083905260409020610fd1565b6000805490829003611ad15760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611b8057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611b48565b5081600003611ba157604051622e076360e81b815260040160405180910390fd5b60005550505050565b6001600160e01b031981168114610e1857600080fd5b600060208284031215611bd257600080fd5b8135610fd181611baa565b60005b83811015611bf8578181015183820152602001611be0565b50506000910152565b60008151808452611c19816020860160208601611bdd565b601f01601f19169290920160200192915050565b602081526000610fd16020830184611c01565b600060208284031215611c5257600080fd5b5035919050565b80356001600160a01b0381168114611c7057600080fd5b919050565b60008060408385031215611c8857600080fd5b611c9183611c59565b946020939093013593505050565b80358015158114611c7057600080fd5b600060208284031215611cc157600080fd5b610fd182611c9f565b600080600060608486031215611cdf57600080fd5b611ce884611c59565b9250611cf660208501611c59565b9150604084013590509250925092565b60008060408385031215611d1957600080fd5b82359150611d2960208401611c59565b90509250929050565b600060208284031215611d4457600080fd5b610fd182611c59565b60008060408385031215611d6057600080fd5b611d6983611c59565b9150611d2960208401611c9f565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611da357600080fd5b611dac85611c59565b9350611dba60208601611c59565b925060408501359150606085013567ffffffffffffffff80821115611dde57600080fd5b818701915087601f830112611df257600080fd5b813581811115611e0457611e04611d77565b604051601f8201601f19908116603f01168101908382118183101715611e2c57611e2c611d77565b816040528281528a6020848701011115611e4557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080600060408486031215611e7e57600080fd5b611e8784611c59565b9250602084013567ffffffffffffffff80821115611ea457600080fd5b818601915086601f830112611eb857600080fd5b813581811115611ec757600080fd5b8760208260051b8501011115611edc57600080fd5b6020830194508093505050509250925092565b60008060408385031215611f0257600080fd5b611f0b83611c59565b9150611d2960208401611c59565b600181811c90821680611f2d57607f821691505b602082108103611f4d57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f596f7520617265206e6f7420616c6c6f77656420746f20706572666f726d207460408201526c3434b99037b832b930ba34b7b760991b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176106d5576106d5611fa0565b634e487b7160e01b600052601260045260246000fd5b600082611ff257611ff2611fcd565b500490565b808201808211156106d5576106d5611fa0565b6000835161201c818460208801611bdd565b835190830190612030818360208801611bdd565b64173539b7b760d91b9101908152600501949350505050565b60208082526023908201527f43616e74206d696e74206265666f72652074686520656e64206f6620616972646040820152620726f760ec1b606082015260800190565b6020808252602a908201527f536f7272792062726f206e6f206d6f726520746f6b656e20796f75206d69737360408201526920796f7572206c75636b60b01b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061210990830184611c01565b9695505050505050565b60006020828403121561212557600080fd5b8151610fd181611baa565b60006001820161214257612142611fa0565b5060010190565b818103818111156106d5576106d5611fa0565b60008261216b5761216b611fcd565b500690565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516121be816017850160208801611bdd565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516121ef816028840160208801611bdd565b01602801949350505050565b60008161220a5761220a611fa0565b50600019019056fea264697066735822122076a306d6c9d4c7e4792cb95358d0451119e373099bc82a0d2563baf6ff5f19c264736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003377a47ee263188eaddc733d7ea663ddad681d840000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a04e2684db8906fd80d7be09eae6fa3d9d52c692df7bf5ca81f770489440f2dd9d00000000000000000000000000000000000000000000000000071afd498d0000000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000003780000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d533738445455657048744334786b5571534d53397837786662476162696b68416267774a546d7546754571642f000000000000000000000000000000000000000000000000000000000000000000000000000000000010436c6f6e657320456d706972652041490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044345414900000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _admin (address): 0x3377A47Ee263188eAddc733d7eA663DdAd681D84
Arg [1] : _baseURI (string): ipfs://QmS78DTUepHtC4xkUqSMS9x7xfbGabikhAbgwJTmuFuEqd/
Arg [2] : _tokenName (string): Clones Empire AI
Arg [3] : _tokenSymbol (string): CEAI
Arg [4] : _merkleRoot (bytes32): 0x4e2684db8906fd80d7be09eae6fa3d9d52c692df7bf5ca81f770489440f2dd9d
Arg [5] : _mintPrice (uint256): 2000000000000000
Arg [6] : _freeMintLimit (uint256): 100
Arg [7] : _maxSupply (uint256): 888
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 0000000000000000000000003377a47ee263188eaddc733d7ea663ddad681d84
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [4] : 4e2684db8906fd80d7be09eae6fa3d9d52c692df7bf5ca81f770489440f2dd9d
Arg [5] : 00000000000000000000000000000000000000000000000000071afd498d0000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000378
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [9] : 697066733a2f2f516d533738445455657048744334786b5571534d5339783778
Arg [10] : 6662476162696b68416267774a546d7546754571642f00000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [12] : 436c6f6e657320456d7069726520414900000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [14] : 4345414900000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Token Allocations
POL
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| POL | 100.00% | $0.098647 | 0.01 | $0.000986 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.