Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
2,222 MARAHUYO
Holders
567
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 MARAHUYOLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BatangEthMarahuyo
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT //*********************************************************************// //*********************************************************************// // // ________ ________ _________ ________ ________ ________ _______ _________ ___ ___ // |\ __ \|\ __ \|\___ ___\\ __ \|\ ___ \|\ ____\ |\ ___ \|\___ ___\\ \|\ \ // \ \ \|\ /\ \ \|\ \|___ \ \_\ \ \|\ \ \ \\ \ \ \ \___| \ \ __/\|___ \ \_\ \ \\\ \ // \ \ __ \ \ __ \ \ \ \ \ \ __ \ \ \\ \ \ \ \ ___ \ \ \_|/__ \ \ \ \ \ __ \ // \ \ \|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \\ \ \ \ \|\ \ \ \ \_|\ \ \ \ \ \ \ \ \ \ // \ \_______\ \__\ \__\ \ \__\ \ \__\ \__\ \__\\ \__\ \_______\ \ \_______\ \ \__\ \ \__\ \__\ // \|_______|\|__|\|__| \|__| \|__|\|__|\|__| \|__|\|_______| \|_______| \|__| \|__|\|__| // // // // //*********************************************************************// //*********************************************************************// // dev: [email protected] (@CrioxIO) // git: https://github.com/criox-io // _ _ _ _ _ _ _ _ // / \ / \ / \ / \ / \ / \ / \ / \ // ( c | r | i | o | x | . | i | o ) // \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ pragma solidity ^0.8.17; import "./ERC721A/ERC721A.sol"; import "./ContractWithdrawable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; abstract contract BETHMarahuyoAbstract is ERC721A, Ownable, ReentrancyGuard, ContractWithdrawable { IERC721 Gen1Collection; IERC20 mintingToken; uint256 _batchSize = 0; uint256 _collectionSize = 0; uint256 public unitPriceBarya = 500 ether; // 500 $BARYA uint256 public unitPriceEth = 10000000000000000; // 0.010 ether uint256 public unitPriceEthPublic = 15000000000000000; // 0.015 ether // allocations uint256 public allocationEthMint; // 1300 uint256 public allocationBryMint; // 800 uint256 public allocationAdminMint; // 122 uint256 public prePublicMintGap = 3600; // 1 hour uint256 public startOfPublicMintingTime; uint256 public preRevealImageGap = 172800; uint256 public startOfRevealedTime; bytes32 public _merkleRoot; address public purgatory; mapping(address => bool) allowedAdminMinters; mapping(address => bool) prePublicMinted; mapping(address => bool) publicMinted; bool public isEthMintingEnabled = false; bool public isPaused = true; string _baseTokenURI = ""; string _hiddenMetadataUri = ""; constructor( string memory name, string memory symbol, string memory baseTokenURI, string memory hiddenMetadataUri, uint256 collectionSize, uint256 batchSize, uint256 _allocationEthMint, uint256 _allocationBryMint, uint256 _allocationAdminMint, uint256 _prePublicMintGap, bytes32 merkleRoot ) ERC721A(name, symbol, batchSize, collectionSize) { _baseTokenURI = baseTokenURI; _hiddenMetadataUri = hiddenMetadataUri; _collectionSize = collectionSize; allocationEthMint = _allocationEthMint; allocationBryMint = _allocationBryMint; allocationAdminMint = _allocationAdminMint; prePublicMintGap = _prePublicMintGap; _merkleRoot = merkleRoot; require( _collectionSize == allocationAdminMint + allocationBryMint + allocationEthMint, "Allocation size mismatch" ); allowedAdminMinters[msg.sender] = true; } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } function setBaseUri(string memory baseUri) public onlyOwner { _baseTokenURI = baseUri; } function setErc20(IERC20 token) public onlyOwner { mintingToken = token; } function setGen1(IERC721 collection) public onlyOwner { Gen1Collection = collection; } function setBaryaPrice(uint256 baryaPrice) public onlyOwner { unitPriceBarya = baryaPrice; } function setEthPrice(uint256 ethPrice) public onlyOwner { unitPriceEth = ethPrice; } function setEthPricePublic(uint256 ethPrice) public onlyOwner { unitPriceEthPublic = ethPrice; } function setPaused(bool isPausedFlag) public onlyOwner { isPaused = isPausedFlag; } function startEthMinting() public onlyOwner { isPaused = false; isEthMintingEnabled = true; startOfPublicMintingTime = block.timestamp + prePublicMintGap; startOfRevealedTime = block.timestamp + preRevealImageGap; } function setMerkleRoot(bytes32 merkleRoot) public onlyOwner { _merkleRoot = merkleRoot; } function setAdminMinter(address wallet, bool isAllowed) public onlyOwner { allowedAdminMinters[wallet] = isAllowed; } function setPurgatory(address _purgatory) public onlyOwner { purgatory = _purgatory; } function setStartOfPublicMintingTime(uint256 _startPublicMintTime) public onlyOwner { startOfPublicMintingTime = _startPublicMintTime; } function setStartOfRevealTime(uint256 _startRevealTime) public onlyOwner { startOfRevealedTime = _startRevealTime; } modifier mintPreChecks(uint256 mintAmount) { require(!isPaused, "Minting is paused"); require( _totalMinted() + mintAmount <= collectionSize, "Not enough supply" ); _; } modifier onlyAllowedAdminMinters() { require(allowedAdminMinters[msg.sender], "e-101"); _; } function toBytes32(address addr) internal pure returns (bytes32) { return bytes32(uint256(uint160(addr))); } function verifyProof(bytes32[] calldata merkleProof, address wallet) public view returns (bool) { return MerkleProof.verify(merkleProof, _merkleRoot, toBytes32(wallet)); } // mint:eth:WL function mintWhitelist(bytes32[] calldata merkleProof, uint256 amount) public payable nonReentrant { require(amount > 0, "e-102"); require(amount < 6, "e-103"); require( block.timestamp < startOfPublicMintingTime, "e-104" ); require(!prePublicMinted[msg.sender], "e-105"); require( MerkleProof.verify( merkleProof, _merkleRoot, toBytes32(msg.sender) ) == true, "e-106" ); _mintMultipleWithEth(amount, unitPriceEth); prePublicMinted[msg.sender] = true; } // mint:eth:gen1 function mintGen1Holder(uint256 amount) public payable nonReentrant { require(amount > 0, "e-102"); require(amount < 6, "e-103"); require( block.timestamp < startOfPublicMintingTime, "e-104" ); require(!prePublicMinted[msg.sender], "e-105"); require( Gen1Collection.balanceOf(msg.sender) > 0, "e-107" ); _mintMultipleWithEth(amount, unitPriceEth); prePublicMinted[msg.sender] = true; } // mint:eth:public function mintPublic(uint256 amount) public payable nonReentrant { require(amount > 0, "e-102"); require(amount < 6, "e-103"); require( block.timestamp > startOfPublicMintingTime, "e-108" ); require(!publicMinted[msg.sender], "e-109"); _mintMultipleWithEth(amount, unitPriceEthPublic); publicMinted[msg.sender] = true; } function _mintMultipleWithEth(uint256 amount, uint256 unitPrice) private mintPreChecks(amount) { require(isEthMintingEnabled, "e-110"); require(allocationEthMint >= amount, "e-111"); require( msg.value >= unitPrice * amount, "e-112" ); _safeMint(msg.sender, amount, false); allocationEthMint -= amount; } function mintMultipleWithBarya(uint256 amount) public mintPreChecks(amount) nonReentrant { require(amount > 0, "e-102"); require( block.timestamp > startOfPublicMintingTime, "e-108" ); require(allocationBryMint >= amount, "e-113"); require( mintingToken.balanceOf(msg.sender) >= unitPriceBarya * amount, "e-114" ); require( mintingToken.allowance(msg.sender, address(this)) >= unitPriceBarya * amount, "mintMultipleWithBarya: Not enough allowance" ); SafeERC20.safeTransferFrom( mintingToken, msg.sender, address(this), unitPriceBarya * amount ); _safeMint(msg.sender, amount, false); allocationBryMint -= amount; } function mintAdmin(uint256 amount) public onlyAllowedAdminMinters nonReentrant { require(amount > 0, "e-102"); require(allocationAdminMint >= amount, "e-116"); _safeMint(msg.sender, amount, false); allocationAdminMint -= amount; } function mintAdminTo(uint256 amount, address wallet) public onlyAllowedAdminMinters nonReentrant { require(allocationAdminMint >= amount, "Not enough allocation:ADMIN"); _safeMint(wallet, amount, false); allocationAdminMint -= amount; } function allocateETH2BRY(uint256 amount) public onlyOwner { require(allocationEthMint >= amount, "e-117"); allocationEthMint -= amount; allocationBryMint += amount; } function allocateBRY2ETH(uint256 amount) public onlyOwner { require(allocationBryMint >= amount, "e-118"); allocationBryMint -= amount; allocationEthMint += amount; } function tokenURI(uint256 tokenId) public view override returns (string memory) { if (block.timestamp < startOfRevealedTime) { return _hiddenMetadataUri; } else { return ERC721A.tokenURI(tokenId); } } function burn(uint256 tokenId) public { require(purgatory != address(0), "Purgatory not set"); transferFrom(msg.sender, purgatory, tokenId); } } contract BatangEthMarahuyo is BETHMarahuyoAbstract { constructor( string memory name, string memory symbol, string memory baseTokenURI, string memory hiddenMetadataUri, uint256 collectionSize, uint256 batchSize, uint256 allocationEthMint, uint256 allocationBryMint, uint256 allocationAdminMint, uint256 prePublicMintGap, bytes32 merkleRoot ) BETHMarahuyoAbstract( name, symbol, baseTokenURI, hiddenMetadataUri, collectionSize, batchSize, allocationEthMint, allocationBryMint, allocationAdminMint, prePublicMintGap, merkleRoot ) {} }
// SPDX-License-Identifier: MIT // author : k1merran.eth // mail : [email protected] pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract ContractWithdrawable is Ownable, ReentrancyGuard { // safety: withdraw ether function withdraw() public payable onlyOwner nonReentrant { (bool os, ) = payable(msg.sender).call{value: address(this).balance}(""); require(os); } // safety: withdraw ERC20 function withdrawErc20(address erc20Address) public onlyOwner nonReentrant { IERC20 erc20 = IERC20(erc20Address); erc20.approve(address(this), erc20.balanceOf(address(this))); erc20.transferFrom(address(this), msg.sender, erc20.balanceOf(address(this))); } // safety: withdraw ERC721 function withdrawErc721(address erc721Address, uint256 tokenId) public onlyOwner nonReentrant { IERC721 erc721 = IERC721(erc721Address); erc721.safeTransferFrom(address(this), msg.sender, tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 private currentIndex; uint256 public immutable collectionSize; uint256 public maxBatchSize; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) private _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev * maxBatchSize refers to how much a minter can mint at a time. * collectionSize_ refers to how many tokens are in the collection. */ constructor( string memory name_, string memory symbol_, uint256 maxBatchSize_, uint256 collectionSize_ ) { require( collectionSize_ > 0, "ERC721A: collection must have a nonzero supply" ); require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero"); _name = name_; _symbol = symbol_; maxBatchSize = maxBatchSize_; collectionSize = collectionSize_; currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 1; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalMinted(); } function currentTokenId() public view returns (uint256) { return _totalMinted(); } function getNextTokenId() public view returns (uint256) { return _totalMinted() + 1; } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { unchecked { return currentIndex - _startTokenId(); } } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { require(index < totalSupply(), "ERC721A: global index out of bounds"); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(collectionSize). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { require(index < balanceOf(owner), "ERC721A: owner index out of bounds"); uint256 numMintedSoFar = totalSupply(); uint256 tokenIdsIdx = 0; address currOwnershipAddr = address(0); for (uint256 i = 0; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } revert("ERC721A: unable to get token of owner by index"); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), "ERC721A: balance query for the zero address"); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { require( owner != address(0), "ERC721A: number minted query for the zero address" ); return uint256(_addressData[owner].numberMinted); } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } revert("ERC721A: unable to determine the owner of token"); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the baseURI and the tokenId. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); require(to != owner, "ERC721A: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721A: approve caller is not owner nor approved for all" ); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), "ERC721A: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { require(operator != _msgSender(), "ERC721A: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), "ERC721A: transfer to non ERC721Receiver implementer" ); } /** * @dev Returns whether tokenId exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (_mint), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < currentIndex; } function _safeMint(address to, uint256 quantity, bool isAdminMint) internal { _safeMint(to, quantity, isAdminMint, ""); } /** * @dev Mints quantity tokens and transfers them to to. * * Requirements: * * - there must be quantity tokens remaining unminted in the total collection. * - to cannot be the zero address. * - quantity cannot be larger than the max batch size. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bool isAdminMint, bytes memory _data ) internal { uint256 startTokenId = currentIndex; require(to != address(0), "ERC721A: mint to the zero address"); // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering. require(!_exists(startTokenId), "ERC721A: token already minted"); // For admin mints we do not want to enforce the maxBatchSize limit if (isAdminMint == false) { require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high"); } _beforeTokenTransfers(address(0), to, startTokenId, quantity); AddressData memory addressData = _addressData[to]; _addressData[to] = AddressData( addressData.balance + uint128(quantity), addressData.numberMinted + (isAdminMint ? 0 : uint128(quantity)) ); _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp)); uint256 updatedIndex = startTokenId; for (uint256 i = 0; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); require( _checkOnERC721Received(address(0), to, updatedIndex, _data), "ERC721A: transfer to non ERC721Receiver implementer" ); updatedIndex++; } currentIndex = updatedIndex; _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers tokenId from from to to. * * Requirements: * * - to cannot be the zero address. * - tokenId token must be owned by from. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || getApproved(tokenId) == _msgSender() || isApprovedForAll(prevOwnership.addr, _msgSender())); require( isApprovedOrOwner, "ERC721A: transfer caller is not owner nor approved" ); require( prevOwnership.addr == from, "ERC721A: transfer from incorrect owner" ); require(to != address(0), "ERC721A: transfer to the zero address"); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp)); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId] = TokenOwnership( prevOwnership.addr, prevOwnership.startTimestamp ); } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve to to operate on tokenId * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } uint256 public nextOwnerToExplicitlySet = 0; /** * @dev Explicitly set owners to eliminate loops in future calls of ownerOf(). */ function _setOwnersExplicit(uint256 quantity) internal { uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet; require(quantity > 0, "quantity must be nonzero"); if (currentIndex == _startTokenId()) revert('No Tokens Minted Yet'); uint256 endIndex = oldNextOwnerToSet + quantity - 1; if (endIndex > collectionSize - 1) { endIndex = collectionSize - 1; } // We know if the last one in the group exists, all in the group exist, due to serial ordering. require(_exists(endIndex), "not enough minted yet for this cleanup"); for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) { if (_ownerships[i].addr == address(0)) { TokenOwnership memory ownership = ownershipOf(i); _ownerships[i] = TokenOwnership( ownership.addr, ownership.startTimestamp ); } } nextOwnerToExplicitlySet = endIndex + 1; } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721A: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * 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. */ 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. * * 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 and to are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseTokenURI","type":"string"},{"internalType":"string","name":"hiddenMetadataUri","type":"string"},{"internalType":"uint256","name":"collectionSize","type":"uint256"},{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"uint256","name":"allocationEthMint","type":"uint256"},{"internalType":"uint256","name":"allocationBryMint","type":"uint256"},{"internalType":"uint256","name":"allocationAdminMint","type":"uint256"},{"internalType":"uint256","name":"prePublicMintGap","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateBRY2ETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocateETH2BRY","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocationAdminMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allocationBryMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allocationEthMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectionSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentTokenId","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":[],"name":"getNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isEthMintingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"mintAdminTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintGen1Holder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintMultipleWithBarya","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"prePublicMintGap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preRevealImageGap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purgatory","outputs":[{"internalType":"address","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bool","name":"isAllowed","type":"bool"}],"name":"setAdminMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"baryaPrice","type":"uint256"}],"name":"setBaryaPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"setErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ethPrice","type":"uint256"}],"name":"setEthPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ethPrice","type":"uint256"}],"name":"setEthPricePublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"collection","type":"address"}],"name":"setGen1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isPausedFlag","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_purgatory","type":"address"}],"name":"setPurgatory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startPublicMintTime","type":"uint256"}],"name":"setStartOfPublicMintingTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startRevealTime","type":"uint256"}],"name":"setStartOfRevealTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startEthMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startOfPublicMintingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startOfRevealedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unitPriceBarya","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unitPriceEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unitPriceEthPublic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"address","name":"wallet","type":"address"}],"name":"verifyProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc721Address","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawErc721","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60006008819055600d819055600e819055681b1ae4d6e2ef500000600f55662386f26fc1000060105566354a6ba7a18000601155610e106015556202a300601755601e805461ffff191661010017905560c060405260a0908152601f90620000689082620003c8565b5060408051602080820190925260008152620000859082620003c8565b503480156200009357600080fd5b506040516200413438038062004134833981016040819052620000b69162000543565b8a8a8a8a8a8a8a8a8a8a8a8a8a878960008111620001325760405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20636f6c6c656374696f6e206d757374206861766520612060448201526d6e6f6e7a65726f20737570706c7960901b60648201526084015b60405180910390fd5b60008211620001945760405162461bcd60e51b815260206004820152602760248201527f455243373231413a206d61782062617463682073697a65206d757374206265206044820152666e6f6e7a65726f60c81b606482015260840162000129565b6002620001a28582620003c8565b506003620001b18482620003c8565b50600191825560805260005550620001cb905033620002d1565b6001600a55601f620001de8a82620003c8565b506020620001ed8982620003c8565b50600e879055601285905560138490556014839055601582905560198190558462000219858562000659565b62000225919062000659565b600e5414620002775760405162461bcd60e51b815260206004820152601860248201527f416c6c6f636174696f6e2073697a65206d69736d617463680000000000000000604482015260640162000129565b6001601b6000336001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505050505050505050505050505050505050505050505062000681565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200034e57607f821691505b6020821081036200036f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003c357600081815260208120601f850160051c810160208610156200039e5750805b601f850160051c820191505b81811015620003bf57828155600101620003aa565b5050505b505050565b81516001600160401b03811115620003e457620003e462000323565b620003fc81620003f5845462000339565b8462000375565b602080601f8311600181146200043457600084156200041b5750858301515b600019600386901b1c1916600185901b178555620003bf565b600085815260208120601f198616915b82811015620004655788860151825594840194600190910190840162000444565b5085821015620004845787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f830112620004a657600080fd5b81516001600160401b0380821115620004c357620004c362000323565b604051601f8301601f19908116603f01168101908282118183101715620004ee57620004ee62000323565b816040528381526020925086838588010111156200050b57600080fd5b600091505b838210156200052f578582018301518183018401529082019062000510565b600093810190920192909252949350505050565b60008060008060008060008060008060006101608c8e0312156200056657600080fd5b8b516001600160401b038111156200057d57600080fd5b6200058b8e828f0162000494565b60208e0151909c5090506001600160401b03811115620005aa57600080fd5b620005b88e828f0162000494565b60408e0151909b5090506001600160401b03811115620005d757600080fd5b620005e58e828f0162000494565b60608e0151909a5090506001600160401b038111156200060457600080fd5b620006128e828f0162000494565b98505060808c0151965060a08c0151955060c08c0151945060e08c015193506101008c015192506101208c015191506101408c015190509295989b509295989b9093969950565b808201808211156200067b57634e487b7160e01b600052601160045260246000fd5b92915050565b608051613a89620006ab60003960008181610618015281816117d6015261273d0152613a896000f3fe6080604052600436106103c15760003560e01c806370a08231116101f2578063ab5b57b61161010d578063e16b5bd4116100a0578063ee9b80a41161006f578063ee9b80a414610ab8578063efd0cbf914610ad8578063f2fde38b14610aeb578063fd4167e314610b0b57600080fd5b8063e16b5bd414610a23578063e985e9c514610a39578063ea0f2b0314610a82578063ea1005ce14610a9857600080fd5b8063c87b56dd116100dc578063c87b56dd146109b8578063caa0f92a146109d8578063d7224ba0146109ed578063d925cb1f14610a0357600080fd5b8063ab5b57b614610939578063b187bd2614610959578063b88d4fde14610978578063c7e42b1b1461099857600080fd5b80638da5cb5b11610185578063a0dcf92811610154578063a0dcf928146108cc578063a22cb465146108ec578063a6d612f91461090c578063a8f20e581461091f57600080fd5b80638da5cb5b1461085957806394320c331461087757806395d89b4114610897578063a0bcfc7f146108ac57600080fd5b806375927916116101c157806375927916146107e35780637a405091146107f95780637c8892dc146108195780637cb647591461083957600080fd5b806370a082311461076e578063715018a61461078e57806374aed3fd146107a35780637544e492146107c357600080fd5b80633ccfd60b116102e25780634f6ccce71161027557806362b959d01161024457806362b959d0146106f85780636352211e1461071857806363a9dbef14610738578063677ab70b1461074e57600080fd5b80634f6ccce71461068357806358109373146106a3578063587f16d7146106c35780635acce80a146106e357600080fd5b806345c0f533116102b157806345c0f53314610606578063467c194c1461063a57806347bcdb131461065a57806348807ba51461067057600080fd5b80633ccfd60b146105a8578063428173b8146105b057806342842e0e146105c657806342966c68146105e657600080fd5b806318160ddd1161035a5780632d8b9ed7116103295780632d8b9ed71461053c5780632f745c591461055c5780632fc37ab21461057c57806330509ae21461059257600080fd5b806318160ddd146103c65780631f2d9f18146104f057806323b872dd146105065780632913daa01461052657600080fd5b8063081812fc11610396578063081812fc14610462578063095ea7b31461049a5780631068078f146104ba57806316c38b3c146104d057600080fd5b80629a9b7b146103c65780629f9262146103ee57806301ffc9a71461041057806306fdde0314610440575b600080fd5b3480156103d257600080fd5b50600054600019015b6040519081526020015b60405180910390f35b3480156103fa57600080fd5b5061040e610409366004613227565b610b26565b005b34801561041c57600080fd5b5061043061042b366004613256565b610b33565b60405190151581526020016103e5565b34801561044c57600080fd5b50610455610ba0565b6040516103e591906132c3565b34801561046e57600080fd5b5061048261047d366004613227565b610c32565b6040516001600160a01b0390911681526020016103e5565b3480156104a657600080fd5b5061040e6104b53660046132eb565b610cc0565b3480156104c657600080fd5b506103db60125481565b3480156104dc57600080fd5b5061040e6104eb366004613325565b610dd7565b3480156104fc57600080fd5b506103db60105481565b34801561051257600080fd5b5061040e610521366004613342565b610df9565b34801561053257600080fd5b506103db60015481565b34801561054857600080fd5b506104306105573660046133ce565b610e04565b34801561056857600080fd5b506103db6105773660046132eb565b610e59565b34801561058857600080fd5b506103db60195481565b34801561059e57600080fd5b506103db60185481565b61040e610fc8565b3480156105bc57600080fd5b506103db60175481565b3480156105d257600080fd5b5061040e6105e1366004613342565b611054565b3480156105f257600080fd5b5061040e610601366004613227565b61106f565b34801561061257600080fd5b506103db7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064657600080fd5b5061040e610655366004613424565b6110d6565b34801561066657600080fd5b506103db60145481565b61040e61067e366004613227565b611100565b34801561068f57600080fd5b506103db61069e366004613227565b6112b6565b3480156106af57600080fd5b5061040e6106be366004613441565b61131c565b3480156106cf57600080fd5b5061040e6106de366004613227565b611408565b3480156106ef57600080fd5b5061040e611415565b34801561070457600080fd5b5061040e610713366004613227565b61144d565b34801561072457600080fd5b50610482610733366004613227565b6114c2565b34801561074457600080fd5b506103db60115481565b34801561075a57600080fd5b5061040e610769366004613227565b6114d4565b34801561077a57600080fd5b506103db610789366004613424565b6115c4565b34801561079a57600080fd5b5061040e611655565b3480156107af57600080fd5b50601a54610482906001600160a01b031681565b3480156107cf57600080fd5b5061040e6107de366004613227565b611669565b3480156107ef57600080fd5b506103db60155481565b34801561080557600080fd5b5061040e6108143660046132eb565b611671565b34801561082557600080fd5b5061040e610834366004613471565b611712565b34801561084557600080fd5b5061040e610854366004613227565b611745565b34801561086557600080fd5b506009546001600160a01b0316610482565b34801561088357600080fd5b5061040e610892366004613227565b611752565b3480156108a357600080fd5b5061045561175f565b3480156108b857600080fd5b5061040e6108c736600461352a565b61176e565b3480156108d857600080fd5b5061040e6108e7366004613227565b611786565b3480156108f857600080fd5b5061040e610907366004613471565b611ade565b61040e61091a366004613572565b611ba2565b34801561092b57600080fd5b50601e546104309060ff1681565b34801561094557600080fd5b5061040e610954366004613424565b611d32565b34801561096557600080fd5b50601e5461043090610100900460ff1681565b34801561098457600080fd5b5061040e6109933660046135bd565b611d5c565b3480156109a457600080fd5b5061040e6109b3366004613424565b611d95565b3480156109c457600080fd5b506104556109d3366004613227565b611f9f565b3480156109e457600080fd5b506103db612046565b3480156109f957600080fd5b506103db60085481565b348015610a0f57600080fd5b5061040e610a1e366004613227565b612059565b348015610a2f57600080fd5b506103db60165481565b348015610a4557600080fd5b50610430610a5436600461363c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a8e57600080fd5b506103db60135481565b348015610aa457600080fd5b5061040e610ab3366004613227565b6120c6565b348015610ac457600080fd5b5061040e610ad3366004613424565b6120d3565b61040e610ae6366004613227565b6120fd565b348015610af757600080fd5b5061040e610b06366004613424565b612211565b348015610b1757600080fd5b506103db600f5481565b905090565b610b2e612287565b601055565b60006001600160e01b031982166380ac58cd60e01b1480610b6457506001600160e01b03198216635b5e139f60e01b145b80610b7f57506001600160e01b0319821663780e9d6360e01b145b80610b9a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060028054610baf9061366a565b80601f0160208091040260200160405190810160405280929190818152602001828054610bdb9061366a565b8015610c285780601f10610bfd57610100808354040283529160200191610c28565b820191906000526020600020905b815481529060010190602001808311610c0b57829003601f168201915b5050505050905090565b6000610c3d826122e1565b610ca45760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610ccb826114c2565b9050806001600160a01b0316836001600160a01b031603610d395760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610c9b565b336001600160a01b0382161480610d555750610d558133610a54565b610dc75760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610c9b565b610dd28383836122f7565b505050565b610ddf612287565b601e80549115156101000261ff0019909216919091179055565b610dd2838383612353565b6000610e4f848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506019549150506001600160a01b0385166126d7565b90505b9392505050565b6000610e64836115c4565b8210610ebd5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610c9b565b60008054600019019080805b83811015610f68576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610f1b57805192505b876001600160a01b0316836001600160a01b031603610f5557868403610f4757509350610b9a92505050565b83610f51816136ba565b9450505b5080610f60816136ba565b915050610ec9565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610c9b565b610fd0612287565b6002600a5403610ff25760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55604051600090339047908381818185875af1925050503d8060008114611039576040519150601f19603f3d011682016040523d82523d6000602084013e61103e565b606091505b505090508061104c57600080fd5b506001600a55565b610dd283838360405180602001604052806000815250611d5c565b601a546001600160a01b03166110bb5760405162461bcd60e51b8152602060048201526011602482015270141d5c99d85d1bdc9e481b9bdd081cd95d607a1b6044820152606401610c9b565b601a546110d39033906001600160a01b031683610df9565b50565b6110de612287565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6002600a54036111225760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55806111445760405162461bcd60e51b8152600401610c9b9061370a565b600681106111645760405162461bcd60e51b8152600401610c9b90613729565b601654421061119d5760405162461bcd60e51b8152602060048201526005602482015264194b4c4c0d60da1b6044820152606401610c9b565b336000908152601c602052604090205460ff16156111e55760405162461bcd60e51b8152602060048201526005602482015264652d31303560d81b6044820152606401610c9b565b600b546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112529190613748565b116112875760405162461bcd60e51b8152602060048201526005602482015264652d31303760d81b6044820152606401610c9b565b611293816010546126ed565b50336000908152601c60205260409020805460ff19166001908117909155600a55565b600080546000190182106113185760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610c9b565b5090565b336000908152601b602052604090205460ff166113635760405162461bcd60e51b8152602060048201526005602482015264652d31303160d81b6044820152606401610c9b565b6002600a54036113855760405162461bcd60e51b8152600401610c9b906136d3565b6002600a556014548211156113dc5760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820616c6c6f636174696f6e3a41444d494e00000000006044820152606401610c9b565b6113e881836000612893565b81601460008282546113fa9190613761565b90915550506001600a555050565b611410612287565b601155565b61141d612287565b601e805461ffff191660011790556015546114389042613774565b6016556017546114489042613774565b601855565b611455612287565b80601254101561148f5760405162461bcd60e51b8152602060048201526005602482015264652d31313760d81b6044820152606401610c9b565b80601260008282546114a19190613761565b9250508190555080601360008282546114ba9190613774565b909155505050565b60006114cd826128ae565b5192915050565b336000908152601b602052604090205460ff1661151b5760405162461bcd60e51b8152602060048201526005602482015264652d31303160d81b6044820152606401610c9b565b6002600a540361153d5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a558061155f5760405162461bcd60e51b8152600401610c9b9061370a565b8060145410156115995760405162461bcd60e51b8152602060048201526005602482015264329698989b60d91b6044820152606401610c9b565b6115a533826000612893565b80601460008282546115b79190613761565b90915550506001600a5550565b60006001600160a01b0382166116305760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610c9b565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b61165d612287565b61166760006129dc565b565b611448612287565b611679612287565b6002600a540361169b5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55604051632142170760e11b81523060048201523360248201526044810182905282906001600160a01b038216906342842e0e90606401600060405180830381600087803b1580156116f057600080fd5b505af1158015611704573d6000803e3d6000fd5b50506001600a555050505050565b61171a612287565b6001600160a01b03919091166000908152601b60205260409020805460ff1916911515919091179055565b61174d612287565b601955565b61175a612287565b600f55565b606060038054610baf9061366a565b611776612287565b601f61178282826137cd565b5050565b601e548190610100900460ff16156117d45760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc81c185d5cd959607a1b6044820152606401610c9b565b7f0000000000000000000000000000000000000000000000000000000000000000816118036000546000190190565b61180d9190613774565b111561184f5760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610c9b565b6002600a54036118715760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55816118935760405162461bcd60e51b8152600401610c9b9061370a565b60165442116118cc5760405162461bcd60e51b81526020600482015260056024820152640ca5a6260760db1b6044820152606401610c9b565b8160135410156119065760405162461bcd60e51b8152602060048201526005602482015264652d31313360d81b6044820152606401610c9b565b81600f54611914919061388c565b600c546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119809190613748565b10156119b65760405162461bcd60e51b8152602060048201526005602482015264194b4c4c4d60da1b6044820152606401610c9b565b81600f546119c4919061388c565b600c54604051636eb1769f60e11b81523360048201523060248201526001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a369190613748565b1015611a985760405162461bcd60e51b815260206004820152602b60248201527f6d696e744d756c7469706c655769746842617279613a204e6f7420656e6f756760448201526a6820616c6c6f77616e636560a81b6064820152608401610c9b565b600c54600f54611ac0916001600160a01b03169033903090611abb90879061388c565b612a2e565b611acc33836000612893565b81601360008282546113fa9190613761565b336001600160a01b03831603611b365760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610c9b565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6002600a5403611bc45760405162461bcd60e51b8152600401610c9b906136d3565b6002600a5580611be65760405162461bcd60e51b8152600401610c9b9061370a565b60068110611c065760405162461bcd60e51b8152600401610c9b90613729565b6016544210611c3f5760405162461bcd60e51b8152602060048201526005602482015264194b4c4c0d60da1b6044820152606401610c9b565b336000908152601c602052604090205460ff1615611c875760405162461bcd60e51b8152602060048201526005602482015264652d31303560d81b6044820152606401610c9b565b611cc88383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060195491503390506126d7565b1515600114611d015760405162461bcd60e51b8152602060048201526005602482015264329698981b60d91b6044820152606401610c9b565b611d0d816010546126ed565b5050336000908152601c60205260409020805460ff19166001908117909155600a5550565b611d3a612287565b601a80546001600160a01b0319166001600160a01b0392909216919091179055565b611d67848484612353565b611d7384848484612a88565b611d8f5760405162461bcd60e51b8152600401610c9b906138a3565b50505050565b611d9d612287565b6002600a5403611dbf5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a556040516370a0823160e01b8152306004820181905282916001600160a01b0383169163095ea7b39183906370a0823190602401602060405180830381865afa158015611e14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e389190613748565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611e83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea791906138f6565b506040516370a0823160e01b815230600482018190526001600160a01b038316916323b872dd9190339084906370a0823190602401602060405180830381865afa158015611ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1d9190613748565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9591906138f6565b50506001600a5550565b606060185442101561203d5760208054611fb89061366a565b80601f0160208091040260200160405190810160405280929190818152602001828054611fe49061366a565b80156120315780601f1061200657610100808354040283529160200191612031565b820191906000526020600020905b81548152906001019060200180831161201457829003601f168201915b50505050509050919050565b610b9a82612b8a565b6000805460001901610b21906001613774565b612061612287565b80601354101561209b5760405162461bcd60e51b81526020600482015260056024820152640ca5a6262760db1b6044820152606401610c9b565b80601360008282546120ad9190613761565b9250508190555080601260008282546114ba9190613774565b6120ce612287565b601655565b6120db612287565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6002600a540361211f5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55806121415760405162461bcd60e51b8152600401610c9b9061370a565b600681106121615760405162461bcd60e51b8152600401610c9b90613729565b601654421161219a5760405162461bcd60e51b81526020600482015260056024820152640ca5a6260760db1b6044820152606401610c9b565b336000908152601d602052604090205460ff16156121e25760405162461bcd60e51b8152602060048201526005602482015264652d31303960d81b6044820152606401610c9b565b6121ee816011546126ed565b50336000908152601d60205260409020805460ff19166001908117909155600a55565b612219612287565b6001600160a01b03811661227e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c9b565b6110d3816129dc565b6009546001600160a01b031633146116675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9b565b600081600111158015610b9a5750506000541190565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061235e826128ae565b80519091506000906001600160a01b0316336001600160a01b0316148061239557503361238a84610c32565b6001600160a01b0316145b806123a7575081516123a79033610a54565b9050806124115760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610c9b565b846001600160a01b031682600001516001600160a01b0316146124855760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610c9b565b6001600160a01b0384166124e95760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c9b565b6124f960008484600001516122f7565b6001600160a01b038516600090815260056020526040812080546001929061252b9084906001600160801b0316613913565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b038616600090815260056020526040812080546001945090926125779185911661393a565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b031990911691909216171790556125fe846001613774565b6000818152600460205260409020549091506001600160a01b031661268d57612626816122e1565b1561268d5760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6000826126e48584612be7565b14949350505050565b601e548290610100900460ff161561273b5760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc81c185d5cd959607a1b6044820152606401610c9b565b7f00000000000000000000000000000000000000000000000000000000000000008161276a6000546000190190565b6127749190613774565b11156127b65760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610c9b565b601e5460ff166127f05760405162461bcd60e51b81526020600482015260056024820152640652d3131360dc1b6044820152606401610c9b565b82601254101561282a5760405162461bcd60e51b8152602060048201526005602482015264652d31313160d81b6044820152606401610c9b565b612834838361388c565b34101561286b5760405162461bcd60e51b8152602060048201526005602482015264329698989960d91b6044820152606401610c9b565b61287733846000612893565b82601260008282546128899190613761565b9091555050505050565b610dd283838360405180602001604052806000815250612c34565b604080518082019091526000808252602082015281806001111580156128d5575060005481105b1561297c576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612926579392505050565b50600019016000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612977579392505050565b612926565b60405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610c9b565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d8f908590612f06565b60006001600160a01b0384163b15612b7e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612acc90339089908890889060040161395a565b6020604051808303816000875af1925050508015612b07575060408051601f3d908101601f19168201909252612b0491810190613997565b60015b612b64573d808015612b35576040519150601f19603f3d011682016040523d82523d6000602084013e612b3a565b606091505b508051600003612b5c5760405162461bcd60e51b8152600401610c9b906138a3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b82565b5060015b949350505050565b60606000612b96612fd8565b90506000815111612bb65760405180602001604052806000815250610e52565b80612bc084612fe7565b604051602001612bd19291906139b4565b6040516020818303038152906040529392505050565b600081815b8451811015612c2c57612c1882868381518110612c0b57612c0b6139e3565b60200260200101516130e7565b915080612c24816136ba565b915050612bec565b509392505050565b6000546001600160a01b038516612c975760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c9b565b612ca0816122e1565b15612ced5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610c9b565b821515600003612d5457600154841115612d545760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610c9b565b6001600160a01b0385166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b9091041691810191909152815180830190925280519091908190612db090889061393a565b6001600160801b0316815260200185612dc95786612dcc565b60005b8360200151612ddb919061393a565b6001600160801b039081169091526001600160a01b0380891660008181526005602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b86811015612efa5760405182906001600160a01b038a16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612ebe6000898488612a88565b612eda5760405162461bcd60e51b8152600401610c9b906138a3565b81612ee4816136ba565b9250508080612ef2906136ba565b915050612e71565b50600055505050505050565b6000612f5b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166131139092919063ffffffff16565b805190915015610dd25780806020019051810190612f7991906138f6565b610dd25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c9b565b6060601f8054610baf9061366a565b60608160000361300e5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156130385780613022816136ba565b91506130319050600a83613a0f565b9150613012565b6000816001600160401b038111156130525761305261349f565b6040519080825280601f01601f19166020018201604052801561307c576020820181803683370190505b5090505b8415612b8257613091600183613761565b915061309e600a86613a23565b6130a9906030613774565b60f81b8183815181106130be576130be6139e3565b60200101906001600160f81b031916908160001a9053506130e0600a86613a0f565b9450613080565b6000818310613103576000828152602084905260409020610e52565b5060009182526020526040902090565b6060610e4f8484600085856001600160a01b0385163b6131755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c9b565b600080866001600160a01b031685876040516131919190613a37565b60006040518083038185875af1925050503d80600081146131ce576040519150601f19603f3d011682016040523d82523d6000602084013e6131d3565b606091505b50915091506131e38282866131ee565b979650505050505050565b606083156131fd575081610e52565b82511561320d5782518084602001fd5b8160405162461bcd60e51b8152600401610c9b91906132c3565b60006020828403121561323957600080fd5b5035919050565b6001600160e01b0319811681146110d357600080fd5b60006020828403121561326857600080fd5b8135610e5281613240565b60005b8381101561328e578181015183820152602001613276565b50506000910152565b600081518084526132af816020860160208601613273565b601f01601f19169290920160200192915050565b602081526000610e526020830184613297565b6001600160a01b03811681146110d357600080fd5b600080604083850312156132fe57600080fd5b8235613309816132d6565b946020939093013593505050565b80151581146110d357600080fd5b60006020828403121561333757600080fd5b8135610e5281613317565b60008060006060848603121561335757600080fd5b8335613362816132d6565b92506020840135613372816132d6565b929592945050506040919091013590565b60008083601f84011261339557600080fd5b5081356001600160401b038111156133ac57600080fd5b6020830191508360208260051b85010111156133c757600080fd5b9250929050565b6000806000604084860312156133e357600080fd5b83356001600160401b038111156133f957600080fd5b61340586828701613383565b9094509250506020840135613419816132d6565b809150509250925092565b60006020828403121561343657600080fd5b8135610e52816132d6565b6000806040838503121561345457600080fd5b823591506020830135613466816132d6565b809150509250929050565b6000806040838503121561348457600080fd5b823561348f816132d6565b9150602083013561346681613317565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156134cf576134cf61349f565b604051601f8501601f19908116603f011681019082821181831017156134f7576134f761349f565b8160405280935085815286868601111561351057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561353c57600080fd5b81356001600160401b0381111561355257600080fd5b8201601f8101841361356357600080fd5b612b82848235602084016134b5565b60008060006040848603121561358757600080fd5b83356001600160401b0381111561359d57600080fd5b6135a986828701613383565b909790965060209590950135949350505050565b600080600080608085870312156135d357600080fd5b84356135de816132d6565b935060208501356135ee816132d6565b92506040850135915060608501356001600160401b0381111561361057600080fd5b8501601f8101871361362157600080fd5b613630878235602084016134b5565b91505092959194509250565b6000806040838503121561364f57600080fd5b823561365a816132d6565b91506020830135613466816132d6565b600181811c9082168061367e57607f821691505b60208210810361369e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600182016136cc576136cc6136a4565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260059082015264329698981960d91b604082015260600190565b602080825260059082015264652d31303360d81b604082015260600190565b60006020828403121561375a57600080fd5b5051919050565b81810381811115610b9a57610b9a6136a4565b80820180821115610b9a57610b9a6136a4565b601f821115610dd257600081815260208120601f850160051c810160208610156137ae5750805b601f850160051c820191505b818110156126cf578281556001016137ba565b81516001600160401b038111156137e6576137e661349f565b6137fa816137f4845461366a565b84613787565b602080601f83116001811461382f57600084156138175750858301515b600019600386901b1c1916600185901b1785556126cf565b600085815260208120601f198616915b8281101561385e5788860151825594840194600190910190840161383f565b508582101561387c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082028115828204841417610b9a57610b9a6136a4565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b60006020828403121561390857600080fd5b8151610e5281613317565b6001600160801b03828116828216039080821115613933576139336136a4565b5092915050565b6001600160801b03818116838216019080821115613933576139336136a4565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061398d90830184613297565b9695505050505050565b6000602082840312156139a957600080fd5b8151610e5281613240565b600083516139c6818460208801613273565b8351908301906139da818360208801613273565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082613a1e57613a1e6139f9565b500490565b600082613a3257613a326139f9565b500690565b60008251613a49818460208701613273565b919091019291505056fea2646970667358221220700d8d81785fe237b77b92f6671ebef86d209d6ef66ffb83d9d6c55b3e47970f64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000008ae00000000000000000000000000000000000000000000000000000000000008ae00000000000000000000000000000000000000000000000000000000000005140000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000007a0000000000000000000000000000000000000000000000000000000000000e1048d22f5c23c86b26b60badbdd19bad148716e9c32340309268583e8740cba403000000000000000000000000000000000000000000000000000000000000001a424154414e4720455448455245554d20284d4152414855594f2900000000000000000000000000000000000000000000000000000000000000000000000000084d4152414855594f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f6d6172616875796f2d6170692e626174616e67657468657265756d2e78797a2f6d657461646174612f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f6d6172616875796f2d6170692e626174616e67657468657265756d2e78797a2f68696464656e000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103c15760003560e01c806370a08231116101f2578063ab5b57b61161010d578063e16b5bd4116100a0578063ee9b80a41161006f578063ee9b80a414610ab8578063efd0cbf914610ad8578063f2fde38b14610aeb578063fd4167e314610b0b57600080fd5b8063e16b5bd414610a23578063e985e9c514610a39578063ea0f2b0314610a82578063ea1005ce14610a9857600080fd5b8063c87b56dd116100dc578063c87b56dd146109b8578063caa0f92a146109d8578063d7224ba0146109ed578063d925cb1f14610a0357600080fd5b8063ab5b57b614610939578063b187bd2614610959578063b88d4fde14610978578063c7e42b1b1461099857600080fd5b80638da5cb5b11610185578063a0dcf92811610154578063a0dcf928146108cc578063a22cb465146108ec578063a6d612f91461090c578063a8f20e581461091f57600080fd5b80638da5cb5b1461085957806394320c331461087757806395d89b4114610897578063a0bcfc7f146108ac57600080fd5b806375927916116101c157806375927916146107e35780637a405091146107f95780637c8892dc146108195780637cb647591461083957600080fd5b806370a082311461076e578063715018a61461078e57806374aed3fd146107a35780637544e492146107c357600080fd5b80633ccfd60b116102e25780634f6ccce71161027557806362b959d01161024457806362b959d0146106f85780636352211e1461071857806363a9dbef14610738578063677ab70b1461074e57600080fd5b80634f6ccce71461068357806358109373146106a3578063587f16d7146106c35780635acce80a146106e357600080fd5b806345c0f533116102b157806345c0f53314610606578063467c194c1461063a57806347bcdb131461065a57806348807ba51461067057600080fd5b80633ccfd60b146105a8578063428173b8146105b057806342842e0e146105c657806342966c68146105e657600080fd5b806318160ddd1161035a5780632d8b9ed7116103295780632d8b9ed71461053c5780632f745c591461055c5780632fc37ab21461057c57806330509ae21461059257600080fd5b806318160ddd146103c65780631f2d9f18146104f057806323b872dd146105065780632913daa01461052657600080fd5b8063081812fc11610396578063081812fc14610462578063095ea7b31461049a5780631068078f146104ba57806316c38b3c146104d057600080fd5b80629a9b7b146103c65780629f9262146103ee57806301ffc9a71461041057806306fdde0314610440575b600080fd5b3480156103d257600080fd5b50600054600019015b6040519081526020015b60405180910390f35b3480156103fa57600080fd5b5061040e610409366004613227565b610b26565b005b34801561041c57600080fd5b5061043061042b366004613256565b610b33565b60405190151581526020016103e5565b34801561044c57600080fd5b50610455610ba0565b6040516103e591906132c3565b34801561046e57600080fd5b5061048261047d366004613227565b610c32565b6040516001600160a01b0390911681526020016103e5565b3480156104a657600080fd5b5061040e6104b53660046132eb565b610cc0565b3480156104c657600080fd5b506103db60125481565b3480156104dc57600080fd5b5061040e6104eb366004613325565b610dd7565b3480156104fc57600080fd5b506103db60105481565b34801561051257600080fd5b5061040e610521366004613342565b610df9565b34801561053257600080fd5b506103db60015481565b34801561054857600080fd5b506104306105573660046133ce565b610e04565b34801561056857600080fd5b506103db6105773660046132eb565b610e59565b34801561058857600080fd5b506103db60195481565b34801561059e57600080fd5b506103db60185481565b61040e610fc8565b3480156105bc57600080fd5b506103db60175481565b3480156105d257600080fd5b5061040e6105e1366004613342565b611054565b3480156105f257600080fd5b5061040e610601366004613227565b61106f565b34801561061257600080fd5b506103db7f00000000000000000000000000000000000000000000000000000000000008ae81565b34801561064657600080fd5b5061040e610655366004613424565b6110d6565b34801561066657600080fd5b506103db60145481565b61040e61067e366004613227565b611100565b34801561068f57600080fd5b506103db61069e366004613227565b6112b6565b3480156106af57600080fd5b5061040e6106be366004613441565b61131c565b3480156106cf57600080fd5b5061040e6106de366004613227565b611408565b3480156106ef57600080fd5b5061040e611415565b34801561070457600080fd5b5061040e610713366004613227565b61144d565b34801561072457600080fd5b50610482610733366004613227565b6114c2565b34801561074457600080fd5b506103db60115481565b34801561075a57600080fd5b5061040e610769366004613227565b6114d4565b34801561077a57600080fd5b506103db610789366004613424565b6115c4565b34801561079a57600080fd5b5061040e611655565b3480156107af57600080fd5b50601a54610482906001600160a01b031681565b3480156107cf57600080fd5b5061040e6107de366004613227565b611669565b3480156107ef57600080fd5b506103db60155481565b34801561080557600080fd5b5061040e6108143660046132eb565b611671565b34801561082557600080fd5b5061040e610834366004613471565b611712565b34801561084557600080fd5b5061040e610854366004613227565b611745565b34801561086557600080fd5b506009546001600160a01b0316610482565b34801561088357600080fd5b5061040e610892366004613227565b611752565b3480156108a357600080fd5b5061045561175f565b3480156108b857600080fd5b5061040e6108c736600461352a565b61176e565b3480156108d857600080fd5b5061040e6108e7366004613227565b611786565b3480156108f857600080fd5b5061040e610907366004613471565b611ade565b61040e61091a366004613572565b611ba2565b34801561092b57600080fd5b50601e546104309060ff1681565b34801561094557600080fd5b5061040e610954366004613424565b611d32565b34801561096557600080fd5b50601e5461043090610100900460ff1681565b34801561098457600080fd5b5061040e6109933660046135bd565b611d5c565b3480156109a457600080fd5b5061040e6109b3366004613424565b611d95565b3480156109c457600080fd5b506104556109d3366004613227565b611f9f565b3480156109e457600080fd5b506103db612046565b3480156109f957600080fd5b506103db60085481565b348015610a0f57600080fd5b5061040e610a1e366004613227565b612059565b348015610a2f57600080fd5b506103db60165481565b348015610a4557600080fd5b50610430610a5436600461363c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a8e57600080fd5b506103db60135481565b348015610aa457600080fd5b5061040e610ab3366004613227565b6120c6565b348015610ac457600080fd5b5061040e610ad3366004613424565b6120d3565b61040e610ae6366004613227565b6120fd565b348015610af757600080fd5b5061040e610b06366004613424565b612211565b348015610b1757600080fd5b506103db600f5481565b905090565b610b2e612287565b601055565b60006001600160e01b031982166380ac58cd60e01b1480610b6457506001600160e01b03198216635b5e139f60e01b145b80610b7f57506001600160e01b0319821663780e9d6360e01b145b80610b9a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060028054610baf9061366a565b80601f0160208091040260200160405190810160405280929190818152602001828054610bdb9061366a565b8015610c285780601f10610bfd57610100808354040283529160200191610c28565b820191906000526020600020905b815481529060010190602001808311610c0b57829003601f168201915b5050505050905090565b6000610c3d826122e1565b610ca45760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610ccb826114c2565b9050806001600160a01b0316836001600160a01b031603610d395760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610c9b565b336001600160a01b0382161480610d555750610d558133610a54565b610dc75760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610c9b565b610dd28383836122f7565b505050565b610ddf612287565b601e80549115156101000261ff0019909216919091179055565b610dd2838383612353565b6000610e4f848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506019549150506001600160a01b0385166126d7565b90505b9392505050565b6000610e64836115c4565b8210610ebd5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610c9b565b60008054600019019080805b83811015610f68576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610f1b57805192505b876001600160a01b0316836001600160a01b031603610f5557868403610f4757509350610b9a92505050565b83610f51816136ba565b9450505b5080610f60816136ba565b915050610ec9565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610c9b565b610fd0612287565b6002600a5403610ff25760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55604051600090339047908381818185875af1925050503d8060008114611039576040519150601f19603f3d011682016040523d82523d6000602084013e61103e565b606091505b505090508061104c57600080fd5b506001600a55565b610dd283838360405180602001604052806000815250611d5c565b601a546001600160a01b03166110bb5760405162461bcd60e51b8152602060048201526011602482015270141d5c99d85d1bdc9e481b9bdd081cd95d607a1b6044820152606401610c9b565b601a546110d39033906001600160a01b031683610df9565b50565b6110de612287565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6002600a54036111225760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55806111445760405162461bcd60e51b8152600401610c9b9061370a565b600681106111645760405162461bcd60e51b8152600401610c9b90613729565b601654421061119d5760405162461bcd60e51b8152602060048201526005602482015264194b4c4c0d60da1b6044820152606401610c9b565b336000908152601c602052604090205460ff16156111e55760405162461bcd60e51b8152602060048201526005602482015264652d31303560d81b6044820152606401610c9b565b600b546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112529190613748565b116112875760405162461bcd60e51b8152602060048201526005602482015264652d31303760d81b6044820152606401610c9b565b611293816010546126ed565b50336000908152601c60205260409020805460ff19166001908117909155600a55565b600080546000190182106113185760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610c9b565b5090565b336000908152601b602052604090205460ff166113635760405162461bcd60e51b8152602060048201526005602482015264652d31303160d81b6044820152606401610c9b565b6002600a54036113855760405162461bcd60e51b8152600401610c9b906136d3565b6002600a556014548211156113dc5760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820616c6c6f636174696f6e3a41444d494e00000000006044820152606401610c9b565b6113e881836000612893565b81601460008282546113fa9190613761565b90915550506001600a555050565b611410612287565b601155565b61141d612287565b601e805461ffff191660011790556015546114389042613774565b6016556017546114489042613774565b601855565b611455612287565b80601254101561148f5760405162461bcd60e51b8152602060048201526005602482015264652d31313760d81b6044820152606401610c9b565b80601260008282546114a19190613761565b9250508190555080601360008282546114ba9190613774565b909155505050565b60006114cd826128ae565b5192915050565b336000908152601b602052604090205460ff1661151b5760405162461bcd60e51b8152602060048201526005602482015264652d31303160d81b6044820152606401610c9b565b6002600a540361153d5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a558061155f5760405162461bcd60e51b8152600401610c9b9061370a565b8060145410156115995760405162461bcd60e51b8152602060048201526005602482015264329698989b60d91b6044820152606401610c9b565b6115a533826000612893565b80601460008282546115b79190613761565b90915550506001600a5550565b60006001600160a01b0382166116305760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610c9b565b506001600160a01b03166000908152600560205260409020546001600160801b031690565b61165d612287565b61166760006129dc565b565b611448612287565b611679612287565b6002600a540361169b5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55604051632142170760e11b81523060048201523360248201526044810182905282906001600160a01b038216906342842e0e90606401600060405180830381600087803b1580156116f057600080fd5b505af1158015611704573d6000803e3d6000fd5b50506001600a555050505050565b61171a612287565b6001600160a01b03919091166000908152601b60205260409020805460ff1916911515919091179055565b61174d612287565b601955565b61175a612287565b600f55565b606060038054610baf9061366a565b611776612287565b601f61178282826137cd565b5050565b601e548190610100900460ff16156117d45760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc81c185d5cd959607a1b6044820152606401610c9b565b7f00000000000000000000000000000000000000000000000000000000000008ae816118036000546000190190565b61180d9190613774565b111561184f5760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610c9b565b6002600a54036118715760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55816118935760405162461bcd60e51b8152600401610c9b9061370a565b60165442116118cc5760405162461bcd60e51b81526020600482015260056024820152640ca5a6260760db1b6044820152606401610c9b565b8160135410156119065760405162461bcd60e51b8152602060048201526005602482015264652d31313360d81b6044820152606401610c9b565b81600f54611914919061388c565b600c546040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119809190613748565b10156119b65760405162461bcd60e51b8152602060048201526005602482015264194b4c4c4d60da1b6044820152606401610c9b565b81600f546119c4919061388c565b600c54604051636eb1769f60e11b81523360048201523060248201526001600160a01b039091169063dd62ed3e90604401602060405180830381865afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a369190613748565b1015611a985760405162461bcd60e51b815260206004820152602b60248201527f6d696e744d756c7469706c655769746842617279613a204e6f7420656e6f756760448201526a6820616c6c6f77616e636560a81b6064820152608401610c9b565b600c54600f54611ac0916001600160a01b03169033903090611abb90879061388c565b612a2e565b611acc33836000612893565b81601360008282546113fa9190613761565b336001600160a01b03831603611b365760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610c9b565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6002600a5403611bc45760405162461bcd60e51b8152600401610c9b906136d3565b6002600a5580611be65760405162461bcd60e51b8152600401610c9b9061370a565b60068110611c065760405162461bcd60e51b8152600401610c9b90613729565b6016544210611c3f5760405162461bcd60e51b8152602060048201526005602482015264194b4c4c0d60da1b6044820152606401610c9b565b336000908152601c602052604090205460ff1615611c875760405162461bcd60e51b8152602060048201526005602482015264652d31303560d81b6044820152606401610c9b565b611cc88383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060195491503390506126d7565b1515600114611d015760405162461bcd60e51b8152602060048201526005602482015264329698981b60d91b6044820152606401610c9b565b611d0d816010546126ed565b5050336000908152601c60205260409020805460ff19166001908117909155600a5550565b611d3a612287565b601a80546001600160a01b0319166001600160a01b0392909216919091179055565b611d67848484612353565b611d7384848484612a88565b611d8f5760405162461bcd60e51b8152600401610c9b906138a3565b50505050565b611d9d612287565b6002600a5403611dbf5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a556040516370a0823160e01b8152306004820181905282916001600160a01b0383169163095ea7b39183906370a0823190602401602060405180830381865afa158015611e14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e389190613748565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611e83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea791906138f6565b506040516370a0823160e01b815230600482018190526001600160a01b038316916323b872dd9190339084906370a0823190602401602060405180830381865afa158015611ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1d9190613748565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9591906138f6565b50506001600a5550565b606060185442101561203d5760208054611fb89061366a565b80601f0160208091040260200160405190810160405280929190818152602001828054611fe49061366a565b80156120315780601f1061200657610100808354040283529160200191612031565b820191906000526020600020905b81548152906001019060200180831161201457829003601f168201915b50505050509050919050565b610b9a82612b8a565b6000805460001901610b21906001613774565b612061612287565b80601354101561209b5760405162461bcd60e51b81526020600482015260056024820152640ca5a6262760db1b6044820152606401610c9b565b80601360008282546120ad9190613761565b9250508190555080601260008282546114ba9190613774565b6120ce612287565b601655565b6120db612287565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6002600a540361211f5760405162461bcd60e51b8152600401610c9b906136d3565b6002600a55806121415760405162461bcd60e51b8152600401610c9b9061370a565b600681106121615760405162461bcd60e51b8152600401610c9b90613729565b601654421161219a5760405162461bcd60e51b81526020600482015260056024820152640ca5a6260760db1b6044820152606401610c9b565b336000908152601d602052604090205460ff16156121e25760405162461bcd60e51b8152602060048201526005602482015264652d31303960d81b6044820152606401610c9b565b6121ee816011546126ed565b50336000908152601d60205260409020805460ff19166001908117909155600a55565b612219612287565b6001600160a01b03811661227e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c9b565b6110d3816129dc565b6009546001600160a01b031633146116675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9b565b600081600111158015610b9a5750506000541190565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061235e826128ae565b80519091506000906001600160a01b0316336001600160a01b0316148061239557503361238a84610c32565b6001600160a01b0316145b806123a7575081516123a79033610a54565b9050806124115760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610c9b565b846001600160a01b031682600001516001600160a01b0316146124855760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610c9b565b6001600160a01b0384166124e95760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c9b565b6124f960008484600001516122f7565b6001600160a01b038516600090815260056020526040812080546001929061252b9084906001600160801b0316613913565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b038616600090815260056020526040812080546001945090926125779185911661393a565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526004909152948520935184549151909216600160a01b026001600160e01b031990911691909216171790556125fe846001613774565b6000818152600460205260409020549091506001600160a01b031661268d57612626816122e1565b1561268d5760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600490935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b6000826126e48584612be7565b14949350505050565b601e548290610100900460ff161561273b5760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc81c185d5cd959607a1b6044820152606401610c9b565b7f00000000000000000000000000000000000000000000000000000000000008ae8161276a6000546000190190565b6127749190613774565b11156127b65760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610c9b565b601e5460ff166127f05760405162461bcd60e51b81526020600482015260056024820152640652d3131360dc1b6044820152606401610c9b565b82601254101561282a5760405162461bcd60e51b8152602060048201526005602482015264652d31313160d81b6044820152606401610c9b565b612834838361388c565b34101561286b5760405162461bcd60e51b8152602060048201526005602482015264329698989960d91b6044820152606401610c9b565b61287733846000612893565b82601260008282546128899190613761565b9091555050505050565b610dd283838360405180602001604052806000815250612c34565b604080518082019091526000808252602082015281806001111580156128d5575060005481105b1561297c576000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612926579392505050565b50600019016000818152600460209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612977579392505050565b612926565b60405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610c9b565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611d8f908590612f06565b60006001600160a01b0384163b15612b7e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612acc90339089908890889060040161395a565b6020604051808303816000875af1925050508015612b07575060408051601f3d908101601f19168201909252612b0491810190613997565b60015b612b64573d808015612b35576040519150601f19603f3d011682016040523d82523d6000602084013e612b3a565b606091505b508051600003612b5c5760405162461bcd60e51b8152600401610c9b906138a3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612b82565b5060015b949350505050565b60606000612b96612fd8565b90506000815111612bb65760405180602001604052806000815250610e52565b80612bc084612fe7565b604051602001612bd19291906139b4565b6040516020818303038152906040529392505050565b600081815b8451811015612c2c57612c1882868381518110612c0b57612c0b6139e3565b60200260200101516130e7565b915080612c24816136ba565b915050612bec565b509392505050565b6000546001600160a01b038516612c975760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c9b565b612ca0816122e1565b15612ced5760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610c9b565b821515600003612d5457600154841115612d545760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610c9b565b6001600160a01b0385166000908152600560209081526040918290208251808401845290546001600160801b038082168352600160801b9091041691810191909152815180830190925280519091908190612db090889061393a565b6001600160801b0316815260200185612dc95786612dcc565b60005b8360200151612ddb919061393a565b6001600160801b039081169091526001600160a01b0380891660008181526005602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526004909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b86811015612efa5760405182906001600160a01b038a16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612ebe6000898488612a88565b612eda5760405162461bcd60e51b8152600401610c9b906138a3565b81612ee4816136ba565b9250508080612ef2906136ba565b915050612e71565b50600055505050505050565b6000612f5b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166131139092919063ffffffff16565b805190915015610dd25780806020019051810190612f7991906138f6565b610dd25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c9b565b6060601f8054610baf9061366a565b60608160000361300e5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156130385780613022816136ba565b91506130319050600a83613a0f565b9150613012565b6000816001600160401b038111156130525761305261349f565b6040519080825280601f01601f19166020018201604052801561307c576020820181803683370190505b5090505b8415612b8257613091600183613761565b915061309e600a86613a23565b6130a9906030613774565b60f81b8183815181106130be576130be6139e3565b60200101906001600160f81b031916908160001a9053506130e0600a86613a0f565b9450613080565b6000818310613103576000828152602084905260409020610e52565b5060009182526020526040902090565b6060610e4f8484600085856001600160a01b0385163b6131755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c9b565b600080866001600160a01b031685876040516131919190613a37565b60006040518083038185875af1925050503d80600081146131ce576040519150601f19603f3d011682016040523d82523d6000602084013e6131d3565b606091505b50915091506131e38282866131ee565b979650505050505050565b606083156131fd575081610e52565b82511561320d5782518084602001fd5b8160405162461bcd60e51b8152600401610c9b91906132c3565b60006020828403121561323957600080fd5b5035919050565b6001600160e01b0319811681146110d357600080fd5b60006020828403121561326857600080fd5b8135610e5281613240565b60005b8381101561328e578181015183820152602001613276565b50506000910152565b600081518084526132af816020860160208601613273565b601f01601f19169290920160200192915050565b602081526000610e526020830184613297565b6001600160a01b03811681146110d357600080fd5b600080604083850312156132fe57600080fd5b8235613309816132d6565b946020939093013593505050565b80151581146110d357600080fd5b60006020828403121561333757600080fd5b8135610e5281613317565b60008060006060848603121561335757600080fd5b8335613362816132d6565b92506020840135613372816132d6565b929592945050506040919091013590565b60008083601f84011261339557600080fd5b5081356001600160401b038111156133ac57600080fd5b6020830191508360208260051b85010111156133c757600080fd5b9250929050565b6000806000604084860312156133e357600080fd5b83356001600160401b038111156133f957600080fd5b61340586828701613383565b9094509250506020840135613419816132d6565b809150509250925092565b60006020828403121561343657600080fd5b8135610e52816132d6565b6000806040838503121561345457600080fd5b823591506020830135613466816132d6565b809150509250929050565b6000806040838503121561348457600080fd5b823561348f816132d6565b9150602083013561346681613317565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156134cf576134cf61349f565b604051601f8501601f19908116603f011681019082821181831017156134f7576134f761349f565b8160405280935085815286868601111561351057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561353c57600080fd5b81356001600160401b0381111561355257600080fd5b8201601f8101841361356357600080fd5b612b82848235602084016134b5565b60008060006040848603121561358757600080fd5b83356001600160401b0381111561359d57600080fd5b6135a986828701613383565b909790965060209590950135949350505050565b600080600080608085870312156135d357600080fd5b84356135de816132d6565b935060208501356135ee816132d6565b92506040850135915060608501356001600160401b0381111561361057600080fd5b8501601f8101871361362157600080fd5b613630878235602084016134b5565b91505092959194509250565b6000806040838503121561364f57600080fd5b823561365a816132d6565b91506020830135613466816132d6565b600181811c9082168061367e57607f821691505b60208210810361369e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600182016136cc576136cc6136a4565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260059082015264329698981960d91b604082015260600190565b602080825260059082015264652d31303360d81b604082015260600190565b60006020828403121561375a57600080fd5b5051919050565b81810381811115610b9a57610b9a6136a4565b80820180821115610b9a57610b9a6136a4565b601f821115610dd257600081815260208120601f850160051c810160208610156137ae5750805b601f850160051c820191505b818110156126cf578281556001016137ba565b81516001600160401b038111156137e6576137e661349f565b6137fa816137f4845461366a565b84613787565b602080601f83116001811461382f57600084156138175750858301515b600019600386901b1c1916600185901b1785556126cf565b600085815260208120601f198616915b8281101561385e5788860151825594840194600190910190840161383f565b508582101561387c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082028115828204841417610b9a57610b9a6136a4565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b60006020828403121561390857600080fd5b8151610e5281613317565b6001600160801b03828116828216039080821115613933576139336136a4565b5092915050565b6001600160801b03818116838216019080821115613933576139336136a4565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061398d90830184613297565b9695505050505050565b6000602082840312156139a957600080fd5b8151610e5281613240565b600083516139c6818460208801613273565b8351908301906139da818360208801613273565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082613a1e57613a1e6139f9565b500490565b600082613a3257613a326139f9565b500690565b60008251613a49818460208701613273565b919091019291505056fea2646970667358221220700d8d81785fe237b77b92f6671ebef86d209d6ef66ffb83d9d6c55b3e47970f64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000008ae00000000000000000000000000000000000000000000000000000000000008ae00000000000000000000000000000000000000000000000000000000000005140000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000007a0000000000000000000000000000000000000000000000000000000000000e1048d22f5c23c86b26b60badbdd19bad148716e9c32340309268583e8740cba403000000000000000000000000000000000000000000000000000000000000001a424154414e4720455448455245554d20284d4152414855594f2900000000000000000000000000000000000000000000000000000000000000000000000000084d4152414855594f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f6d6172616875796f2d6170692e626174616e67657468657265756d2e78797a2f6d657461646174612f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f6d6172616875796f2d6170692e626174616e67657468657265756d2e78797a2f68696464656e000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): BATANG ETHEREUM (MARAHUYO)
Arg [1] : symbol (string): MARAHUYO
Arg [2] : baseTokenURI (string): https://marahuyo-api.batangethereum.xyz/metadata/
Arg [3] : hiddenMetadataUri (string): https://marahuyo-api.batangethereum.xyz/hidden
Arg [4] : collectionSize (uint256): 2222
Arg [5] : batchSize (uint256): 2222
Arg [6] : allocationEthMint (uint256): 1300
Arg [7] : allocationBryMint (uint256): 800
Arg [8] : allocationAdminMint (uint256): 122
Arg [9] : prePublicMintGap (uint256): 3600
Arg [10] : merkleRoot (bytes32): 0x48d22f5c23c86b26b60badbdd19bad148716e9c32340309268583e8740cba403
-----Encoded View---------------
21 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [4] : 00000000000000000000000000000000000000000000000000000000000008ae
Arg [5] : 00000000000000000000000000000000000000000000000000000000000008ae
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000514
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000320
Arg [8] : 000000000000000000000000000000000000000000000000000000000000007a
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000e10
Arg [10] : 48d22f5c23c86b26b60badbdd19bad148716e9c32340309268583e8740cba403
Arg [11] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [12] : 424154414e4720455448455245554d20284d4152414855594f29000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [14] : 4d4152414855594f000000000000000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000031
Arg [16] : 68747470733a2f2f6d6172616875796f2d6170692e626174616e676574686572
Arg [17] : 65756d2e78797a2f6d657461646174612f000000000000000000000000000000
Arg [18] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [19] : 68747470733a2f2f6d6172616875796f2d6170692e626174616e676574686572
Arg [20] : 65756d2e78797a2f68696464656e000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.