Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Initialize | 18872203 | 796 days ago | IN | 0 ETH | 0.00326068 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Drppr721
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
// Drppr v0.1.2
// ██████╗ ██████╗ ██████╗ ██████╗ ██████╗
// ██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗
// ██║ ██║██████╔╝██████╔╝██████╔╝██████╔╝
// ██║ ██║██╔══██╗██╔═══╝ ██╔═══╝ ██╔══██╗
// ██████╔╝██║ ██║██║ ██║ ██║ ██║
// ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝.io
// The easiest way to drop your collection
//
// Features:
// - Free x mints per wallet
// - First x free mints per collection (can be combined with x free per wallet)
// - Whitelist mints with personal allocation for each wallet
// - Airdrop, devmint
// - Backup mint functions for simple integration with external minters
// - External metadata renderer interface for on-chain collections
// - Updatable prices and free mint caps
// - Cuttable supply
// - Return list of tokens owned by address
// - Updatable withdraw address
pragma solidity ^0.8.23;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import "erc721a-upgradeable/contracts/ERC721A__Initializable.sol";
import "./ERC721A__OwnableUpgradeable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
// Struct that consolidates the parameters needed to initialize the contract.
struct InitParams {
string baseURI;
uint256 maxSupply;
uint256 maxFreeSupply;
uint256 costPublic;
uint256 maxMintPublic;
uint256 freePerWallet;
uint256 platformFee;
uint256 costWL;
uint256 maxMintWL;
address withdrawAddress;
address treasury;
}
// Diverts tokenURI calls to external contract if useRenderer if true
interface IRenderer {
function tokenURI(uint256 tokenId) external view returns (string memory);
}
/**
* @title A contract for creating a limited supply of ERC721 tokens with a whitelist and public minting functionality.
* @dev Inherits ERC721AInitializable, ERC721AUpgradeable and ERC721AOwnableUpgradeable.
*/
contract Drppr721 is ERC721A__Initializable, ERC721AUpgradeable, ERC721A__OwnableUpgradeable {
IRenderer public renderer; // renderer contract for external matadata serving
bool public useRenderer; // defines if an external renderer contract should be used
mapping(address => uint256) public mintedByAddress; // Mapping to keep track of the number of free tokens minted by an address
mapping(address => uint256) public mintedByAddressWL; // Mapping to keep track of the number of tokens minted by a whitelisted address
string public baseURI; // Base URI for token metadata
bool public isPublicMintEnabled; // Flag to enable or disable public minting
uint256 public maxSupply; // Maximum supply of tokens
uint256 public maxFreeSupply; // Maximum supply of free tokens
uint256 public costPublic; // Cost to mint a token for the public
uint256 public maxMintPublic; // Maximum number of tokens a user can mint
uint256 public freePerWallet; // Number of free tokens per wallet
address internal withdrawAddress; // Address where funds will be withdrawn to
address internal treasury; // Platform treasury address
uint256 internal platformFee; // Fee charged by the platform
bool public isWLmintEnabled; // Flag to enable or disable whitelist minting
uint256 public costWL; // Cost to mint a token for a whitelisted user
uint256 public maxMintWL; // Maximum amount a whitelisted user can mint
bytes32 public whitelistRoot; // Merkle root for the whitelist
/**
* @notice Initializes the contract.
* @param name - Name of the token.
* @param symbol - Symbol of the token.
* @param params - Parameters needed to initialize the contract.
* @dev Function can only be called once.
*/
function initialize(
string memory name,
string memory symbol,
InitParams memory params
) public initializerERC721A {
__ERC721A_init(name, symbol);
baseURI = params.baseURI;
maxSupply = params.maxSupply;
maxFreeSupply = params.maxFreeSupply;
costPublic = params.costPublic;
maxMintPublic = params.maxMintPublic;
freePerWallet = params.freePerWallet;
platformFee = params.platformFee;
costWL = params.costWL;
maxMintWL = params.maxMintWL;
withdrawAddress = params.withdrawAddress;
treasury = params.treasury;
__Ownable_init();
}
/**
* @notice Allows a user to mint tokens.
* @param _quantity - The number of tokens to mint.
* @dev User must send the correct amount of ether. Can only be called by a wallet (not a contract). Public minting must be enabled.
*/
function mint(uint _quantity) external payable {
require(tx.origin == msg.sender, "No contracts");
require(isPublicMintEnabled, "Not yet");
require(totalSupply() + _quantity <= maxSupply, "Too late");
require(_quantity <= maxMintPublic, "Too many");
uint256 _cost = getCost(msg.sender, _quantity);
require(msg.value >= _cost, "Insufficient Ether sent");
if (canClaim(msg.sender)) {
uint256 freeTokensLeft = freePerWallet - mintedByAddress[msg.sender];
uint256 freeTokensToMint = (_quantity < freeTokensLeft) ? _quantity : freeTokensLeft;
mintedByAddress[msg.sender] += freeTokensToMint;
}
_safeMint(msg.sender, _quantity);
}
/**
* @notice Allows a whitelisted user to mint a specified number of tokens.
* @dev Mints a specified number of tokens to the sender's address, provided they are whitelisted.
* @param _quantity The number of tokens to mint.
* @param _merkleProof The Merkle proof validating the sender's address is whitelisted.
*/
function mintWL(uint _quantity, bytes32[] calldata _merkleProof) external payable {
require(isWLmintEnabled, "Whitelist minting not enabled");
require(tx.origin == msg.sender, "No contracts");
require(isWhitelisted(msg.sender, _merkleProof, _quantity), "Not whitelisted");
require(totalSupply() + _quantity <= maxSupply, "Too late");
require(mintedByAddressWL[msg.sender] == 0, "Already claimed");
require(msg.value >= costWL * _quantity, "Insufficient Ether sent");
mintedByAddressWL[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
/**
* @dev Allows a user to mint tokens for free if they are eligible. Use for simple integration with external minters.
* @param _quantity The number of tokens to mint.
*/
function mintFree(uint _quantity) external {
require(isPublicMintEnabled, "Public minting not enabled");
require(canClaim(msg.sender), "Not eligible for free mint");
require(totalSupply() + _quantity <= maxSupply, "Max supply exceeded");
require(mintedByAddress[msg.sender] + _quantity <= freePerWallet, "Exceeds free mint limit");
mintedByAddress[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
/**
* @dev Allows a user to mint tokens by paying the specified cost. Use for simple integration with external minters.
* @param _quantity The number of tokens to mint.
*/
function mintPaid(uint _quantity) external payable {
require(isPublicMintEnabled, "Public minting not enabled");
require(totalSupply() + _quantity <= maxSupply, "Max supply exceeded");
require(msg.value >= costPublic * _quantity, "Insufficient Ether sent");
_safeMint(msg.sender, _quantity);
}
/**
* @notice Defines the starting token ID.
* @return The starting token ID.
*/
function _startTokenId() internal pure override returns (uint256) {
return 1;
}
/**
* @notice Allows the owner to airdrop tokens to a recipient.
* @param _quantity - The number of tokens to airdrop.
* @param _recipient - The address of the recipient.
* @dev Only the owner can call this function. Cannot mint more tokens than the maximum supply.
*/
function airdrop(uint256 _quantity, address _recipient) external onlyOwner {
require(totalSupply() + _quantity <= maxSupply, "Too many");
_mint(_recipient, _quantity);
}
/**
* @notice Allows the owner to mint tokens.
* @param _quantity - The number of tokens to mint.
* @dev Only the owner can call this function. Cannot mint more tokens than the maximum supply.
*/
function devMint(uint256 _quantity) external onlyOwner {
require(totalSupply() + _quantity <= maxSupply, "Too many");
_mint(msg.sender, _quantity);
}
/**
* @notice Checks if an address can claim a free token.
* @param _address - The address to check.
* @return True if the address can claim a free token, false otherwise.
*/
function canClaim(address _address) internal view returns (bool) {
return mintedByAddress[_address] < freePerWallet && totalSupply() < maxFreeSupply;
}
/**
* @notice Returns the cost to mint a number of tokens for a specific address.
* @param _address - The address that wants to mint the tokens.
* @param _count - The number of tokens to mint.
* @return The cost to mint the tokens.
*/
function getCost(address _address, uint256 _count) internal view returns (uint256) {
if (canClaim(_address)) {
uint256 freeTokensLeft = freePerWallet - mintedByAddress[_address];
uint256 maxFreeTokensAvailable = maxFreeSupply - totalSupply();
freeTokensLeft = freeTokensLeft < maxFreeTokensAvailable ? freeTokensLeft : maxFreeTokensAvailable;
uint256 paidTokens = _count > freeTokensLeft ? _count - freeTokensLeft : 0;
return paidTokens * costPublic;
}
return _count * costPublic;
}
/**
* @notice Checks if an address is whitelisted.
* @param _wallet - The address to check.
* @param _merkleProof - The Merkle proof that the address is whitelisted.
* @return True if the address is whitelisted, false otherwise.
*/
function isWhitelisted(address _wallet, bytes32[] calldata _merkleProof, uint256 _quantity) public view returns (bool) {
bytes32 leaf = keccak256(abi.encodePacked(_wallet, _quantity));
return MerkleProof.verify(_merkleProof, whitelistRoot, leaf);
}
/**
* @notice Allows the owner to set the Merkle root for the whitelist.
* @param _merkleRoot - The new Merkle root for the whitelist.
* @dev Only the owner can call this function.
*/
function setWhitelistRoot(bytes32 _merkleRoot) public onlyOwner {
whitelistRoot = _merkleRoot;
}
/**
* @notice Allows the owner to enable or disable whitelist minting.
* @dev Only the owner can call this function.
*/
function setWLmintEnabled() public onlyOwner {
isWLmintEnabled = !isWLmintEnabled;
}
/**
* @notice Allows the owner to enable or disable public minting.
* @dev Only the owner can call this function.
*/
function setPublicMintEnabled() public onlyOwner {
isPublicMintEnabled = !isPublicMintEnabled;
}
/**
* @dev Sets the base URI for computing {tokenURI}. If the base URI is set,
* it will be concatenated with the token ID and ".json" to generate the full token URI.
* This is used when not using a renderer contract for token URIs.
* @param _baseURI The new base URI to set.
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
baseURI = _baseURI;
}
/**
* @dev Sets the address of the renderer contract that provides token URI logic.
* This renderer contract is used when {useRenderer} is true.
* The renderer contract should implement the IRenderer interface.
* @param newRenderer The address of the new renderer contract.
*/
function setRenderer(address newRenderer) external onlyOwner {
renderer = IRenderer(newRenderer);
}
/**
* @dev Enables or disables the use of the renderer contract for generating token URIs.
* When set to true, the contract will use {renderer} for token URI logic.
* When set to false, it will use the base URI set via {setBaseURI}.
* @param use A boolean indicating whether to use the renderer contract for token URIs.
*/
function setUseRenderer(bool use) external onlyOwner {
useRenderer = use;
}
/**
* @notice Allows the owner to set the cost of public minting.
* @param _newCostPublic - The new cost of public minting.
* @dev Only the owner can call this function.
*/
function setCostPublic(uint256 _newCostPublic) public onlyOwner {
costPublic = _newCostPublic;
}
/**
* @notice Allows the owner to set the cost of whitelist minting.
* @param _newCostWL - The new cost of whitelist minting.
* @dev Only the owner can call this function.
*/
function setCostWL(uint256 _newCostWL) public onlyOwner {
costWL = _newCostWL;
}
/**
* @notice Allows the owner to set the maximum number of tokens that can be minted publicly at once.
* @param _newMaxMintPublic - The new maximum number of tokens that can be minted publicly at once.
* @dev Only the owner can call this function.
*/
function setMaxMintPublic(uint256 _newMaxMintPublic) public onlyOwner {
maxMintPublic = _newMaxMintPublic;
}
/**
* @notice Sets the amount of free tokens each wallet can receive
* @param _newFreePerWallet The new amount of free tokens each wallet can receive
* @dev Can only be called by the contract owner
*/
function setFreePerWallet(uint256 _newFreePerWallet) public onlyOwner {
freePerWallet = _newFreePerWallet;
}
/**
* @notice Sets the maximum supply of free tokens
* @param _maxFreeSupply The new maximum supply of free tokens
* @dev Can only be called by the contract owner
*/
function setMaxFreeSupply(uint256 _maxFreeSupply) public onlyOwner {
maxFreeSupply = _maxFreeSupply;
}
/**
* @notice Sets the withdraw address
* @param _newWithdrawAddress The new withdraw address
* @dev Can only be called by the contract owner
*/
function setWithdrawAddress(address _newWithdrawAddress) public onlyOwner {
withdrawAddress = _newWithdrawAddress;
}
/**
* @notice Allows the owner to withdraw all collected funds
* @dev Can only be called by the contract owner. The withdrawn amount is split between the platform and the withdrawal address based on the platform fee
*/
function withdrawAll() public payable onlyOwner {
uint256 balance = address(this).balance;
require(balance > 0, "No balance to withdraw");
uint256 feeAmount = (balance * platformFee) / 100;
(bool success, ) = payable(treasury).call{value: feeAmount}("");
require(success, "Failed to transfer fees");
(success, ) = payable(withdrawAddress).call{value: balance - feeAmount}("");
require(success, "Failed to transfer to withdrawal address");
}
/**
* @notice Returns the token URI for a given token. If external renderer is used, fetches tokenURI from there.
* @param _tokenId The ID of the token
* @return The full URI of the token
*/
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
require(_exists(_tokenId), "Token not found");
if (!useRenderer) {
return string(abi.encodePacked(baseURI, _toString(_tokenId), ".json"));
} else {
return renderer.tokenURI(_tokenId);
}
}
/**
* @notice Reduces the maximum supply of tokens
* @param _newMaxSupply The new maximum supply of tokens
* @dev Can only be called by the contract owner. The new maximum supply must be less than the current maximum supply and greater than or equal to the current supply
*/
function decreaseMaxSupply(uint256 _newMaxSupply) public onlyOwner {
require(_newMaxSupply < maxSupply, "Supply can only decrease");
require(_newMaxSupply >= totalSupply(), "Can't be less than current supply");
maxSupply = _newMaxSupply;
}
/**
* @notice Returns all the tokens owned by a particular address
* @param _address The address to look up
* @return An array of token IDs owned by the address
*/
function tokensOfOwner(address _address) public virtual view returns (uint256[] memory) {
uint256 _balance = balanceOf(_address);
uint256[] memory _tokens = new uint256[] (_balance);
uint256 _index;
uint256 _loopThrough = totalSupply();
for (uint256 i = 0; i < _loopThrough; i++) {
bool _exists = _exists(i);
if (_exists) {
if (ownerOf(i) == _address) { _tokens[_index] = i; _index++; }
}
else if (!_exists && _tokens[_balance - 1] == 0) { _loopThrough++; }
}
return _tokens;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Tree proofs.
*
* The tree and the proofs can be generated using our
* https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
* You will find a quickstart guide in the readme.
*
* 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.
* OpenZeppelin's JavaScript library generates merkle trees that are safe
* against this attack out of the box.
*/
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 simultaneously proven to be a part of a merkle tree defined by
* `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _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}
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _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 sibling nodes in `proof`. The reconstruction
* proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
* leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
* respectively.
*
* CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
* is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
* tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
*
* _Available since v4.7._
*/
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuilds 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 proofLen = proof.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proofLen - 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 from 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) {
require(proofPos == proofLen, "MerkleProof: invalid multiproof");
unchecked {
return hashes[totalHashes - 1];
}
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
/**
* @dev Calldata version of {processMultiProof}.
*
* CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
*
* _Available since v4.7._
*/
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
// This function rebuilds 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 proofLen = proof.length;
uint256 totalHashes = proofFlags.length;
// Check proof validity.
require(leavesLen + proofLen - 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 from 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) {
require(proofPos == proofLen, "MerkleProof: invalid multiproof");
unchecked {
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
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
import 'erc721a-upgradeable/contracts/ERC721A__Initializable.sol';
import 'erc721a-upgradeable/contracts/ERC721AUpgradeable.sol';
pragma solidity ^0.8.4;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract ERC721A__OwnableUpgradeable is ERC721A__Initializable, ERC721AUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializingERC721A {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializingERC721A {
_transferOwnership(_msgSenderERC721A());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_isOwner();
_;
}
function _isOwner() internal view {
require(owner() == _msgSenderERC721A(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*/
import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol';
abstract contract ERC721A__Initializable {
using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializerERC721A() {
// If the contract is initializing we ignore whether _initialized is set in order to support multiple
// inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
// contract may have been reentered.
require(
ERC721A__InitializableStorage.layout()._initializing
? _isConstructor()
: !ERC721A__InitializableStorage.layout()._initialized,
'ERC721A__Initializable: contract is already initialized'
);
bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing;
if (isTopLevelCall) {
ERC721A__InitializableStorage.layout()._initializing = true;
ERC721A__InitializableStorage.layout()._initialized = true;
}
_;
if (isTopLevelCall) {
ERC721A__InitializableStorage.layout()._initializing = false;
}
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} modifier, directly or indirectly.
*/
modifier onlyInitializingERC721A() {
require(
ERC721A__InitializableStorage.layout()._initializing,
'ERC721A__Initializable: contract is not initializing'
);
_;
}
/// @dev Returns true if and only if the function is running in the constructor
function _isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
assembly {
cs := extcodesize(self)
}
return cs == 0;
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721AUpgradeable.sol';
import {ERC721AStorage} from './ERC721AStorage.sol';
import './ERC721A__Initializable.sol';
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721ReceiverUpgradeable {
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 ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable {
using ERC721AStorage for ERC721AStorage.Layout;
// =============================================================
// 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;
// =============================================================
// CONSTRUCTOR
// =============================================================
function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
__ERC721A_init_unchained(name_, symbol_);
}
function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
ERC721AStorage.layout()._name = name_;
ERC721AStorage.layout()._symbol = symbol_;
ERC721AStorage.layout()._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 ERC721AStorage.layout()._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 ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._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 ERC721AStorage.layout()._currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return ERC721AStorage.layout()._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 ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return
(ERC721AStorage.layout()._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
(ERC721AStorage.layout()._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(ERC721AStorage.layout()._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 = ERC721AStorage.layout()._packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
ERC721AStorage.layout()._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 ERC721AStorage.layout()._name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return ERC721AStorage.layout()._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(ERC721AStorage.layout()._packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (ERC721AStorage.layout()._packedOwnerships[index] == 0) {
ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
if (_startTokenId() <= tokenId) {
packed = ERC721AStorage.layout()._packedOwnerships[tokenId];
// If not burned.
if (packed & _BITMASK_BURNED == 0) {
// If the data at the starting slot does not exist, start the scan.
if (packed == 0) {
if (tokenId >= ERC721AStorage.layout()._currentIndex) revert OwnerQueryForNonexistentToken();
// 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, `tokenId` will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed will be zero.
for (;;) {
unchecked {
packed = ERC721AStorage.layout()._packedOwnerships[--tokenId];
}
if (packed == 0) continue;
return packed;
}
}
// Otherwise, the data exists and is not burned. We can skip the scan.
// This is possible because we have already achieved the target condition.
// This saves 2143 gas on transfers of initialized tokens.
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. See {ERC721A-_approve}.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
*/
function approve(address to, uint256 tokenId) public payable virtual override {
_approve(to, tokenId, true);
}
/**
* @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 ERC721AStorage.layout()._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 {
ERC721AStorage.layout()._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 ERC721AStorage.layout()._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 < ERC721AStorage.layout()._currentIndex && // If within bounds,
ERC721AStorage.layout()._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)
{
ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._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.
--ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`.
++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
ERC721AStorage.layout()._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__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data)
returns (bytes4 retval) {
return retval == ERC721A__IERC721ReceiverUpgradeable(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 = ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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();
ERC721AStorage.layout()._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 = ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
ERC721AStorage.layout()._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 = ERC721AStorage.layout()._currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (index < end);
// Reentrancy protection.
if (ERC721AStorage.layout()._currentIndex != end) revert();
}
}
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
// =============================================================
// APPROVAL OPERATIONS
// =============================================================
/**
* @dev Equivalent to `_approve(to, tokenId, false)`.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_approve(to, tokenId, false);
}
/**
* @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:
*
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
bool approvalCheck
) internal virtual {
address owner = ownerOf(tokenId);
if (approvalCheck)
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
ERC721AStorage.layout()._tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
// =============================================================
// 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;`.
ERC721AStorage.layout()._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`.
ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
ERC721AStorage.layout()._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 {
ERC721AStorage.layout()._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 = ERC721AStorage.layout()._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);
ERC721AStorage.layout()._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.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
* constructor.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: setting the version to 255 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized != type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint8) {
return _initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _initializing;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This is a base storage for the initialization function for upgradeable diamond facet contracts
**/
library ERC721A__InitializableStorage {
struct Layout {
/*
* Indicates that the contract has been initialized.
*/
bool _initialized;
/*
* Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet');
function layout() internal pure returns (Layout storage l) {
bytes32 slot = STORAGE_SLOT;
assembly {
l.slot := slot
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library ERC721AStorage {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
struct Layout {
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 _currentIndex;
// The number of tokens burned.
uint256 _burnCounter;
// Token name
string _name;
// Token symbol
string _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) _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) _operatorApprovals;
}
bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A');
function layout() internal pure returns (Layout storage l) {
bytes32 slot = STORAGE_SLOT;
assembly {
l.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721AUpgradeable {
/**
* 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 (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","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":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"costPublic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"costWL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxSupply","type":"uint256"}],"name":"decreaseMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freePerWallet","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":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxFreeSupply","type":"uint256"},{"internalType":"uint256","name":"costPublic","type":"uint256"},{"internalType":"uint256","name":"maxMintPublic","type":"uint256"},{"internalType":"uint256","name":"freePerWallet","type":"uint256"},{"internalType":"uint256","name":"platformFee","type":"uint256"},{"internalType":"uint256","name":"costWL","type":"uint256"},{"internalType":"uint256","name":"maxMintWL","type":"uint256"},{"internalType":"address","name":"withdrawAddress","type":"address"},{"internalType":"address","name":"treasury","type":"address"}],"internalType":"struct InitParams","name":"params","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWLmintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFreeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPublic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintWL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mintFree","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mintPaid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintWL","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedByAddressWL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract IRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCostPublic","type":"uint256"}],"name":"setCostPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCostWL","type":"uint256"}],"name":"setCostWL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newFreePerWallet","type":"uint256"}],"name":"setFreePerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxFreeSupply","type":"uint256"}],"name":"setMaxFreeSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxMintPublic","type":"uint256"}],"name":"setMaxMintPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPublicMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRenderer","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"use","type":"bool"}],"name":"setUseRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setWLmintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setWhitelistRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newWithdrawAddress","type":"address"}],"name":"setWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useRenderer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
608060405234801561000f575f80fd5b50612f9e8061001d5f395ff3fe608060405260043610610341575f3560e01c80636c0360eb116101bd578063a4cdd719116100f2578063d0bfb81011610092578063ebcd12721161006d578063ebcd1272146108d5578063ef9b63ba146108f4578063f2fde38b14610909578063f5aa406d14610928575f80fd5b8063d0bfb8101461088e578063d5abeb01146108a1578063e985e9c5146108b6575f80fd5b8063bc63f02e116100cd578063bc63f02e14610806578063c243d4bd14610825578063c87b56dd14610850578063ced2053b1461086f575f80fd5b8063a4cdd719146107cb578063b5f83a1b146107df578063b88d4fde146107f3575f80fd5b80638da5cb5b1161015d578063a0712d6811610138578063a0712d681461075b578063a22cb4651461076e578063a371a0621461078d578063a4146733146107ac575f80fd5b80638da5cb5b1461070c57806391ff4a731461072857806395d89b4114610747575f80fd5b8063715018a611610198578063715018a6146106a55780638462151c146106b9578063853828b6146106e55780638ada6b0f146106ed575f80fd5b80636c0360eb146106535780636dc5f1ce1461066757806370a0823114610686575f80fd5b8063386bfc981161029357806355f804b3116102335780635b74efcf1161020e5780635b74efcf146105f15780636352211e1461060657806363cc11131461062557806367433f8e1461063a575f80fd5b806355f804b31461059457806356d3163d146105b35780635b28fd91146105d2575f80fd5b806342842e0e1161026e57806342842e0e1461052e578063473177651461054157806347513334146105605780635363074514610575575f80fd5b8063386bfc98146104cf5780633ab1a494146104e45780633ca63f2c14610503575f80fd5b80630c73a7bf116102fe57806323b872dd116102d957806323b872dd1461046b57806326c7f77c1461047e5780632f9a7c5814610491578063375a069a146104b0575f80fd5b80630c73a7bf1461042257806318160ddd146104375780631fa020331461044b575f80fd5b80630116bc2d1461034557806301ffc9a71461037357806306afd5921461039257806306fdde03146103b5578063081812fc146103d6578063095ea7b31461040d575b5f80fd5b348015610350575f80fd5b5060365461035e9060ff1681565b60405190151581526020015b60405180910390f35b34801561037e575f80fd5b5061035e61038d3660046125c6565b610947565b34801561039d575f80fd5b506103a760405481565b60405190815260200161036a565b3480156103c0575f80fd5b506103c9610998565b60405161036a919061262e565b3480156103e1575f80fd5b506103f56103f0366004612640565b610a31565b6040516001600160a01b03909116815260200161036a565b61042061041b36600461266d565b610a7c565b005b34801561042d575f80fd5b506103a760415481565b348015610442575f80fd5b506103a7610a8c565b348015610456575f80fd5b5060325461035e90600160a01b900460ff1681565b610420610479366004612695565b610aab565b61042061048c366004612640565b610c99565b34801561049c575f80fd5b506104206104ab366004612640565b610d84565b3480156104bb575f80fd5b506104206104ca366004612640565b610d91565b3480156104da575f80fd5b506103a760425481565b3480156104ef575f80fd5b506104206104fe3660046126ce565b610dd7565b34801561050e575f80fd5b506103a761051d3660046126ce565b60336020525f908152604090205481565b61042061053c366004612695565b610e01565b34801561054c575f80fd5b5061042061055b3660046126f6565b610e20565b34801561056b575f80fd5b506103a760385481565b348015610580575f80fd5b5061042061058f366004612640565b610e46565b34801561059f575f80fd5b506104206105ae3660046127fb565b610e53565b3480156105be575f80fd5b506104206105cd3660046126ce565b610e67565b3480156105dd575f80fd5b506104206105ec366004612640565b610e91565b3480156105fc575f80fd5b506103a7603b5481565b348015610611575f80fd5b506103f5610620366004612640565b610e9e565b348015610630575f80fd5b506103a760395481565b348015610645575f80fd5b50603f5461035e9060ff1681565b34801561065e575f80fd5b506103c9610ea8565b348015610672575f80fd5b50610420610681366004612640565b610f34565b348015610691575f80fd5b506103a76106a03660046126ce565b610f41565b3480156106b0575f80fd5b50610420610fa6565b3480156106c4575f80fd5b506106d86106d33660046126ce565b610fb9565b60405161036a919061282c565b6104206110dd565b3480156106f8575f80fd5b506032546103f5906001600160a01b031681565b348015610717575f80fd5b505f546001600160a01b03166103f5565b348015610733575f80fd5b50610420610742366004612640565b6112a4565b348015610752575f80fd5b506103c9611363565b610420610769366004612640565b61137b565b348015610779575f80fd5b5061042061078836600461286f565b611504565b348015610798575f80fd5b5061035e6107a73660046128e7565b611580565b3480156107b7575f80fd5b506104206107c6366004612640565b61160e565b3480156107d6575f80fd5b506104206117a8565b3480156107ea575f80fd5b506104206117c4565b61042061080136600461293c565b6117e0565b348015610811575f80fd5b506104206108203660046129b2565b61182a565b348015610830575f80fd5b506103a761083f3660046126ce565b60346020525f908152604090205481565b34801561085b575f80fd5b506103c961086a366004612640565b611870565b34801561087a575f80fd5b50610420610889366004612640565b61196e565b61042061089c3660046129d3565b61197b565b3480156108ac575f80fd5b506103a760375481565b3480156108c1575f80fd5b5061035e6108d0366004612a1a565b611b4d565b3480156108e0575f80fd5b506104206108ef366004612a42565b611b88565b3480156108ff575f80fd5b506103a7603a5481565b348015610914575f80fd5b506104206109233660046126ce565b611d29565b348015610933575f80fd5b50610420610942366004612640565b611d9f565b5f6301ffc9a760e01b6001600160e01b03198316148061097757506380ac58cd60e01b6001600160e01b03198316145b806109925750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606109a2611dac565b60020180546109b090612b6d565b80601f01602080910402602001604051908101604052809291908181526020018280546109dc90612b6d565b8015610a275780601f106109fe57610100808354040283529160200191610a27565b820191905f5260205f20905b815481529060010190602001808311610a0a57829003601f168201915b5050505050905090565b5f610a3b82611dd0565b610a58576040516333d1c03960e21b815260040160405180910390fd5b610a60611dac565b5f9283526006016020525060409020546001600160a01b031690565b610a8882826001611e17565b5050565b5f6001610a97611dac565b60010154610aa3611dac565b540303919050565b5f610ab582611eca565b9050836001600160a01b0316816001600160a01b031614610ae85760405162a1148160e81b815260040160405180910390fd5b5f80610af384611f71565b91509150610b188187610b033390565b6001600160a01b039081169116811491141790565b610b4357610b268633611b4d565b610b4357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610b6a57604051633a954ecd60e21b815260040160405180910390fd5b8015610b74575f82555b610b7c611dac565b6001600160a01b0387165f9081526005919091016020526040902080545f19019055610ba6611dac565b6001600160a01b0386165f8181526005929092016020526040909120805460010190554260a01b17600160e11b17610bdc611dac565b5f8681526004919091016020526040812091909155600160e11b84169003610c4f5760018401610c0a611dac565b5f82815260049190910160205260408120549003610c4d57610c2a611dac565b548114610c4d5783610c3a611dac565b5f83815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60365460ff16610cf05760405162461bcd60e51b815260206004820152601a60248201527f5075626c6963206d696e74696e67206e6f7420656e61626c656400000000000060448201526064015b60405180910390fd5b60375481610cfc610a8c565b610d069190612bb9565b1115610d4a5760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b6044820152606401610ce7565b80603954610d589190612bcc565b341015610d775760405162461bcd60e51b8152600401610ce790612be3565b610d813382611f96565b50565b610d8c611faf565b603955565b610d99611faf565b60375481610da5610a8c565b610daf9190612bb9565b1115610dcd5760405162461bcd60e51b8152600401610ce790612c1a565b610d813382612008565b610ddf611faf565b603c80546001600160a01b0319166001600160a01b0392909216919091179055565b610e1b83838360405180602001604052805f8152506117e0565b505050565b610e28611faf565b60328054911515600160a01b0260ff60a01b19909216919091179055565b610e4e611faf565b603b55565b610e5b611faf565b6035610a888282612c80565b610e6f611faf565b603280546001600160a01b0319166001600160a01b0392909216919091179055565b610e99611faf565b603855565b5f61099282611eca565b60358054610eb590612b6d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee190612b6d565b8015610f2c5780601f10610f0357610100808354040283529160200191610f2c565b820191905f5260205f20905b815481529060010190602001808311610f0f57829003601f168201915b505050505081565b610f3c611faf565b603a55565b5f6001600160a01b038216610f69576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b03610f79611dac565b6005015f846001600160a01b03166001600160a01b031681526020019081526020015f2054169050919050565b610fae611faf565b610fb75f61213c565b565b60605f610fc583610f41565b90505f816001600160401b03811115610fe057610fe061270f565b604051908082528060200260200182016040528015611009578160200160208202803683370190505b5090505f80611016610a8c565b90505f5b818110156110d2575f61102c82611dd0565b9050801561108657876001600160a01b031661104783610e9e565b6001600160a01b031603611081578185858151811061106857611068612d3b565b60209081029190910101528361107d81612d4f565b9450505b6110c9565b801580156110b657508461109b600188612d67565b815181106110ab576110ab612d3b565b60200260200101515f145b156110c957826110c581612d4f565b9350505b5060010161101a565b509195945050505050565b6110e5611faf565b478061112c5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610ce7565b5f6064603e548361113d9190612bcc565b6111479190612d7a565b603d546040519192505f916001600160a01b039091169083908381818185875af1925050503d805f8114611196576040519150601f19603f3d011682016040523d82523d5f602084013e61119b565b606091505b50509050806111ec5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f207472616e7366657220666565730000000000000000006044820152606401610ce7565b603c546001600160a01b03166112028385612d67565b6040515f81818185875af1925050503d805f811461123b576040519150601f19603f3d011682016040523d82523d5f602084013e611240565b606091505b50508091505080610e1b5760405162461bcd60e51b815260206004820152602860248201527f4661696c656420746f207472616e7366657220746f207769746864726177616c604482015267206164647265737360c01b6064820152608401610ce7565b6112ac611faf565b60375481106112fd5760405162461bcd60e51b815260206004820152601860248201527f537570706c792063616e206f6e6c7920646563726561736500000000000000006044820152606401610ce7565b611305610a8c565b81101561135e5760405162461bcd60e51b815260206004820152602160248201527f43616e2774206265206c657373207468616e2063757272656e7420737570706c6044820152607960f81b6064820152608401610ce7565b603755565b606061136d611dac565b60030180546109b090612b6d565b3233146113b95760405162461bcd60e51b815260206004820152600c60248201526b4e6f20636f6e74726163747360a01b6044820152606401610ce7565b60365460ff166113f55760405162461bcd60e51b8152602060048201526007602482015266139bdd081e595d60ca1b6044820152606401610ce7565b60375481611401610a8c565b61140b9190612bb9565b11156114445760405162461bcd60e51b8152602060048201526008602482015267546f6f206c61746560c01b6044820152606401610ce7565b603a548111156114665760405162461bcd60e51b8152600401610ce790612c1a565b5f611471338361218b565b9050803410156114935760405162461bcd60e51b8152600401610ce790612be3565b61149c33612230565b156114fa57335f90815260336020526040812054603b546114bd9190612d67565b90505f8184106114cd57816114cf565b835b335f908152603360205260408120805492935083929091906114f2908490612bb9565b909155505050505b610a883383611f96565b8061150d611dac565b335f818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6040516bffffffffffffffffffffffff19606086901b166020820152603481018290525f9081906054016040516020818303038152906040528051906020012090506116028585808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506042549150849050612267565b9150505b949350505050565b60365460ff166116605760405162461bcd60e51b815260206004820152601a60248201527f5075626c6963206d696e74696e67206e6f7420656e61626c65640000000000006044820152606401610ce7565b61166933612230565b6116b55760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656c696769626c6520666f722066726565206d696e740000000000006044820152606401610ce7565b603754816116c1610a8c565b6116cb9190612bb9565b111561170f5760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b6044820152606401610ce7565b603b54335f9081526033602052604090205461172c908390612bb9565b111561177a5760405162461bcd60e51b815260206004820152601760248201527f457863656564732066726565206d696e74206c696d69740000000000000000006044820152606401610ce7565b335f9081526033602052604081208054839290611798908490612bb9565b90915550610d8190503382611f96565b6117b0611faf565b6036805460ff19811660ff90911615179055565b6117cc611faf565b603f805460ff19811660ff90911615179055565b6117eb848484610aab565b6001600160a01b0383163b15611824576118078484848461227c565b611824576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b611832611faf565b6037548261183e610a8c565b6118489190612bb9565b11156118665760405162461bcd60e51b8152600401610ce790612c1a565b610a888183612008565b606061187b82611dd0565b6118b95760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881b9bdd08199bdd5b99608a1b6044820152606401610ce7565b603254600160a01b900460ff166118fc5760356118d583612360565b6040516020016118e6929190612d99565b6040516020818303038152906040529050919050565b60325460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd906024015f60405180830381865afa158015611942573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526109929190810190612e2c565b919050565b611976611faf565b604055565b603f5460ff166119cd5760405162461bcd60e51b815260206004820152601d60248201527f57686974656c697374206d696e74696e67206e6f7420656e61626c65640000006044820152606401610ce7565b323314611a0b5760405162461bcd60e51b815260206004820152600c60248201526b4e6f20636f6e74726163747360a01b6044820152606401610ce7565b611a1733838386611580565b611a555760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610ce7565b60375483611a61610a8c565b611a6b9190612bb9565b1115611aa45760405162461bcd60e51b8152602060048201526008602482015267546f6f206c61746560c01b6044820152606401610ce7565b335f9081526034602052604090205415611af25760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610ce7565b82604054611b009190612bcc565b341015611b1f5760405162461bcd60e51b8152600401610ce790612be3565b335f9081526034602052604081208054859290611b3d908490612bb9565b90915550610e1b90503384611f96565b5f611b56611dac565b6001600160a01b039384165f908152600791909101602090815260408083209490951682529290925250205460ff1690565b5f80516020612f4983398151915254610100900460ff16611bbb575f80516020612f498339815191525460ff1615611bbf565b303b155b611c315760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610ce7565b5f80516020612f4983398151915254610100900460ff16158015611c6b575f80516020612f49833981519152805461ffff19166101011790555b611c7584846123a3565b8151603590611c849082612c80565b50602082015160375560408083015160385560608301516039556080830151603a5560a0830151603b5560c0830151603e5560e08301519055610100820151604155610120820151603c80546001600160a01b039283166001600160a01b031991821617909155610140840151603d8054919093169116179055611d066123e0565b80156118245750505f80516020612f49833981519152805461ff00191690555050565b611d31611faf565b6001600160a01b038116611d965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ce7565b610d818161213c565b611da7611faf565b604255565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b5f81600111158015611de95750611de5611dac565b5482105b80156109925750600160e01b611dfd611dac565b5f8481526004919091016020526040902054161592915050565b5f611e2183610e9e565b90508115611e6057336001600160a01b03821614611e6057611e438133611b4d565b611e60576040516367d9dca160e11b815260040160405180910390fd5b83611e69611dac565b5f858152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551859287811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a450505050565b5f81600111611f5857611edb611dac565b5f83815260049190910160205260408120549150600160e01b82169003611f5857805f0361196957611f0b611dac565b548210611f2b57604051636f96cda160e11b815260040160405180910390fd5b611f33611dac565b5f199092015f81815260049390930160205260409092205490508015611f2b57919050565b604051636f96cda160e11b815260040160405180910390fd5b5f805f611f7c611dac565b5f9485526006016020525050604090912080549092909150565b610a88828260405180602001604052805f81525061241b565b5f546001600160a01b03163314610fb75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ce7565b5f612011611dac565b5490505f8290036120355760405163b562e8dd60e01b815260040160405180910390fd5b680100000000000000018202612049611dac565b6001600160a01b0385165f81815260059290920160205260409091208054929092019091554260a01b6001841460e11b1717612083611dac565b5f83815260049190910160205260408120919091556001600160a01b0384169083830190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461210a5780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a46001016120d4565b50815f0361212a57604051622e076360e81b815260040160405180910390fd5b80612133611dac565b5550610e1b9050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f61219583612230565b1561221c576001600160a01b0383165f90815260336020526040812054603b546121bf9190612d67565b90505f6121ca610a8c565b6038546121d79190612d67565b90508082106121e657806121e8565b815b91505f8285116121f8575f612202565b6122028386612d67565b9050603954816122129190612bcc565b9350505050610992565b6039546122299083612bcc565b9392505050565b603b546001600160a01b0382165f9081526033602052604081205490911180156109925750603854612260610a8c565b1092915050565b5f826122738584612495565b14949350505050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a02906122b0903390899088908890600401612e9d565b6020604051808303815f875af19250505080156122ea575060408051601f3d908101601f191682019092526122e791810190612ed9565b60015b612346573d808015612317576040519150601f19603f3d011682016040523d82523d5f602084013e61231c565b606091505b5080515f0361233e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611606565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806123795750819003601f19909101908152919050565b5f80516020612f4983398151915254610100900460ff166123d65760405162461bcd60e51b8152600401610ce790612ef4565b610a8882826124d7565b5f80516020612f4983398151915254610100900460ff166124135760405162461bcd60e51b8152600401610ce790612ef4565b610fb7612549565b6124258383612008565b6001600160a01b0383163b15610e1b575f61243e611dac565b5490508281035b6124575f86838060010194508661227c565b612474576040516368d2bf6b60e11b815260040160405180910390fd5b8181106124455781612484611dac565b541461248e575f80fd5b5050505050565b5f81815b84518110156124cf576124c5828683815181106124b8576124b8612d3b565b6020026020010151612585565b9150600101612499565b509392505050565b5f80516020612f4983398151915254610100900460ff1661250a5760405162461bcd60e51b8152600401610ce790612ef4565b81612513611dac565b600201906125219082612c80565b508061252b611dac565b600301906125399082612c80565b506001612544611dac565b555050565b5f80516020612f4983398151915254610100900460ff1661257c5760405162461bcd60e51b8152600401610ce790612ef4565b610fb73361213c565b5f81831061259f575f828152602084905260409020612229565b5f838152602083905260409020612229565b6001600160e01b031981168114610d81575f80fd5b5f602082840312156125d6575f80fd5b8135612229816125b1565b5f5b838110156125fb5781810151838201526020016125e3565b50505f910152565b5f815180845261261a8160208601602086016125e1565b601f01601f19169290920160200192915050565b602081525f6122296020830184612603565b5f60208284031215612650575f80fd5b5035919050565b80356001600160a01b0381168114611969575f80fd5b5f806040838503121561267e575f80fd5b61268783612657565b946020939093013593505050565b5f805f606084860312156126a7575f80fd5b6126b084612657565b92506126be60208501612657565b9150604084013590509250925092565b5f602082840312156126de575f80fd5b61222982612657565b80358015158114611969575f80fd5b5f60208284031215612706575f80fd5b612229826126e7565b634e487b7160e01b5f52604160045260245ffd5b60405161016081016001600160401b03811182821017156127465761274661270f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156127745761277461270f565b604052919050565b5f6001600160401b038211156127945761279461270f565b50601f01601f191660200190565b5f6127b46127af8461277c565b61274c565b90508281528383830111156127c7575f80fd5b828260208301375f602084830101529392505050565b5f82601f8301126127ec575f80fd5b612229838335602085016127a2565b5f6020828403121561280b575f80fd5b81356001600160401b03811115612820575f80fd5b611606848285016127dd565b602080825282518282018190525f9190848201906040850190845b8181101561286357835183529284019291840191600101612847565b50909695505050505050565b5f8060408385031215612880575f80fd5b61288983612657565b9150612897602084016126e7565b90509250929050565b5f8083601f8401126128b0575f80fd5b5081356001600160401b038111156128c6575f80fd5b6020830191508360208260051b85010111156128e0575f80fd5b9250929050565b5f805f80606085870312156128fa575f80fd5b61290385612657565b935060208501356001600160401b0381111561291d575f80fd5b612929878288016128a0565b9598909750949560400135949350505050565b5f805f806080858703121561294f575f80fd5b61295885612657565b935061296660208601612657565b92506040850135915060608501356001600160401b03811115612987575f80fd5b8501601f81018713612997575f80fd5b6129a6878235602084016127a2565b91505092959194509250565b5f80604083850312156129c3575f80fd5b8235915061289760208401612657565b5f805f604084860312156129e5575f80fd5b8335925060208401356001600160401b03811115612a01575f80fd5b612a0d868287016128a0565b9497909650939450505050565b5f8060408385031215612a2b575f80fd5b612a3483612657565b915061289760208401612657565b5f805f60608486031215612a54575f80fd5b83356001600160401b0380821115612a6a575f80fd5b612a76878388016127dd565b94506020860135915080821115612a8b575f80fd5b612a97878388016127dd565b93506040860135915080821115612aac575f80fd5b908501906101608288031215612ac0575f80fd5b612ac8612723565b823582811115612ad6575f80fd5b612ae2898286016127dd565b8252506020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100915081830135828201526101209150612b48828401612657565b828201526101409150612b5c828401612657565b828201528093505050509250925092565b600181811c90821680612b8157607f821691505b602082108103612b9f57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561099257610992612ba5565b808202811582820484141761099257610992612ba5565b60208082526017908201527f496e73756666696369656e742045746865722073656e74000000000000000000604082015260600190565b602080825260089082015267546f6f206d616e7960c01b604082015260600190565b601f821115610e1b57805f5260205f20601f840160051c81016020851015612c615750805b601f840160051c820191505b8181101561248e575f8155600101612c6d565b81516001600160401b03811115612c9957612c9961270f565b612cad81612ca78454612b6d565b84612c3c565b602080601f831160018114612ce0575f8415612cc95750858301515b5f19600386901b1c1916600185901b178555610c91565b5f85815260208120601f198616915b82811015612d0e57888601518255948401946001909101908401612cef565b5085821015612d2b57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b5f60018201612d6057612d60612ba5565b5060010190565b8181038181111561099257610992612ba5565b5f82612d9457634e487b7160e01b5f52601260045260245ffd5b500490565b5f808454612da681612b6d565b60018281168015612dbe5760018114612dd357612dff565b60ff1984168752821515830287019450612dff565b885f526020805f205f5b85811015612df65781548a820152908401908201612ddd565b50505082870194505b505050508351612e138183602088016125e1565b64173539b7b760d91b9101908152600501949350505050565b5f60208284031215612e3c575f80fd5b81516001600160401b03811115612e51575f80fd5b8201601f81018413612e61575f80fd5b8051612e6f6127af8261277c565b818152856020838501011115612e83575f80fd5b612e948260208301602086016125e1565b95945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90612ecf90830184612603565b9695505050505050565b5f60208284031215612ee9575f80fd5b8151612229816125b1565b60208082526034908201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604082015273206973206e6f7420696e697469616c697a696e6760601b60608201526080019056feee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa26469706673582212205c4664d3ec6feda0472a08fe83ef03107a0e7459a7407efdf5524c7ae31b940264736f6c63430008170033
Deployed Bytecode
0x608060405260043610610341575f3560e01c80636c0360eb116101bd578063a4cdd719116100f2578063d0bfb81011610092578063ebcd12721161006d578063ebcd1272146108d5578063ef9b63ba146108f4578063f2fde38b14610909578063f5aa406d14610928575f80fd5b8063d0bfb8101461088e578063d5abeb01146108a1578063e985e9c5146108b6575f80fd5b8063bc63f02e116100cd578063bc63f02e14610806578063c243d4bd14610825578063c87b56dd14610850578063ced2053b1461086f575f80fd5b8063a4cdd719146107cb578063b5f83a1b146107df578063b88d4fde146107f3575f80fd5b80638da5cb5b1161015d578063a0712d6811610138578063a0712d681461075b578063a22cb4651461076e578063a371a0621461078d578063a4146733146107ac575f80fd5b80638da5cb5b1461070c57806391ff4a731461072857806395d89b4114610747575f80fd5b8063715018a611610198578063715018a6146106a55780638462151c146106b9578063853828b6146106e55780638ada6b0f146106ed575f80fd5b80636c0360eb146106535780636dc5f1ce1461066757806370a0823114610686575f80fd5b8063386bfc981161029357806355f804b3116102335780635b74efcf1161020e5780635b74efcf146105f15780636352211e1461060657806363cc11131461062557806367433f8e1461063a575f80fd5b806355f804b31461059457806356d3163d146105b35780635b28fd91146105d2575f80fd5b806342842e0e1161026e57806342842e0e1461052e578063473177651461054157806347513334146105605780635363074514610575575f80fd5b8063386bfc98146104cf5780633ab1a494146104e45780633ca63f2c14610503575f80fd5b80630c73a7bf116102fe57806323b872dd116102d957806323b872dd1461046b57806326c7f77c1461047e5780632f9a7c5814610491578063375a069a146104b0575f80fd5b80630c73a7bf1461042257806318160ddd146104375780631fa020331461044b575f80fd5b80630116bc2d1461034557806301ffc9a71461037357806306afd5921461039257806306fdde03146103b5578063081812fc146103d6578063095ea7b31461040d575b5f80fd5b348015610350575f80fd5b5060365461035e9060ff1681565b60405190151581526020015b60405180910390f35b34801561037e575f80fd5b5061035e61038d3660046125c6565b610947565b34801561039d575f80fd5b506103a760405481565b60405190815260200161036a565b3480156103c0575f80fd5b506103c9610998565b60405161036a919061262e565b3480156103e1575f80fd5b506103f56103f0366004612640565b610a31565b6040516001600160a01b03909116815260200161036a565b61042061041b36600461266d565b610a7c565b005b34801561042d575f80fd5b506103a760415481565b348015610442575f80fd5b506103a7610a8c565b348015610456575f80fd5b5060325461035e90600160a01b900460ff1681565b610420610479366004612695565b610aab565b61042061048c366004612640565b610c99565b34801561049c575f80fd5b506104206104ab366004612640565b610d84565b3480156104bb575f80fd5b506104206104ca366004612640565b610d91565b3480156104da575f80fd5b506103a760425481565b3480156104ef575f80fd5b506104206104fe3660046126ce565b610dd7565b34801561050e575f80fd5b506103a761051d3660046126ce565b60336020525f908152604090205481565b61042061053c366004612695565b610e01565b34801561054c575f80fd5b5061042061055b3660046126f6565b610e20565b34801561056b575f80fd5b506103a760385481565b348015610580575f80fd5b5061042061058f366004612640565b610e46565b34801561059f575f80fd5b506104206105ae3660046127fb565b610e53565b3480156105be575f80fd5b506104206105cd3660046126ce565b610e67565b3480156105dd575f80fd5b506104206105ec366004612640565b610e91565b3480156105fc575f80fd5b506103a7603b5481565b348015610611575f80fd5b506103f5610620366004612640565b610e9e565b348015610630575f80fd5b506103a760395481565b348015610645575f80fd5b50603f5461035e9060ff1681565b34801561065e575f80fd5b506103c9610ea8565b348015610672575f80fd5b50610420610681366004612640565b610f34565b348015610691575f80fd5b506103a76106a03660046126ce565b610f41565b3480156106b0575f80fd5b50610420610fa6565b3480156106c4575f80fd5b506106d86106d33660046126ce565b610fb9565b60405161036a919061282c565b6104206110dd565b3480156106f8575f80fd5b506032546103f5906001600160a01b031681565b348015610717575f80fd5b505f546001600160a01b03166103f5565b348015610733575f80fd5b50610420610742366004612640565b6112a4565b348015610752575f80fd5b506103c9611363565b610420610769366004612640565b61137b565b348015610779575f80fd5b5061042061078836600461286f565b611504565b348015610798575f80fd5b5061035e6107a73660046128e7565b611580565b3480156107b7575f80fd5b506104206107c6366004612640565b61160e565b3480156107d6575f80fd5b506104206117a8565b3480156107ea575f80fd5b506104206117c4565b61042061080136600461293c565b6117e0565b348015610811575f80fd5b506104206108203660046129b2565b61182a565b348015610830575f80fd5b506103a761083f3660046126ce565b60346020525f908152604090205481565b34801561085b575f80fd5b506103c961086a366004612640565b611870565b34801561087a575f80fd5b50610420610889366004612640565b61196e565b61042061089c3660046129d3565b61197b565b3480156108ac575f80fd5b506103a760375481565b3480156108c1575f80fd5b5061035e6108d0366004612a1a565b611b4d565b3480156108e0575f80fd5b506104206108ef366004612a42565b611b88565b3480156108ff575f80fd5b506103a7603a5481565b348015610914575f80fd5b506104206109233660046126ce565b611d29565b348015610933575f80fd5b50610420610942366004612640565b611d9f565b5f6301ffc9a760e01b6001600160e01b03198316148061097757506380ac58cd60e01b6001600160e01b03198316145b806109925750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606109a2611dac565b60020180546109b090612b6d565b80601f01602080910402602001604051908101604052809291908181526020018280546109dc90612b6d565b8015610a275780601f106109fe57610100808354040283529160200191610a27565b820191905f5260205f20905b815481529060010190602001808311610a0a57829003601f168201915b5050505050905090565b5f610a3b82611dd0565b610a58576040516333d1c03960e21b815260040160405180910390fd5b610a60611dac565b5f9283526006016020525060409020546001600160a01b031690565b610a8882826001611e17565b5050565b5f6001610a97611dac565b60010154610aa3611dac565b540303919050565b5f610ab582611eca565b9050836001600160a01b0316816001600160a01b031614610ae85760405162a1148160e81b815260040160405180910390fd5b5f80610af384611f71565b91509150610b188187610b033390565b6001600160a01b039081169116811491141790565b610b4357610b268633611b4d565b610b4357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610b6a57604051633a954ecd60e21b815260040160405180910390fd5b8015610b74575f82555b610b7c611dac565b6001600160a01b0387165f9081526005919091016020526040902080545f19019055610ba6611dac565b6001600160a01b0386165f8181526005929092016020526040909120805460010190554260a01b17600160e11b17610bdc611dac565b5f8681526004919091016020526040812091909155600160e11b84169003610c4f5760018401610c0a611dac565b5f82815260049190910160205260408120549003610c4d57610c2a611dac565b548114610c4d5783610c3a611dac565b5f83815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60365460ff16610cf05760405162461bcd60e51b815260206004820152601a60248201527f5075626c6963206d696e74696e67206e6f7420656e61626c656400000000000060448201526064015b60405180910390fd5b60375481610cfc610a8c565b610d069190612bb9565b1115610d4a5760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b6044820152606401610ce7565b80603954610d589190612bcc565b341015610d775760405162461bcd60e51b8152600401610ce790612be3565b610d813382611f96565b50565b610d8c611faf565b603955565b610d99611faf565b60375481610da5610a8c565b610daf9190612bb9565b1115610dcd5760405162461bcd60e51b8152600401610ce790612c1a565b610d813382612008565b610ddf611faf565b603c80546001600160a01b0319166001600160a01b0392909216919091179055565b610e1b83838360405180602001604052805f8152506117e0565b505050565b610e28611faf565b60328054911515600160a01b0260ff60a01b19909216919091179055565b610e4e611faf565b603b55565b610e5b611faf565b6035610a888282612c80565b610e6f611faf565b603280546001600160a01b0319166001600160a01b0392909216919091179055565b610e99611faf565b603855565b5f61099282611eca565b60358054610eb590612b6d565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee190612b6d565b8015610f2c5780601f10610f0357610100808354040283529160200191610f2c565b820191905f5260205f20905b815481529060010190602001808311610f0f57829003601f168201915b505050505081565b610f3c611faf565b603a55565b5f6001600160a01b038216610f69576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b03610f79611dac565b6005015f846001600160a01b03166001600160a01b031681526020019081526020015f2054169050919050565b610fae611faf565b610fb75f61213c565b565b60605f610fc583610f41565b90505f816001600160401b03811115610fe057610fe061270f565b604051908082528060200260200182016040528015611009578160200160208202803683370190505b5090505f80611016610a8c565b90505f5b818110156110d2575f61102c82611dd0565b9050801561108657876001600160a01b031661104783610e9e565b6001600160a01b031603611081578185858151811061106857611068612d3b565b60209081029190910101528361107d81612d4f565b9450505b6110c9565b801580156110b657508461109b600188612d67565b815181106110ab576110ab612d3b565b60200260200101515f145b156110c957826110c581612d4f565b9350505b5060010161101a565b509195945050505050565b6110e5611faf565b478061112c5760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610ce7565b5f6064603e548361113d9190612bcc565b6111479190612d7a565b603d546040519192505f916001600160a01b039091169083908381818185875af1925050503d805f8114611196576040519150601f19603f3d011682016040523d82523d5f602084013e61119b565b606091505b50509050806111ec5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f207472616e7366657220666565730000000000000000006044820152606401610ce7565b603c546001600160a01b03166112028385612d67565b6040515f81818185875af1925050503d805f811461123b576040519150601f19603f3d011682016040523d82523d5f602084013e611240565b606091505b50508091505080610e1b5760405162461bcd60e51b815260206004820152602860248201527f4661696c656420746f207472616e7366657220746f207769746864726177616c604482015267206164647265737360c01b6064820152608401610ce7565b6112ac611faf565b60375481106112fd5760405162461bcd60e51b815260206004820152601860248201527f537570706c792063616e206f6e6c7920646563726561736500000000000000006044820152606401610ce7565b611305610a8c565b81101561135e5760405162461bcd60e51b815260206004820152602160248201527f43616e2774206265206c657373207468616e2063757272656e7420737570706c6044820152607960f81b6064820152608401610ce7565b603755565b606061136d611dac565b60030180546109b090612b6d565b3233146113b95760405162461bcd60e51b815260206004820152600c60248201526b4e6f20636f6e74726163747360a01b6044820152606401610ce7565b60365460ff166113f55760405162461bcd60e51b8152602060048201526007602482015266139bdd081e595d60ca1b6044820152606401610ce7565b60375481611401610a8c565b61140b9190612bb9565b11156114445760405162461bcd60e51b8152602060048201526008602482015267546f6f206c61746560c01b6044820152606401610ce7565b603a548111156114665760405162461bcd60e51b8152600401610ce790612c1a565b5f611471338361218b565b9050803410156114935760405162461bcd60e51b8152600401610ce790612be3565b61149c33612230565b156114fa57335f90815260336020526040812054603b546114bd9190612d67565b90505f8184106114cd57816114cf565b835b335f908152603360205260408120805492935083929091906114f2908490612bb9565b909155505050505b610a883383611f96565b8061150d611dac565b335f818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6040516bffffffffffffffffffffffff19606086901b166020820152603481018290525f9081906054016040516020818303038152906040528051906020012090506116028585808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506042549150849050612267565b9150505b949350505050565b60365460ff166116605760405162461bcd60e51b815260206004820152601a60248201527f5075626c6963206d696e74696e67206e6f7420656e61626c65640000000000006044820152606401610ce7565b61166933612230565b6116b55760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420656c696769626c6520666f722066726565206d696e740000000000006044820152606401610ce7565b603754816116c1610a8c565b6116cb9190612bb9565b111561170f5760405162461bcd60e51b815260206004820152601360248201527213585e081cdd5c1c1b1e48195e18d959591959606a1b6044820152606401610ce7565b603b54335f9081526033602052604090205461172c908390612bb9565b111561177a5760405162461bcd60e51b815260206004820152601760248201527f457863656564732066726565206d696e74206c696d69740000000000000000006044820152606401610ce7565b335f9081526033602052604081208054839290611798908490612bb9565b90915550610d8190503382611f96565b6117b0611faf565b6036805460ff19811660ff90911615179055565b6117cc611faf565b603f805460ff19811660ff90911615179055565b6117eb848484610aab565b6001600160a01b0383163b15611824576118078484848461227c565b611824576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b611832611faf565b6037548261183e610a8c565b6118489190612bb9565b11156118665760405162461bcd60e51b8152600401610ce790612c1a565b610a888183612008565b606061187b82611dd0565b6118b95760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881b9bdd08199bdd5b99608a1b6044820152606401610ce7565b603254600160a01b900460ff166118fc5760356118d583612360565b6040516020016118e6929190612d99565b6040516020818303038152906040529050919050565b60325460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd906024015f60405180830381865afa158015611942573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526109929190810190612e2c565b919050565b611976611faf565b604055565b603f5460ff166119cd5760405162461bcd60e51b815260206004820152601d60248201527f57686974656c697374206d696e74696e67206e6f7420656e61626c65640000006044820152606401610ce7565b323314611a0b5760405162461bcd60e51b815260206004820152600c60248201526b4e6f20636f6e74726163747360a01b6044820152606401610ce7565b611a1733838386611580565b611a555760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610ce7565b60375483611a61610a8c565b611a6b9190612bb9565b1115611aa45760405162461bcd60e51b8152602060048201526008602482015267546f6f206c61746560c01b6044820152606401610ce7565b335f9081526034602052604090205415611af25760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610ce7565b82604054611b009190612bcc565b341015611b1f5760405162461bcd60e51b8152600401610ce790612be3565b335f9081526034602052604081208054859290611b3d908490612bb9565b90915550610e1b90503384611f96565b5f611b56611dac565b6001600160a01b039384165f908152600791909101602090815260408083209490951682529290925250205460ff1690565b5f80516020612f4983398151915254610100900460ff16611bbb575f80516020612f498339815191525460ff1615611bbf565b303b155b611c315760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610ce7565b5f80516020612f4983398151915254610100900460ff16158015611c6b575f80516020612f49833981519152805461ffff19166101011790555b611c7584846123a3565b8151603590611c849082612c80565b50602082015160375560408083015160385560608301516039556080830151603a5560a0830151603b5560c0830151603e5560e08301519055610100820151604155610120820151603c80546001600160a01b039283166001600160a01b031991821617909155610140840151603d8054919093169116179055611d066123e0565b80156118245750505f80516020612f49833981519152805461ff00191690555050565b611d31611faf565b6001600160a01b038116611d965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ce7565b610d818161213c565b611da7611faf565b604255565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b5f81600111158015611de95750611de5611dac565b5482105b80156109925750600160e01b611dfd611dac565b5f8481526004919091016020526040902054161592915050565b5f611e2183610e9e565b90508115611e6057336001600160a01b03821614611e6057611e438133611b4d565b611e60576040516367d9dca160e11b815260040160405180910390fd5b83611e69611dac565b5f858152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551859287811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a450505050565b5f81600111611f5857611edb611dac565b5f83815260049190910160205260408120549150600160e01b82169003611f5857805f0361196957611f0b611dac565b548210611f2b57604051636f96cda160e11b815260040160405180910390fd5b611f33611dac565b5f199092015f81815260049390930160205260409092205490508015611f2b57919050565b604051636f96cda160e11b815260040160405180910390fd5b5f805f611f7c611dac565b5f9485526006016020525050604090912080549092909150565b610a88828260405180602001604052805f81525061241b565b5f546001600160a01b03163314610fb75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ce7565b5f612011611dac565b5490505f8290036120355760405163b562e8dd60e01b815260040160405180910390fd5b680100000000000000018202612049611dac565b6001600160a01b0385165f81815260059290920160205260409091208054929092019091554260a01b6001841460e11b1717612083611dac565b5f83815260049190910160205260408120919091556001600160a01b0384169083830190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461210a5780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a46001016120d4565b50815f0361212a57604051622e076360e81b815260040160405180910390fd5b80612133611dac565b5550610e1b9050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f61219583612230565b1561221c576001600160a01b0383165f90815260336020526040812054603b546121bf9190612d67565b90505f6121ca610a8c565b6038546121d79190612d67565b90508082106121e657806121e8565b815b91505f8285116121f8575f612202565b6122028386612d67565b9050603954816122129190612bcc565b9350505050610992565b6039546122299083612bcc565b9392505050565b603b546001600160a01b0382165f9081526033602052604081205490911180156109925750603854612260610a8c565b1092915050565b5f826122738584612495565b14949350505050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a02906122b0903390899088908890600401612e9d565b6020604051808303815f875af19250505080156122ea575060408051601f3d908101601f191682019092526122e791810190612ed9565b60015b612346573d808015612317576040519150601f19603f3d011682016040523d82523d5f602084013e61231c565b606091505b5080515f0361233e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611606565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806123795750819003601f19909101908152919050565b5f80516020612f4983398151915254610100900460ff166123d65760405162461bcd60e51b8152600401610ce790612ef4565b610a8882826124d7565b5f80516020612f4983398151915254610100900460ff166124135760405162461bcd60e51b8152600401610ce790612ef4565b610fb7612549565b6124258383612008565b6001600160a01b0383163b15610e1b575f61243e611dac565b5490508281035b6124575f86838060010194508661227c565b612474576040516368d2bf6b60e11b815260040160405180910390fd5b8181106124455781612484611dac565b541461248e575f80fd5b5050505050565b5f81815b84518110156124cf576124c5828683815181106124b8576124b8612d3b565b6020026020010151612585565b9150600101612499565b509392505050565b5f80516020612f4983398151915254610100900460ff1661250a5760405162461bcd60e51b8152600401610ce790612ef4565b81612513611dac565b600201906125219082612c80565b508061252b611dac565b600301906125399082612c80565b506001612544611dac565b555050565b5f80516020612f4983398151915254610100900460ff1661257c5760405162461bcd60e51b8152600401610ce790612ef4565b610fb73361213c565b5f81831061259f575f828152602084905260409020612229565b5f838152602083905260409020612229565b6001600160e01b031981168114610d81575f80fd5b5f602082840312156125d6575f80fd5b8135612229816125b1565b5f5b838110156125fb5781810151838201526020016125e3565b50505f910152565b5f815180845261261a8160208601602086016125e1565b601f01601f19169290920160200192915050565b602081525f6122296020830184612603565b5f60208284031215612650575f80fd5b5035919050565b80356001600160a01b0381168114611969575f80fd5b5f806040838503121561267e575f80fd5b61268783612657565b946020939093013593505050565b5f805f606084860312156126a7575f80fd5b6126b084612657565b92506126be60208501612657565b9150604084013590509250925092565b5f602082840312156126de575f80fd5b61222982612657565b80358015158114611969575f80fd5b5f60208284031215612706575f80fd5b612229826126e7565b634e487b7160e01b5f52604160045260245ffd5b60405161016081016001600160401b03811182821017156127465761274661270f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156127745761277461270f565b604052919050565b5f6001600160401b038211156127945761279461270f565b50601f01601f191660200190565b5f6127b46127af8461277c565b61274c565b90508281528383830111156127c7575f80fd5b828260208301375f602084830101529392505050565b5f82601f8301126127ec575f80fd5b612229838335602085016127a2565b5f6020828403121561280b575f80fd5b81356001600160401b03811115612820575f80fd5b611606848285016127dd565b602080825282518282018190525f9190848201906040850190845b8181101561286357835183529284019291840191600101612847565b50909695505050505050565b5f8060408385031215612880575f80fd5b61288983612657565b9150612897602084016126e7565b90509250929050565b5f8083601f8401126128b0575f80fd5b5081356001600160401b038111156128c6575f80fd5b6020830191508360208260051b85010111156128e0575f80fd5b9250929050565b5f805f80606085870312156128fa575f80fd5b61290385612657565b935060208501356001600160401b0381111561291d575f80fd5b612929878288016128a0565b9598909750949560400135949350505050565b5f805f806080858703121561294f575f80fd5b61295885612657565b935061296660208601612657565b92506040850135915060608501356001600160401b03811115612987575f80fd5b8501601f81018713612997575f80fd5b6129a6878235602084016127a2565b91505092959194509250565b5f80604083850312156129c3575f80fd5b8235915061289760208401612657565b5f805f604084860312156129e5575f80fd5b8335925060208401356001600160401b03811115612a01575f80fd5b612a0d868287016128a0565b9497909650939450505050565b5f8060408385031215612a2b575f80fd5b612a3483612657565b915061289760208401612657565b5f805f60608486031215612a54575f80fd5b83356001600160401b0380821115612a6a575f80fd5b612a76878388016127dd565b94506020860135915080821115612a8b575f80fd5b612a97878388016127dd565b93506040860135915080821115612aac575f80fd5b908501906101608288031215612ac0575f80fd5b612ac8612723565b823582811115612ad6575f80fd5b612ae2898286016127dd565b8252506020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100915081830135828201526101209150612b48828401612657565b828201526101409150612b5c828401612657565b828201528093505050509250925092565b600181811c90821680612b8157607f821691505b602082108103612b9f57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561099257610992612ba5565b808202811582820484141761099257610992612ba5565b60208082526017908201527f496e73756666696369656e742045746865722073656e74000000000000000000604082015260600190565b602080825260089082015267546f6f206d616e7960c01b604082015260600190565b601f821115610e1b57805f5260205f20601f840160051c81016020851015612c615750805b601f840160051c820191505b8181101561248e575f8155600101612c6d565b81516001600160401b03811115612c9957612c9961270f565b612cad81612ca78454612b6d565b84612c3c565b602080601f831160018114612ce0575f8415612cc95750858301515b5f19600386901b1c1916600185901b178555610c91565b5f85815260208120601f198616915b82811015612d0e57888601518255948401946001909101908401612cef565b5085821015612d2b57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b5f60018201612d6057612d60612ba5565b5060010190565b8181038181111561099257610992612ba5565b5f82612d9457634e487b7160e01b5f52601260045260245ffd5b500490565b5f808454612da681612b6d565b60018281168015612dbe5760018114612dd357612dff565b60ff1984168752821515830287019450612dff565b885f526020805f205f5b85811015612df65781548a820152908401908201612ddd565b50505082870194505b505050508351612e138183602088016125e1565b64173539b7b760d91b9101908152600501949350505050565b5f60208284031215612e3c575f80fd5b81516001600160401b03811115612e51575f80fd5b8201601f81018413612e61575f80fd5b8051612e6f6127af8261277c565b818152856020838501011115612e83575f80fd5b612e948260208301602086016125e1565b95945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90612ecf90830184612603565b9695505050505050565b5f60208284031215612ee9575f80fd5b8151612229816125b1565b60208082526034908201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604082015273206973206e6f7420696e697469616c697a696e6760601b60608201526080019056feee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa26469706673582212205c4664d3ec6feda0472a08fe83ef03107a0e7459a7407efdf5524c7ae31b940264736f6c63430008170033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.