Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 290 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer From | 18393823 | 384 days ago | IN | 0 ETH | 0.00066792 | ||||
Transfer From | 18393823 | 384 days ago | IN | 0 ETH | 0.00066792 | ||||
Transfer From | 18393823 | 384 days ago | IN | 0 ETH | 0.00066792 | ||||
Transfer From | 18393823 | 384 days ago | IN | 0 ETH | 0.00066792 | ||||
Transfer From | 18393823 | 384 days ago | IN | 0 ETH | 0.00068637 | ||||
Transfer From | 18393818 | 384 days ago | IN | 0 ETH | 0.00068287 | ||||
Transfer From | 18393816 | 384 days ago | IN | 0 ETH | 0.00140031 | ||||
Transfer From | 18393815 | 384 days ago | IN | 0 ETH | 0.00071447 | ||||
Transfer From | 18393815 | 384 days ago | IN | 0 ETH | 0.00191968 | ||||
Transfer From | 18393813 | 384 days ago | IN | 0 ETH | 0.00196752 | ||||
Transfer From | 18393811 | 384 days ago | IN | 0 ETH | 0.00072347 | ||||
Transfer From | 18393810 | 384 days ago | IN | 0 ETH | 0.00074366 | ||||
Transfer From | 18393809 | 384 days ago | IN | 0 ETH | 0.00147734 | ||||
Transfer From | 18393809 | 384 days ago | IN | 0 ETH | 0.00077982 | ||||
Transfer From | 18393809 | 384 days ago | IN | 0 ETH | 0.00078647 | ||||
Transfer From | 18393809 | 384 days ago | IN | 0 ETH | 0.00156567 | ||||
Transfer From | 18393809 | 384 days ago | IN | 0 ETH | 0.00080701 | ||||
Transfer From | 18393809 | 384 days ago | IN | 0 ETH | 0.00078123 | ||||
Transfer From | 18393802 | 384 days ago | IN | 0 ETH | 0.00082771 | ||||
Transfer From | 18393799 | 384 days ago | IN | 0 ETH | 0.00219875 | ||||
Transfer From | 18393796 | 384 days ago | IN | 0 ETH | 0.00292674 | ||||
Transfer From | 18393795 | 384 days ago | IN | 0 ETH | 0.0022626 | ||||
Transfer From | 18393795 | 384 days ago | IN | 0 ETH | 0.0022626 | ||||
Transfer From | 18393793 | 384 days ago | IN | 0 ETH | 0.00294816 | ||||
Transfer From | 18393789 | 384 days ago | IN | 0 ETH | 0.00212405 |
Loading...
Loading
Contract Name:
Dracorium
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /** * @title LICENSE REQUIREMENT * @dev This contract is licensed under the MIT license. */ import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./INFTExtension.sol"; import "./IMetaverseNFT.sol"; import "./OpenseaProxy.sol"; contract Dracorium is ERC721A, ReentrancyGuard, Ownable, IMetaverseNFT // implements IERC2981 { using Address for address; using SafeERC20 for IERC20; using Counters for Counters.Counter; Counters.Counter private _tokenIndexCounter; // token index counter uint256 public constant SALE_STARTS_AT_INFINITY = 2**256 - 1; uint256 public startTimestamp = SALE_STARTS_AT_INFINITY; uint256 public reserved; uint256 public maxSupply; uint256 public maxPerMint; uint256 public price; uint256 public royaltyFee; address public royaltyReceiver; address public payoutReceiver = address(0x0); address public uriExtension = address(0x0); bool public isFrozen; bool public isPayoutChangeLocked; bool private isOpenSeaProxyActive = true; bool private startAtOne = true; /** * @dev Additional data for each token that needs to be stored and accessed on-chain */ mapping(uint256 => bytes32) public data; /** * @dev List of connected extensions */ INFTExtension[] public extensions; string public PROVENANCE_HASH = ""; string private CONTRACT_URI = ""; string private BASE_URI; string private URI_POSTFIX = ""; event ExtensionAdded(address indexed extensionAddress); event ExtensionRevoked(address indexed extensionAddress); event ExtensionURIAdded(address indexed extensionAddress); constructor( uint256 _price, uint256 _maxSupply, uint256 _nReserved, uint256 _maxPerMint, uint256 _royaltyFee, string memory _uri, string memory _name, string memory _symbol, bool _startAtOne ) ERC721A(_name, _symbol) { startTimestamp = SALE_STARTS_AT_INFINITY; price = _price; reserved = _nReserved; maxPerMint = _maxPerMint; maxSupply = _maxSupply; royaltyFee = _royaltyFee; royaltyReceiver = address(this); startAtOne = _startAtOne; BASE_URI = _uri; } function _baseURI() internal view override returns (string memory) { return BASE_URI; } function _startTokenId() internal view virtual override returns (uint256) { return startAtOne ? 1 : 0; } function contractURI() public view returns (string memory uri) { uri = bytes(CONTRACT_URI).length > 0 ? CONTRACT_URI : _baseURI(); } function tokenURI(uint256 tokenId) public view override returns (string memory) { if (uriExtension != address(0)) { string memory uri = INFTURIExtension(uriExtension).tokenURI( tokenId ); if (bytes(uri).length > 0) { return uri; } } if (bytes(URI_POSTFIX).length > 0) { return string(abi.encodePacked(super.tokenURI(tokenId), URI_POSTFIX)); } else { return super.tokenURI(tokenId); } } function startTokenId() public view returns (uint256) { return _startTokenId(); } // ----- Admin functions ----- function setBaseURI(string calldata uri) public onlyOwner { BASE_URI = uri; } // Contract-level metadata for Opensea function setContractURI(string calldata uri) public onlyOwner { CONTRACT_URI = uri; } function setPostfixURI(string calldata postfix) public onlyOwner { URI_POSTFIX = postfix; } function setPrice(uint256 _price) public onlyOwner { price = _price; } // Freeze forever, irreversible function freeze() public onlyOwner { isFrozen = true; } // Lock changing withdraw address function lockPayoutChange() public onlyOwner { isPayoutChangeLocked = true; } function isExtensionAdded(address _extension) public view returns (bool) { for (uint256 index = 0; index < extensions.length; index++) { if (address(extensions[index]) == _extension) { return true; } } return false; } function extensionsLength() public view returns (uint256) { return extensions.length; } // Extensions are allowed to mint function addExtension(address _extension) public onlyOwner { require(_extension != address(this), "Cannot add self as extension"); require(!isExtensionAdded(_extension), "Extension already added"); extensions.push(INFTExtension(_extension)); emit ExtensionAdded(_extension); } function revokeExtension(address _extension) public onlyOwner { uint256 index = 0; for (; index < extensions.length; index++) { if (extensions[index] == INFTExtension(_extension)) { break; } } extensions[index] = extensions[extensions.length - 1]; extensions.pop(); emit ExtensionRevoked(_extension); } function setExtensionTokenURI(address extension) public onlyOwner { require(extension != address(this), "Cannot add self as extension"); require( extension == address(0x0) || ERC165Checker.supportsInterface( extension, type(INFTURIExtension).interfaceId ), "Not conforms to extension" ); uriExtension = extension; emit ExtensionURIAdded(extension); } // function to disable gasless listings for security in case // opensea ever shuts down or is compromised // from CryptoCoven https://etherscan.io/address/0x5180db8f5c931aae63c74266b211f580155ecac8#code function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive) public onlyOwner { isOpenSeaProxyActive = _isOpenSeaProxyActive; } // ---- Minting ---- function _mintConsecutive( uint256 nTokens, address to, bytes32 extraData ) internal { require( _totalMinted() + nTokens + reserved <= maxSupply, "Not enough Tokens left." ); uint256 currentTokenIndex = _tokenIndexCounter.current(); _safeMint(to, nTokens, ""); if (extraData.length > 0) { for (uint256 i; i < nTokens; i++) { uint256 tokenId = currentTokenIndex + i; data[tokenId] = extraData; } } } // ---- Mint control ---- modifier whenSaleStarted() { require(saleStarted(), "Sale not started"); _; } modifier whenNotFrozen() { require(!isFrozen, "Minting is frozen"); _; } modifier whenNotPayoutChangeLocked() { require(!isPayoutChangeLocked, "Payout change is locked"); _; } modifier onlyExtension() { require( isExtensionAdded(msg.sender), "Extension should be added to contract before minting" ); _; } // ---- Mint public ---- // Contract can sell tokens function mint(uint256 nTokens) external payable nonReentrant whenSaleStarted { require( nTokens <= maxPerMint, "You cannot mint more than MAX_TOKENS_PER_MINT tokens at once!" ); require(nTokens * price <= msg.value, "Inconsistent amount sent!"); _mintConsecutive(nTokens, msg.sender, 0x0); } // Owner can claim free tokens function claim(uint256 nTokens, address to) external nonReentrant onlyOwner { require(nTokens <= reserved, "That would exceed the max reserved."); reserved = reserved - nTokens; _mintConsecutive(nTokens, to, 0x0); } // ---- Mint via extension function mintExternal( uint256 nTokens, address to, bytes32 extraData ) external payable onlyExtension nonReentrant { _mintConsecutive(nTokens, to, extraData); } // ---- Sale control ---- function updateStartTimestamp(uint256 _startTimestamp) public onlyOwner whenNotFrozen { startTimestamp = _startTimestamp; } function startSale() public onlyOwner whenNotFrozen { startTimestamp = block.timestamp; } function stopSale() public onlyOwner { startTimestamp = SALE_STARTS_AT_INFINITY; } function saleStarted() public view returns (bool) { return block.timestamp >= startTimestamp; } // ---- Offchain Info ---- // This should be set before sales open. function setProvenanceHash(string memory provenanceHash) public onlyOwner { PROVENANCE_HASH = provenanceHash; } function setRoyaltyFee(uint256 _royaltyFee) public onlyOwner { royaltyFee = _royaltyFee; } function setRoyaltyReceiver(address _receiver) public onlyOwner { royaltyReceiver = _receiver; } function setPayoutReceiver(address _receiver) public onlyOwner whenNotPayoutChangeLocked { payoutReceiver = payable(_receiver); } function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { receiver = royaltyReceiver; royaltyAmount = (salePrice * royaltyFee) / 10000; } function getPayoutReceiver() public view returns (address payable receiver) { receiver = payoutReceiver != address(0x0) ? payable(payoutReceiver) : payable(owner()); } // ---- Allow royalty deposits from Opensea ----- receive() external payable {} // ---- Withdraw ----- function withdraw() public virtual onlyOwner { uint256 balance = address(this).balance; address payable receiver = getPayoutReceiver(); Address.sendValue(receiver, balance); } function withdrawToken(IERC20 token) public virtual onlyOwner { uint256 balance = token.balanceOf(address(this)); address payable receiver = getPayoutReceiver(); token.safeTransfer(receiver, balance); } // -------- ERC721 overrides -------- function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return interfaceId == type(IERC2981).interfaceId || interfaceId == type(IMetaverseNFT).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings. * Taken from CryptoCoven: https://etherscan.io/address/0x5180db8f5c931aae63c74266b211f580155ecac8#code */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { // Get a reference to OpenSea's proxy registry contract by instantiating // the contract using the already existing address. ProxyRegistry proxyRegistry = ProxyRegistry( 0xa5409ec958C83C3f309868babACA7c86DCB077c1 ); if ( isOpenSeaProxyActive && address(proxyRegistry.proxies(owner)) == operator ) { return true; } return super.isApprovedForAll(owner, operator); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; // These contract definitions are used to create a reference to the OpenSea // ProxyRegistry contract by using the registry's address (see isApprovedForAll). interface OwnableDelegateProxy { } interface ProxyRegistry { function proxies(address) external view returns (OwnableDelegateProxy); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IAvatarNFT { // ------ View functions ------ function saleStarted() external view returns (bool); function isExtensionAdded(address extension) external view returns (bool); /** Extra information stored for each tokenId. Optional, provided on mint */ function data(uint256 tokenId) external view returns (bytes32); // ------ Mint functions ------ /** Mint from NFTExtension contract. Optionally provide data parameter. */ function mintExternal( uint256 tokenId, address to, bytes32 data ) external payable; // ------ Admin functions ------ function addExtension(address extension) external; function revokeExtension(address extension) external; function withdraw() external; } interface IMetaverseNFT is IAvatarNFT { // ------ View functions ------ /** Recommended royalty for tokenId sale. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); // ------ Admin functions ------ function setRoyaltyReceiver(address receiver) external; function setRoyaltyFee(uint256 fee) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface INFTExtension is IERC165 { } interface INFTURIExtension is INFTExtension { function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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 (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.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.2) (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface. */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) && !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * * Some precompiled contracts will falsely indicate support for a given interface, so caution * should be exercised when using this function. * * Interface identification is specified in ERC-165. */ function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) { // prepare call bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); // perform static call bool success; uint256 returnSize; uint256 returnValue; assembly { success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20) returnSize := returndatasize() returnValue := mload(0x00) } return success && returnSize >= 0x20 && returnValue > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // 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) (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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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.8.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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 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); }
// 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_nReserved","type":"uint256"},{"internalType":"uint256","name":"_maxPerMint","type":"uint256"},{"internalType":"uint256","name":"_royaltyFee","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"bool","name":"_startAtOne","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extensionAddress","type":"address"}],"name":"ExtensionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extensionAddress","type":"address"}],"name":"ExtensionRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extensionAddress","type":"address"}],"name":"ExtensionURIAdded","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":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_STARTS_AT_INFINITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_extension","type":"address"}],"name":"addExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nTokens","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"data","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"extensions","outputs":[{"internalType":"contract INFTExtension","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extensionsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeze","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPayoutReceiver","outputs":[{"internalType":"address payable","name":"receiver","type":"address"}],"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":[{"internalType":"address","name":"_extension","type":"address"}],"name":"isExtensionAdded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPayoutChangeLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPayoutChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nTokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nTokens","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"extraData","type":"bytes32"}],"name":"mintExternal","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_extension","type":"address"}],"name":"revokeExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"setExtensionTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOpenSeaProxyActive","type":"bool"}],"name":"setIsOpenSeaProxyActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setPayoutReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"postfix","type":"string"}],"name":"setPostfixURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royaltyFee","type":"uint256"}],"name":"setRoyaltyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"name":"updateStartTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uriExtension","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
600019600b55601280546001600160a01b031916905560138054600163ffff000160a01b03191661010160b01b17905560a06040819052600060808190526200004b91601691620001f6565b506040805160208101918290526000908190526200006c91601791620001f6565b506040805160208101918290526000908190526200008d91601991620001f6565b503480156200009b57600080fd5b506040516200343338038062003433833981016040819052620000be916200037f565b825183908390620000d7906002906020850190620001f6565b508051620000ed906003906020840190620001f6565b50620000f86200017c565b600055505060016008556200010d33620001a4565b600019600b55600f899055600c879055600e869055600d8890556010859055601180546001600160a01b0319163017905560138054821515600160b81b0260ff60b81b1990911617905583516200016c906018906020870190620001f6565b5050505050505050505062000494565b601354600090600160b81b900460ff16620001995760006200019c565b60015b60ff16905090565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002049062000457565b90600052602060002090601f01602090048101928262000228576000855562000273565b82601f106200024357805160ff191683800117855562000273565b8280016001018555821562000273579182015b828111156200027357825182559160200191906001019062000256565b506200028192915062000285565b5090565b5b8082111562000281576000815560010162000286565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002c457600080fd5b81516001600160401b0380821115620002e157620002e16200029c565b604051601f8301601f19908116603f011681019082821181831017156200030c576200030c6200029c565b816040528381526020925086838588010111156200032957600080fd5b600091505b838210156200034d57858201830151818301840152908201906200032e565b838211156200035f5760008385830101525b9695505050505050565b805180151581146200037a57600080fd5b919050565b60008060008060008060008060006101208a8c0312156200039f57600080fd5b895160208b015160408c015160608d015160808e015160a08f0151949d50929b50909950975095506001600160401b0380821115620003dd57600080fd5b620003eb8d838e01620002b2565b955060c08c01519150808211156200040257600080fd5b620004108d838e01620002b2565b945060e08c01519150808211156200042757600080fd5b50620004368c828d01620002b2565b925050620004486101008b0162000369565b90509295985092959850929598565b600181811c908216806200046c57607f821691505b602082108114156200048e57634e487b7160e01b600052602260045260246000fd5b50919050565b612f8f80620004a46000396000f3fe6080604052600436106103a65760003560e01c80638dc251e3116101e7578063c87b56dd1161010d578063e6798baa116100a0578063f0ba84401161006f578063f0ba844014610a16578063f2fde38b14610a43578063fe60d12c14610a63578063ff1b655614610a7957600080fd5b8063e6798baa146109b6578063e6fd48bc146109cb578063e8a3d485146109e1578063e985e9c5146109f657600080fd5b8063ddd5e1b2116100dc578063ddd5e1b214610941578063e36b0b3714610961578063e43082f714610976578063e67151ae1461099657600080fd5b8063c87b56dd146108d6578063d5abeb01146108f6578063d69b2e451461090c578063db85d59c1461092157600080fd5b8063a0712d6811610185578063a769310a11610154578063a769310a14610878578063b66a0e5d14610898578063b88d4fde146108ad578063b8997a97146108c057600080fd5b8063a0712d6814610804578063a22cb46514610817578063a474935c14610837578063a4f6628d1461085857600080fd5b806395d89b41116101c157806395d89b41146107a35780639eb88b2c146107b85780639fbc8713146107ce578063a035b1fe146107ee57600080fd5b80638dc251e31461074357806391b7f5ed14610763578063938e3d7b1461078357600080fd5b80633e4086e5116102cc57806362a5af3b1161026a57806370a082311161023957806370a08231146106d0578063715018a6146106f057806389476069146107055780638da5cb5b1461072557600080fd5b806362a5af3b146106665780636352211e1461067b5780636b8533141461069b5780636e878ffb146106bb57600080fd5b8063507e094f116102a6578063507e094f146105f857806352ee46961461060e57806355f804b31461062e5780635c474f9e1461064e57600080fd5b80633e4086e5146105b257806342842e0e146105d25780634690521b146105e557600080fd5b8063170ff3e1116103445780632a30e4c2116103135780632a30e4c21461051d5780632a55205a1461053d57806333eeb1471461057c5780633ccfd60b1461059d57600080fd5b8063170ff3e1146104b557806318160ddd146104d557806320b7b8df146104ea57806323b872dd1461050a57600080fd5b80630768c618116103805780630768c61814610428578063081812fc1461044a578063095ea7b314610482578063109695231461049557600080fd5b806301ffc9a7146103b25780630563aae5146103e757806306fdde031461040657600080fd5b366103ad57005b600080fd5b3480156103be57600080fd5b506103d26103cd366004612809565b610a8e565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b506015545b6040519081526020016103de565b34801561041257600080fd5b5061041b610ad4565b6040516103de919061287e565b34801561043457600080fd5b50610448610443366004612891565b610b66565b005b34801561045657600080fd5b5061046a610465366004612903565b610b7f565b6040516001600160a01b0390911681526020016103de565b610448610490366004612931565b610bc3565b3480156104a157600080fd5b506104486104b0366004612a0a565b610c63565b3480156104c157600080fd5b506104486104d0366004612a53565b610c82565b3480156104e157600080fd5b506103f8610db6565b3480156104f657600080fd5b5060125461046a906001600160a01b031681565b610448610518366004612a70565b610dcd565b34801561052957600080fd5b50610448610538366004612a53565b610f5e565b34801561054957600080fd5b5061055d610558366004612ab1565b610fe2565b604080516001600160a01b0390931683526020830191909152016103de565b34801561058857600080fd5b506013546103d290600160a01b900460ff1681565b3480156105a957600080fd5b50610448611018565b3480156105be57600080fd5b506104486105cd366004612903565b611037565b6104486105e0366004612a70565b611044565b6104486105f3366004612ad3565b61105f565b34801561060457600080fd5b506103f8600e5481565b34801561061a57600080fd5b5060135461046a906001600160a01b031681565b34801561063a57600080fd5b50610448610649366004612891565b6110ee565b34801561065a57600080fd5b50600b544210156103d2565b34801561067257600080fd5b50610448611102565b34801561068757600080fd5b5061046a610696366004612903565b61111f565b3480156106a757600080fd5b506104486106b6366004612a53565b61112a565b3480156106c757600080fd5b5061046a611243565b3480156106dc57600080fd5b506103f86106eb366004612a53565b61127b565b3480156106fc57600080fd5b506104486112ca565b34801561071157600080fd5b50610448610720366004612a53565b6112de565b34801561073157600080fd5b506009546001600160a01b031661046a565b34801561074f57600080fd5b5061044861075e366004612a53565b611382565b34801561076f57600080fd5b5061044861077e366004612903565b6113ac565b34801561078f57600080fd5b5061044861079e366004612891565b6113b9565b3480156107af57600080fd5b5061041b6113cd565b3480156107c457600080fd5b506103f860001981565b3480156107da57600080fd5b5060115461046a906001600160a01b031681565b3480156107fa57600080fd5b506103f8600f5481565b610448610812366004612903565b6113dc565b34801561082357600080fd5b50610448610832366004612b08565b611517565b34801561084357600080fd5b506013546103d290600160a81b900460ff1681565b34801561086457600080fd5b506103d2610873366004612a53565b611583565b34801561088457600080fd5b50610448610893366004612a53565b6115ed565b3480156108a457600080fd5b50610448611736565b6104486108bb366004612b41565b611792565b3480156108cc57600080fd5b506103f860105481565b3480156108e257600080fd5b5061041b6108f1366004612903565b6117dc565b34801561090257600080fd5b506103f8600d5481565b34801561091857600080fd5b506104486118d5565b34801561092d57600080fd5b5061046a61093c366004612903565b6118f2565b34801561094d57600080fd5b5061044861095c366004612bc1565b61191c565b34801561096d57600080fd5b506104486119b1565b34801561098257600080fd5b50610448610991366004612be6565b6119c1565b3480156109a257600080fd5b506104486109b1366004612903565b6119e7565b3480156109c257600080fd5b506103f8611a42565b3480156109d757600080fd5b506103f8600b5481565b3480156109ed57600080fd5b5061041b611a4c565b348015610a0257600080fd5b506103d2610a11366004612c03565b611a79565b348015610a2257600080fd5b506103f8610a31366004612903565b60146020526000908152604090205481565b348015610a4f57600080fd5b50610448610a5e366004612a53565b611b70565b348015610a6f57600080fd5b506103f8600c5481565b348015610a8557600080fd5b5061041b611be6565b60006001600160e01b0319821663152a902d60e11b1480610abf57506001600160e01b03198216632675fdd760e21b145b80610ace5750610ace82611c74565b92915050565b606060028054610ae390612c31565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0f90612c31565b8015610b5c5780601f10610b3157610100808354040283529160200191610b5c565b820191906000526020600020905b815481529060010190602001808311610b3f57829003601f168201915b5050505050905090565b610b6e611cc2565b610b7a601983836126e6565b505050565b6000610b8a82611d1c565b610ba7576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610bce8261111f565b9050336001600160a01b03821614610c0757610bea8133611a79565b610c07576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610c6b611cc2565b8051610c7e90601690602084019061276a565b5050565b610c8a611cc2565b6001600160a01b038116301415610ce85760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e0000000060448201526064015b60405180910390fd5b610cf181611583565b15610d3e5760405162461bcd60e51b815260206004820152601760248201527f457874656e73696f6e20616c72656164792061646465640000000000000000006044820152606401610cdf565b6015805460018101825560009182527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180546001600160a01b0319166001600160a01b03841690811790915560405190917f99c6112dbaef85e57ac8ca86dd23e3c785162b58a6e810e5d5e7455b568d66b191a250565b6000610dc0611d57565b6001546000540303905090565b6000610dd882611d7d565b9050836001600160a01b0316816001600160a01b031614610e0b5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610e5857610e3b8633611a79565b610e5857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610e7f57604051633a954ecd60e21b815260040160405180910390fd5b8015610e8a57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610f155760018401600081815260046020526040902054610f13576000548114610f135760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610f66611cc2565b601354600160a81b900460ff1615610fc05760405162461bcd60e51b815260206004820152601760248201527f5061796f7574206368616e6765206973206c6f636b65640000000000000000006044820152606401610cdf565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6011546010546001600160a01b0390911690600090612710906110059085612c82565b61100f9190612ca1565b90509250929050565b611020611cc2565b47600061102b611243565b9050610c7e8183611df3565b61103f611cc2565b601055565b610b7a83838360405180602001604052806000815250611792565b61106833611583565b6110d15760405162461bcd60e51b815260206004820152603460248201527f457874656e73696f6e2073686f756c6420626520616464656420746f20636f6e6044820152737472616374206265666f7265206d696e74696e6760601b6064820152608401610cdf565b6110d9611f0c565b6110e4838383611f66565b610b7a6001600855565b6110f6611cc2565b610b7a601883836126e6565b61110a611cc2565b6013805460ff60a01b1916600160a01b179055565b6000610ace82611d7d565b611132611cc2565b6001600160a01b03811630141561118b5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610cdf565b6001600160a01b03811615806111ad57506111ad8163c87b56dd60e01b612040565b6111f95760405162461bcd60e51b815260206004820152601960248201527f4e6f7420636f6e666f726d7320746f20657874656e73696f6e000000000000006044820152606401610cdf565b601380546001600160a01b0319166001600160a01b0383169081179091556040517f92597a601f19fe4d50f14ea76d7ba45d21bad7992f7e1709c605642b190de09290600090a250565b6012546000906001600160a01b031661126b57506009546001600160a01b031690565b905090565b506012546001600160a01b031690565b60006001600160a01b0382166112a4576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6112d2611cc2565b6112dc600061205c565b565b6112e6611cc2565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b15801561132857600080fd5b505afa15801561133c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113609190612cc3565b9050600061136c611243565b9050610b7a6001600160a01b03841682846120ae565b61138a611cc2565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6113b4611cc2565b600f55565b6113c1611cc2565b610b7a601783836126e6565b606060038054610ae390612c31565b6113e4611f0c565b600b544210156114295760405162461bcd60e51b815260206004820152601060248201526f14d85b19481b9bdd081cdd185c9d195960821b6044820152606401610cdf565b600e548111156114a15760405162461bcd60e51b815260206004820152603d60248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e204d41585f544f60448201527f4b454e535f5045525f4d494e5420746f6b656e73206174206f6e6365210000006064820152608401610cdf565b34600f54826114b09190612c82565b11156114fe5760405162461bcd60e51b815260206004820152601960248201527f496e636f6e73697374656e7420616d6f756e742073656e7421000000000000006044820152606401610cdf565b61150a81336000611f66565b6115146001600855565b50565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805b6015548110156115e457826001600160a01b0316601582815481106115ae576115ae612cdc565b6000918252602090912001546001600160a01b031614156115d25750600192915050565b806115dc81612cf2565b915050611587565b50600092915050565b6115f5611cc2565b60005b60155481101561165157816001600160a01b03166015828154811061161f5761161f612cdc565b6000918252602090912001546001600160a01b0316141561163f57611651565b8061164981612cf2565b9150506115f8565b6015805461166190600190612d0d565b8154811061167157611671612cdc565b600091825260209091200154601580546001600160a01b03909216918390811061169d5761169d612cdc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060158054806116dc576116dc612d24565b600082815260208120820160001990810180546001600160a01b03191690559091019091556040516001600160a01b038416917fe056b30f86b962fc88925cb7559e4364707cab11d2c52e090e6c0db62eb9113591a25050565b61173e611cc2565b601354600160a01b900460ff161561178c5760405162461bcd60e51b815260206004820152601160248201527026b4b73a34b7339034b990333937bd32b760791b6044820152606401610cdf565b42600b55565b61179d848484610dcd565b6001600160a01b0383163b156117d6576117b984848484612100565b6117d6576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6013546060906001600160a01b0316156118835760135460405163c87b56dd60e01b8152600481018490526000916001600160a01b03169063c87b56dd9060240160006040518083038186803b15801561183557600080fd5b505afa158015611849573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118719190810190612d3a565b8051909150156118815792915050565b505b60006019805461189290612c31565b905011156118cc576118a3826121f7565b60196040516020016118b6929190612db1565b6040516020818303038152906040529050919050565b610ace826121f7565b6118dd611cc2565b6013805460ff60a81b1916600160a81b179055565b6015818154811061190257600080fd5b6000918252602090912001546001600160a01b0316905081565b611924611f0c565b61192c611cc2565b600c5482111561198a5760405162461bcd60e51b815260206004820152602360248201527f5468617420776f756c642065786365656420746865206d61782072657365727660448201526232b21760e91b6064820152608401610cdf565b81600c546119989190612d0d565b600c556119a782826000611f66565b610c7e6001600855565b6119b9611cc2565b600019600b55565b6119c9611cc2565b60138054911515600160b01b0260ff60b01b19909216919091179055565b6119ef611cc2565b601354600160a01b900460ff1615611a3d5760405162461bcd60e51b815260206004820152601160248201527026b4b73a34b7339034b990333937bd32b760791b6044820152606401610cdf565b600b55565b6000611266611d57565b6060600060178054611a5d90612c31565b905011611a6c5761126661227b565b60178054610ae390612c31565b60135460009073a5409ec958c83c3f309868babaca7c86dcb077c190600160b01b900460ff168015611b2f575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015611aec57600080fd5b505afa158015611b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b249190612e62565b6001600160a01b0316145b15611b3e576001915050610ace565b6001600160a01b0380851660009081526007602090815260408083209387168352929052205460ff165b949350505050565b611b78611cc2565b6001600160a01b038116611bdd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cdf565b6115148161205c565b60168054611bf390612c31565b80601f0160208091040260200160405190810160405280929190818152602001828054611c1f90612c31565b8015611c6c5780601f10611c4157610100808354040283529160200191611c6c565b820191906000526020600020905b815481529060010190602001808311611c4f57829003601f168201915b505050505081565b60006301ffc9a760e01b6001600160e01b031983161480611ca557506380ac58cd60e01b6001600160e01b03198316145b80610ace5750506001600160e01b031916635b5e139f60e01b1490565b6009546001600160a01b031633146112dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cdf565b600081611d27611d57565b11158015611d36575060005482105b8015610ace575050600090815260046020526040902054600160e01b161590565b601354600090600160b81b900460ff16611d72576000611d75565b60015b60ff16905090565b60008180611d89611d57565b11611dda57600054811015611dda57600081815260046020526040902054600160e01b8116611dd8575b80611dd1575060001901600081815260046020526040902054611db3565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b80471015611e435760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610cdf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e90576040519150601f19603f3d011682016040523d82523d6000602084013e611e95565b606091505b5050905080610b7a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610cdf565b60026008541415611f5f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610cdf565b6002600855565b600d54600c5484611f7561228a565b611f7f9190612e7f565b611f899190612e7f565b1115611fd75760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656e6f75676820546f6b656e73206c6566742e0000000000000000006044820152606401610cdf565b6000611fe2600a5490565b9050611ffe83856040518060200160405280600081525061229d565b60005b848110156120395760006120158284612e7f565b6000908152601460205260409020849055508061203181612cf2565b915050612001565b5050505050565b600061204b83612303565b8015611dd15750611dd18383612336565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b7a9084906123bf565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612135903390899088908890600401612e97565b602060405180830381600087803b15801561214f57600080fd5b505af192505050801561217f575060408051601f3d908101601f1916820190925261217c91810190612ed4565b60015b6121da573d8080156121ad576040519150601f19603f3d011682016040523d82523d6000602084013e6121b2565b606091505b5080516121d2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606061220282611d1c565b61221f57604051630a14c4b560e41b815260040160405180910390fd5b600061222961227b565b905080516000141561224a5760405180602001604052806000815250611dd1565b8061225484612491565b604051602001612265929190612ef1565b6040516020818303038152906040529392505050565b606060188054610ae390612c31565b6000612294611d57565b60005403905090565b6122a783836124df565b6001600160a01b0383163b15610b7a576000548281035b6122d16000868380600101945086612100565b6122ee576040516368d2bf6b60e11b815260040160405180910390fd5b8181106122be57816000541461203957600080fd5b6000612316826301ffc9a760e01b612336565b8015610ace575061232f826001600160e01b0319612336565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d915060005190508280156123a8575060208210155b80156123b45750600081115b979650505050505050565b6000612414826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125d69092919063ffffffff16565b805190915015610b7a57808060200190518101906124329190612f20565b610b7a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cdf565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806124c8576124cd565b6124ab565b50819003601f19909101908152919050565b600054816125005760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146125af57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612577565b50816125cd57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6060611b68848460008585600080866001600160a01b031685876040516125fd9190612f3d565b60006040518083038185875af1925050503d806000811461263a576040519150601f19603f3d011682016040523d82523d6000602084013e61263f565b606091505b50915091506123b487838387606083156126b75782516126b0576001600160a01b0385163b6126b05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cdf565b5081611b68565b611b6883838151156126cc5781518083602001fd5b8060405162461bcd60e51b8152600401610cdf919061287e565b8280546126f290612c31565b90600052602060002090601f016020900481019282612714576000855561275a565b82601f1061272d5782800160ff1982351617855561275a565b8280016001018555821561275a579182015b8281111561275a57823582559160200191906001019061273f565b506127669291506127de565b5090565b82805461277690612c31565b90600052602060002090601f016020900481019282612798576000855561275a565b82601f106127b157805160ff191683800117855561275a565b8280016001018555821561275a579182015b8281111561275a5782518255916020019190600101906127c3565b5b8082111561276657600081556001016127df565b6001600160e01b03198116811461151457600080fd5b60006020828403121561281b57600080fd5b8135611dd1816127f3565b60005b83811015612841578181015183820152602001612829565b838111156117d65750506000910152565b6000815180845261286a816020860160208601612826565b601f01601f19169290920160200192915050565b602081526000611dd16020830184612852565b600080602083850312156128a457600080fd5b823567ffffffffffffffff808211156128bc57600080fd5b818501915085601f8301126128d057600080fd5b8135818111156128df57600080fd5b8660208285010111156128f157600080fd5b60209290920196919550909350505050565b60006020828403121561291557600080fd5b5035919050565b6001600160a01b038116811461151457600080fd5b6000806040838503121561294457600080fd5b823561294f8161291c565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561299c5761299c61295d565b604052919050565b600067ffffffffffffffff8211156129be576129be61295d565b50601f01601f191660200190565b60006129df6129da846129a4565b612973565b90508281528383830111156129f357600080fd5b828260208301376000602084830101529392505050565b600060208284031215612a1c57600080fd5b813567ffffffffffffffff811115612a3357600080fd5b8201601f81018413612a4457600080fd5b611b68848235602084016129cc565b600060208284031215612a6557600080fd5b8135611dd18161291c565b600080600060608486031215612a8557600080fd5b8335612a908161291c565b92506020840135612aa08161291c565b929592945050506040919091013590565b60008060408385031215612ac457600080fd5b50508035926020909101359150565b600080600060608486031215612ae857600080fd5b833592506020840135612aa08161291c565b801515811461151457600080fd5b60008060408385031215612b1b57600080fd5b8235612b268161291c565b91506020830135612b3681612afa565b809150509250929050565b60008060008060808587031215612b5757600080fd5b8435612b628161291c565b93506020850135612b728161291c565b925060408501359150606085013567ffffffffffffffff811115612b9557600080fd5b8501601f81018713612ba657600080fd5b612bb5878235602084016129cc565b91505092959194509250565b60008060408385031215612bd457600080fd5b823591506020830135612b368161291c565b600060208284031215612bf857600080fd5b8135611dd181612afa565b60008060408385031215612c1657600080fd5b8235612c218161291c565b91506020830135612b368161291c565b600181811c90821680612c4557607f821691505b60208210811415612c6657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612c9c57612c9c612c6c565b500290565b600082612cbe57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215612cd557600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612d0657612d06612c6c565b5060010190565b600082821015612d1f57612d1f612c6c565b500390565b634e487b7160e01b600052603160045260246000fd5b600060208284031215612d4c57600080fd5b815167ffffffffffffffff811115612d6357600080fd5b8201601f81018413612d7457600080fd5b8051612d826129da826129a4565b818152856020838501011115612d9757600080fd5b612da8826020830160208601612826565b95945050505050565b600083516020612dc48285838901612826565b845491840191600090600181811c9080831680612de257607f831692505b858310811415612e0057634e487b7160e01b85526022600452602485fd5b808015612e145760018114612e2557612e52565b60ff19851688528388019550612e52565b60008b81526020902060005b85811015612e4a5781548a820152908401908801612e31565b505083880195505b50939a9950505050505050505050565b600060208284031215612e7457600080fd5b8151611dd18161291c565b60008219821115612e9257612e92612c6c565b500190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612eca90830184612852565b9695505050505050565b600060208284031215612ee657600080fd5b8151611dd1816127f3565b60008351612f03818460208801612826565b835190830190612f17818360208801612826565b01949350505050565b600060208284031215612f3257600080fd5b8151611dd181612afa565b60008251612f4f818460208701612826565b919091019291505056fea2646970667358221220df640cd009ee44048fec9455199a34d23e574ffa6b52dbbaf40809e3b398b53f64736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009447261636f7269756d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000344434d0000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103a65760003560e01c80638dc251e3116101e7578063c87b56dd1161010d578063e6798baa116100a0578063f0ba84401161006f578063f0ba844014610a16578063f2fde38b14610a43578063fe60d12c14610a63578063ff1b655614610a7957600080fd5b8063e6798baa146109b6578063e6fd48bc146109cb578063e8a3d485146109e1578063e985e9c5146109f657600080fd5b8063ddd5e1b2116100dc578063ddd5e1b214610941578063e36b0b3714610961578063e43082f714610976578063e67151ae1461099657600080fd5b8063c87b56dd146108d6578063d5abeb01146108f6578063d69b2e451461090c578063db85d59c1461092157600080fd5b8063a0712d6811610185578063a769310a11610154578063a769310a14610878578063b66a0e5d14610898578063b88d4fde146108ad578063b8997a97146108c057600080fd5b8063a0712d6814610804578063a22cb46514610817578063a474935c14610837578063a4f6628d1461085857600080fd5b806395d89b41116101c157806395d89b41146107a35780639eb88b2c146107b85780639fbc8713146107ce578063a035b1fe146107ee57600080fd5b80638dc251e31461074357806391b7f5ed14610763578063938e3d7b1461078357600080fd5b80633e4086e5116102cc57806362a5af3b1161026a57806370a082311161023957806370a08231146106d0578063715018a6146106f057806389476069146107055780638da5cb5b1461072557600080fd5b806362a5af3b146106665780636352211e1461067b5780636b8533141461069b5780636e878ffb146106bb57600080fd5b8063507e094f116102a6578063507e094f146105f857806352ee46961461060e57806355f804b31461062e5780635c474f9e1461064e57600080fd5b80633e4086e5146105b257806342842e0e146105d25780634690521b146105e557600080fd5b8063170ff3e1116103445780632a30e4c2116103135780632a30e4c21461051d5780632a55205a1461053d57806333eeb1471461057c5780633ccfd60b1461059d57600080fd5b8063170ff3e1146104b557806318160ddd146104d557806320b7b8df146104ea57806323b872dd1461050a57600080fd5b80630768c618116103805780630768c61814610428578063081812fc1461044a578063095ea7b314610482578063109695231461049557600080fd5b806301ffc9a7146103b25780630563aae5146103e757806306fdde031461040657600080fd5b366103ad57005b600080fd5b3480156103be57600080fd5b506103d26103cd366004612809565b610a8e565b60405190151581526020015b60405180910390f35b3480156103f357600080fd5b506015545b6040519081526020016103de565b34801561041257600080fd5b5061041b610ad4565b6040516103de919061287e565b34801561043457600080fd5b50610448610443366004612891565b610b66565b005b34801561045657600080fd5b5061046a610465366004612903565b610b7f565b6040516001600160a01b0390911681526020016103de565b610448610490366004612931565b610bc3565b3480156104a157600080fd5b506104486104b0366004612a0a565b610c63565b3480156104c157600080fd5b506104486104d0366004612a53565b610c82565b3480156104e157600080fd5b506103f8610db6565b3480156104f657600080fd5b5060125461046a906001600160a01b031681565b610448610518366004612a70565b610dcd565b34801561052957600080fd5b50610448610538366004612a53565b610f5e565b34801561054957600080fd5b5061055d610558366004612ab1565b610fe2565b604080516001600160a01b0390931683526020830191909152016103de565b34801561058857600080fd5b506013546103d290600160a01b900460ff1681565b3480156105a957600080fd5b50610448611018565b3480156105be57600080fd5b506104486105cd366004612903565b611037565b6104486105e0366004612a70565b611044565b6104486105f3366004612ad3565b61105f565b34801561060457600080fd5b506103f8600e5481565b34801561061a57600080fd5b5060135461046a906001600160a01b031681565b34801561063a57600080fd5b50610448610649366004612891565b6110ee565b34801561065a57600080fd5b50600b544210156103d2565b34801561067257600080fd5b50610448611102565b34801561068757600080fd5b5061046a610696366004612903565b61111f565b3480156106a757600080fd5b506104486106b6366004612a53565b61112a565b3480156106c757600080fd5b5061046a611243565b3480156106dc57600080fd5b506103f86106eb366004612a53565b61127b565b3480156106fc57600080fd5b506104486112ca565b34801561071157600080fd5b50610448610720366004612a53565b6112de565b34801561073157600080fd5b506009546001600160a01b031661046a565b34801561074f57600080fd5b5061044861075e366004612a53565b611382565b34801561076f57600080fd5b5061044861077e366004612903565b6113ac565b34801561078f57600080fd5b5061044861079e366004612891565b6113b9565b3480156107af57600080fd5b5061041b6113cd565b3480156107c457600080fd5b506103f860001981565b3480156107da57600080fd5b5060115461046a906001600160a01b031681565b3480156107fa57600080fd5b506103f8600f5481565b610448610812366004612903565b6113dc565b34801561082357600080fd5b50610448610832366004612b08565b611517565b34801561084357600080fd5b506013546103d290600160a81b900460ff1681565b34801561086457600080fd5b506103d2610873366004612a53565b611583565b34801561088457600080fd5b50610448610893366004612a53565b6115ed565b3480156108a457600080fd5b50610448611736565b6104486108bb366004612b41565b611792565b3480156108cc57600080fd5b506103f860105481565b3480156108e257600080fd5b5061041b6108f1366004612903565b6117dc565b34801561090257600080fd5b506103f8600d5481565b34801561091857600080fd5b506104486118d5565b34801561092d57600080fd5b5061046a61093c366004612903565b6118f2565b34801561094d57600080fd5b5061044861095c366004612bc1565b61191c565b34801561096d57600080fd5b506104486119b1565b34801561098257600080fd5b50610448610991366004612be6565b6119c1565b3480156109a257600080fd5b506104486109b1366004612903565b6119e7565b3480156109c257600080fd5b506103f8611a42565b3480156109d757600080fd5b506103f8600b5481565b3480156109ed57600080fd5b5061041b611a4c565b348015610a0257600080fd5b506103d2610a11366004612c03565b611a79565b348015610a2257600080fd5b506103f8610a31366004612903565b60146020526000908152604090205481565b348015610a4f57600080fd5b50610448610a5e366004612a53565b611b70565b348015610a6f57600080fd5b506103f8600c5481565b348015610a8557600080fd5b5061041b611be6565b60006001600160e01b0319821663152a902d60e11b1480610abf57506001600160e01b03198216632675fdd760e21b145b80610ace5750610ace82611c74565b92915050565b606060028054610ae390612c31565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0f90612c31565b8015610b5c5780601f10610b3157610100808354040283529160200191610b5c565b820191906000526020600020905b815481529060010190602001808311610b3f57829003601f168201915b5050505050905090565b610b6e611cc2565b610b7a601983836126e6565b505050565b6000610b8a82611d1c565b610ba7576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610bce8261111f565b9050336001600160a01b03821614610c0757610bea8133611a79565b610c07576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610c6b611cc2565b8051610c7e90601690602084019061276a565b5050565b610c8a611cc2565b6001600160a01b038116301415610ce85760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e0000000060448201526064015b60405180910390fd5b610cf181611583565b15610d3e5760405162461bcd60e51b815260206004820152601760248201527f457874656e73696f6e20616c72656164792061646465640000000000000000006044820152606401610cdf565b6015805460018101825560009182527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4750180546001600160a01b0319166001600160a01b03841690811790915560405190917f99c6112dbaef85e57ac8ca86dd23e3c785162b58a6e810e5d5e7455b568d66b191a250565b6000610dc0611d57565b6001546000540303905090565b6000610dd882611d7d565b9050836001600160a01b0316816001600160a01b031614610e0b5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610e5857610e3b8633611a79565b610e5857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610e7f57604051633a954ecd60e21b815260040160405180910390fd5b8015610e8a57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610f155760018401600081815260046020526040902054610f13576000548114610f135760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610f66611cc2565b601354600160a81b900460ff1615610fc05760405162461bcd60e51b815260206004820152601760248201527f5061796f7574206368616e6765206973206c6f636b65640000000000000000006044820152606401610cdf565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6011546010546001600160a01b0390911690600090612710906110059085612c82565b61100f9190612ca1565b90509250929050565b611020611cc2565b47600061102b611243565b9050610c7e8183611df3565b61103f611cc2565b601055565b610b7a83838360405180602001604052806000815250611792565b61106833611583565b6110d15760405162461bcd60e51b815260206004820152603460248201527f457874656e73696f6e2073686f756c6420626520616464656420746f20636f6e6044820152737472616374206265666f7265206d696e74696e6760601b6064820152608401610cdf565b6110d9611f0c565b6110e4838383611f66565b610b7a6001600855565b6110f6611cc2565b610b7a601883836126e6565b61110a611cc2565b6013805460ff60a01b1916600160a01b179055565b6000610ace82611d7d565b611132611cc2565b6001600160a01b03811630141561118b5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610cdf565b6001600160a01b03811615806111ad57506111ad8163c87b56dd60e01b612040565b6111f95760405162461bcd60e51b815260206004820152601960248201527f4e6f7420636f6e666f726d7320746f20657874656e73696f6e000000000000006044820152606401610cdf565b601380546001600160a01b0319166001600160a01b0383169081179091556040517f92597a601f19fe4d50f14ea76d7ba45d21bad7992f7e1709c605642b190de09290600090a250565b6012546000906001600160a01b031661126b57506009546001600160a01b031690565b905090565b506012546001600160a01b031690565b60006001600160a01b0382166112a4576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6112d2611cc2565b6112dc600061205c565b565b6112e6611cc2565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b15801561132857600080fd5b505afa15801561133c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113609190612cc3565b9050600061136c611243565b9050610b7a6001600160a01b03841682846120ae565b61138a611cc2565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6113b4611cc2565b600f55565b6113c1611cc2565b610b7a601783836126e6565b606060038054610ae390612c31565b6113e4611f0c565b600b544210156114295760405162461bcd60e51b815260206004820152601060248201526f14d85b19481b9bdd081cdd185c9d195960821b6044820152606401610cdf565b600e548111156114a15760405162461bcd60e51b815260206004820152603d60248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e204d41585f544f60448201527f4b454e535f5045525f4d494e5420746f6b656e73206174206f6e6365210000006064820152608401610cdf565b34600f54826114b09190612c82565b11156114fe5760405162461bcd60e51b815260206004820152601960248201527f496e636f6e73697374656e7420616d6f756e742073656e7421000000000000006044820152606401610cdf565b61150a81336000611f66565b6115146001600855565b50565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805b6015548110156115e457826001600160a01b0316601582815481106115ae576115ae612cdc565b6000918252602090912001546001600160a01b031614156115d25750600192915050565b806115dc81612cf2565b915050611587565b50600092915050565b6115f5611cc2565b60005b60155481101561165157816001600160a01b03166015828154811061161f5761161f612cdc565b6000918252602090912001546001600160a01b0316141561163f57611651565b8061164981612cf2565b9150506115f8565b6015805461166190600190612d0d565b8154811061167157611671612cdc565b600091825260209091200154601580546001600160a01b03909216918390811061169d5761169d612cdc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060158054806116dc576116dc612d24565b600082815260208120820160001990810180546001600160a01b03191690559091019091556040516001600160a01b038416917fe056b30f86b962fc88925cb7559e4364707cab11d2c52e090e6c0db62eb9113591a25050565b61173e611cc2565b601354600160a01b900460ff161561178c5760405162461bcd60e51b815260206004820152601160248201527026b4b73a34b7339034b990333937bd32b760791b6044820152606401610cdf565b42600b55565b61179d848484610dcd565b6001600160a01b0383163b156117d6576117b984848484612100565b6117d6576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6013546060906001600160a01b0316156118835760135460405163c87b56dd60e01b8152600481018490526000916001600160a01b03169063c87b56dd9060240160006040518083038186803b15801561183557600080fd5b505afa158015611849573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118719190810190612d3a565b8051909150156118815792915050565b505b60006019805461189290612c31565b905011156118cc576118a3826121f7565b60196040516020016118b6929190612db1565b6040516020818303038152906040529050919050565b610ace826121f7565b6118dd611cc2565b6013805460ff60a81b1916600160a81b179055565b6015818154811061190257600080fd5b6000918252602090912001546001600160a01b0316905081565b611924611f0c565b61192c611cc2565b600c5482111561198a5760405162461bcd60e51b815260206004820152602360248201527f5468617420776f756c642065786365656420746865206d61782072657365727660448201526232b21760e91b6064820152608401610cdf565b81600c546119989190612d0d565b600c556119a782826000611f66565b610c7e6001600855565b6119b9611cc2565b600019600b55565b6119c9611cc2565b60138054911515600160b01b0260ff60b01b19909216919091179055565b6119ef611cc2565b601354600160a01b900460ff1615611a3d5760405162461bcd60e51b815260206004820152601160248201527026b4b73a34b7339034b990333937bd32b760791b6044820152606401610cdf565b600b55565b6000611266611d57565b6060600060178054611a5d90612c31565b905011611a6c5761126661227b565b60178054610ae390612c31565b60135460009073a5409ec958c83c3f309868babaca7c86dcb077c190600160b01b900460ff168015611b2f575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015611aec57600080fd5b505afa158015611b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b249190612e62565b6001600160a01b0316145b15611b3e576001915050610ace565b6001600160a01b0380851660009081526007602090815260408083209387168352929052205460ff165b949350505050565b611b78611cc2565b6001600160a01b038116611bdd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cdf565b6115148161205c565b60168054611bf390612c31565b80601f0160208091040260200160405190810160405280929190818152602001828054611c1f90612c31565b8015611c6c5780601f10611c4157610100808354040283529160200191611c6c565b820191906000526020600020905b815481529060010190602001808311611c4f57829003601f168201915b505050505081565b60006301ffc9a760e01b6001600160e01b031983161480611ca557506380ac58cd60e01b6001600160e01b03198316145b80610ace5750506001600160e01b031916635b5e139f60e01b1490565b6009546001600160a01b031633146112dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cdf565b600081611d27611d57565b11158015611d36575060005482105b8015610ace575050600090815260046020526040902054600160e01b161590565b601354600090600160b81b900460ff16611d72576000611d75565b60015b60ff16905090565b60008180611d89611d57565b11611dda57600054811015611dda57600081815260046020526040902054600160e01b8116611dd8575b80611dd1575060001901600081815260046020526040902054611db3565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b80471015611e435760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610cdf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e90576040519150601f19603f3d011682016040523d82523d6000602084013e611e95565b606091505b5050905080610b7a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610cdf565b60026008541415611f5f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610cdf565b6002600855565b600d54600c5484611f7561228a565b611f7f9190612e7f565b611f899190612e7f565b1115611fd75760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656e6f75676820546f6b656e73206c6566742e0000000000000000006044820152606401610cdf565b6000611fe2600a5490565b9050611ffe83856040518060200160405280600081525061229d565b60005b848110156120395760006120158284612e7f565b6000908152601460205260409020849055508061203181612cf2565b915050612001565b5050505050565b600061204b83612303565b8015611dd15750611dd18383612336565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b7a9084906123bf565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612135903390899088908890600401612e97565b602060405180830381600087803b15801561214f57600080fd5b505af192505050801561217f575060408051601f3d908101601f1916820190925261217c91810190612ed4565b60015b6121da573d8080156121ad576040519150601f19603f3d011682016040523d82523d6000602084013e6121b2565b606091505b5080516121d2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606061220282611d1c565b61221f57604051630a14c4b560e41b815260040160405180910390fd5b600061222961227b565b905080516000141561224a5760405180602001604052806000815250611dd1565b8061225484612491565b604051602001612265929190612ef1565b6040516020818303038152906040529392505050565b606060188054610ae390612c31565b6000612294611d57565b60005403905090565b6122a783836124df565b6001600160a01b0383163b15610b7a576000548281035b6122d16000868380600101945086612100565b6122ee576040516368d2bf6b60e11b815260040160405180910390fd5b8181106122be57816000541461203957600080fd5b6000612316826301ffc9a760e01b612336565b8015610ace575061232f826001600160e01b0319612336565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d915060005190508280156123a8575060208210155b80156123b45750600081115b979650505050505050565b6000612414826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125d69092919063ffffffff16565b805190915015610b7a57808060200190518101906124329190612f20565b610b7a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610cdf565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806124c8576124cd565b6124ab565b50819003601f19909101908152919050565b600054816125005760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146125af57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612577565b50816125cd57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6060611b68848460008585600080866001600160a01b031685876040516125fd9190612f3d565b60006040518083038185875af1925050503d806000811461263a576040519150601f19603f3d011682016040523d82523d6000602084013e61263f565b606091505b50915091506123b487838387606083156126b75782516126b0576001600160a01b0385163b6126b05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610cdf565b5081611b68565b611b6883838151156126cc5781518083602001fd5b8060405162461bcd60e51b8152600401610cdf919061287e565b8280546126f290612c31565b90600052602060002090601f016020900481019282612714576000855561275a565b82601f1061272d5782800160ff1982351617855561275a565b8280016001018555821561275a579182015b8281111561275a57823582559160200191906001019061273f565b506127669291506127de565b5090565b82805461277690612c31565b90600052602060002090601f016020900481019282612798576000855561275a565b82601f106127b157805160ff191683800117855561275a565b8280016001018555821561275a579182015b8281111561275a5782518255916020019190600101906127c3565b5b8082111561276657600081556001016127df565b6001600160e01b03198116811461151457600080fd5b60006020828403121561281b57600080fd5b8135611dd1816127f3565b60005b83811015612841578181015183820152602001612829565b838111156117d65750506000910152565b6000815180845261286a816020860160208601612826565b601f01601f19169290920160200192915050565b602081526000611dd16020830184612852565b600080602083850312156128a457600080fd5b823567ffffffffffffffff808211156128bc57600080fd5b818501915085601f8301126128d057600080fd5b8135818111156128df57600080fd5b8660208285010111156128f157600080fd5b60209290920196919550909350505050565b60006020828403121561291557600080fd5b5035919050565b6001600160a01b038116811461151457600080fd5b6000806040838503121561294457600080fd5b823561294f8161291c565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561299c5761299c61295d565b604052919050565b600067ffffffffffffffff8211156129be576129be61295d565b50601f01601f191660200190565b60006129df6129da846129a4565b612973565b90508281528383830111156129f357600080fd5b828260208301376000602084830101529392505050565b600060208284031215612a1c57600080fd5b813567ffffffffffffffff811115612a3357600080fd5b8201601f81018413612a4457600080fd5b611b68848235602084016129cc565b600060208284031215612a6557600080fd5b8135611dd18161291c565b600080600060608486031215612a8557600080fd5b8335612a908161291c565b92506020840135612aa08161291c565b929592945050506040919091013590565b60008060408385031215612ac457600080fd5b50508035926020909101359150565b600080600060608486031215612ae857600080fd5b833592506020840135612aa08161291c565b801515811461151457600080fd5b60008060408385031215612b1b57600080fd5b8235612b268161291c565b91506020830135612b3681612afa565b809150509250929050565b60008060008060808587031215612b5757600080fd5b8435612b628161291c565b93506020850135612b728161291c565b925060408501359150606085013567ffffffffffffffff811115612b9557600080fd5b8501601f81018713612ba657600080fd5b612bb5878235602084016129cc565b91505092959194509250565b60008060408385031215612bd457600080fd5b823591506020830135612b368161291c565b600060208284031215612bf857600080fd5b8135611dd181612afa565b60008060408385031215612c1657600080fd5b8235612c218161291c565b91506020830135612b368161291c565b600181811c90821680612c4557607f821691505b60208210811415612c6657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612c9c57612c9c612c6c565b500290565b600082612cbe57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215612cd557600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612d0657612d06612c6c565b5060010190565b600082821015612d1f57612d1f612c6c565b500390565b634e487b7160e01b600052603160045260246000fd5b600060208284031215612d4c57600080fd5b815167ffffffffffffffff811115612d6357600080fd5b8201601f81018413612d7457600080fd5b8051612d826129da826129a4565b818152856020838501011115612d9757600080fd5b612da8826020830160208601612826565b95945050505050565b600083516020612dc48285838901612826565b845491840191600090600181811c9080831680612de257607f831692505b858310811415612e0057634e487b7160e01b85526022600452602485fd5b808015612e145760018114612e2557612e52565b60ff19851688528388019550612e52565b60008b81526020902060005b85811015612e4a5781548a820152908401908801612e31565b505083880195505b50939a9950505050505050505050565b600060208284031215612e7457600080fd5b8151611dd18161291c565b60008219821115612e9257612e92612c6c565b500190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612eca90830184612852565b9695505050505050565b600060208284031215612ee657600080fd5b8151611dd1816127f3565b60008351612f03818460208801612826565b835190830190612f17818360208801612826565b01949350505050565b600060208284031215612f3257600080fd5b8151611dd181612afa565b60008251612f4f818460208701612826565b919091019291505056fea2646970667358221220df640cd009ee44048fec9455199a34d23e574ffa6b52dbbaf40809e3b398b53f64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009447261636f7269756d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000344434d0000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _price (uint256): 0
Arg [1] : _maxSupply (uint256): 10000
Arg [2] : _nReserved (uint256): 50
Arg [3] : _maxPerMint (uint256): 5
Arg [4] : _royaltyFee (uint256): 0
Arg [5] : _uri (string):
Arg [6] : _name (string): Dracorium
Arg [7] : _symbol (string): DCM
Arg [8] : _startAtOne (bool): True
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [11] : 447261636f7269756d0000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [13] : 44434d0000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
OVERVIEW
Hold Dracoriums, earn future rewards. Every Dracorium is eligible to earn 25% of project royalties soon after mint.Dracoriums exist on the Ethereum blockchain, every NFT is unique and serves a purpose. Holders will have the opportunity to participate in our upcoming P2E game...Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.