Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 726 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 21236023 | 2 days ago | IN | 0 ETH | 0.00138431 | ||||
Set Approval For... | 21165053 | 12 days ago | IN | 0 ETH | 0.00052543 | ||||
Set Approval For... | 21137911 | 15 days ago | IN | 0 ETH | 0.00095422 | ||||
Set Approval For... | 21128766 | 17 days ago | IN | 0 ETH | 0.00087608 | ||||
Set Approval For... | 21095038 | 21 days ago | IN | 0 ETH | 0.00029345 | ||||
Set Approval For... | 21079221 | 24 days ago | IN | 0 ETH | 0.00140429 | ||||
Set Approval For... | 21009015 | 33 days ago | IN | 0 ETH | 0.00045278 | ||||
Set Approval For... | 21008950 | 33 days ago | IN | 0 ETH | 0.00041739 | ||||
Set Approval For... | 20986461 | 37 days ago | IN | 0 ETH | 0.00142327 | ||||
Set Approval For... | 20898484 | 49 days ago | IN | 0 ETH | 0.00020277 | ||||
Set Approval For... | 20861740 | 54 days ago | IN | 0 ETH | 0.00040684 | ||||
Transfer From | 20837848 | 57 days ago | IN | 0 ETH | 0.000704 | ||||
Safe Transfer Fr... | 20819211 | 60 days ago | IN | 0 ETH | 0.00222269 | ||||
Set Approval For... | 20808766 | 61 days ago | IN | 0 ETH | 0.00041614 | ||||
Set Approval For... | 20793164 | 64 days ago | IN | 0 ETH | 0.0010144 | ||||
Set Approval For... | 20747467 | 70 days ago | IN | 0 ETH | 0.00007924 | ||||
Set Approval For... | 20712259 | 75 days ago | IN | 0 ETH | 0.00021359 | ||||
Set Approval For... | 20578333 | 94 days ago | IN | 0 ETH | 0.0003401 | ||||
Set Approval For... | 20534575 | 100 days ago | IN | 0 ETH | 0.00025791 | ||||
Set Approval For... | 20524768 | 101 days ago | IN | 0 ETH | 0.00009818 | ||||
Set Approval For... | 20492488 | 106 days ago | IN | 0 ETH | 0.00023665 | ||||
Set Approval For... | 20471656 | 108 days ago | IN | 0 ETH | 0.00012969 | ||||
Set Approval For... | 20458326 | 110 days ago | IN | 0 ETH | 0.0000787 | ||||
Set Approval For... | 20458183 | 110 days ago | IN | 0 ETH | 0.00012147 | ||||
Set Approval For... | 20453158 | 111 days ago | IN | 0 ETH | 0.00004884 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
19291677 | 274 days ago | 1.425 ETH | ||||
19291677 | 274 days ago | 0.075 ETH | ||||
19291675 | 274 days ago | 1.425 ETH | ||||
19291675 | 274 days ago | 0.075 ETH | ||||
19291675 | 274 days ago | 1.425 ETH | ||||
19291675 | 274 days ago | 0.075 ETH | ||||
19291670 | 274 days ago | 1.425 ETH | ||||
19291670 | 274 days ago | 0.075 ETH | ||||
19291669 | 274 days ago | 1.425 ETH | ||||
19291669 | 274 days ago | 0.075 ETH | ||||
19291666 | 274 days ago | 1.425 ETH | ||||
19291666 | 274 days ago | 0.075 ETH | ||||
19291662 | 274 days ago | 1.425 ETH | ||||
19291662 | 274 days ago | 0.075 ETH | ||||
19291662 | 274 days ago | 2.85 ETH | ||||
19291662 | 274 days ago | 0.15 ETH | ||||
19291662 | 274 days ago | 1.425 ETH | ||||
19291662 | 274 days ago | 0.075 ETH | ||||
19291645 | 274 days ago | 1.425 ETH | ||||
19291645 | 274 days ago | 0.075 ETH | ||||
19291640 | 274 days ago | 1.425 ETH | ||||
19291640 | 274 days ago | 0.075 ETH | ||||
19291640 | 274 days ago | 1.425 ETH | ||||
19291640 | 274 days ago | 0.075 ETH | ||||
19291640 | 274 days ago | 1.425 ETH |
Loading...
Loading
Contract Name:
HyperMintERC721A_2_3_0
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; import '@openzeppelin/contracts/interfaces/IERC2981.sol'; import '@openzeppelin/contracts/interfaces/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import './Ownable_1_0_0.sol'; import './Interfaces/IHyperMintERC721A_2_3_0.sol'; import 'erc721a/contracts/extensions/ERC721ABurnable.sol'; contract HyperMintERC721A_2_3_0 is IHyperMintERC721A_2_3_0, ERC721ABurnable, Ownable { using SafeERC20 for IERC20; /* ================= STATE VARIABLES ================= */ // ========= Immutable Storage ========= uint256 internal constant BASIS_POINTS = 10000; // ========== Mutable Storage ========== string public constant version = '2.3.0'; GeneralConfig public generalConfig; TokenConfig public tokenConfig; Addresses public addresses; /* =================== CONSTRUCTOR =================== */ /// @param _generalConfig settings for the contract /// @param _tokenConfig settings for tokens minted by the contract /// @param _addresses a collection of addresses constructor( GeneralConfig memory _generalConfig, TokenConfig memory _tokenConfig, Addresses memory _addresses ) ERC721A('', '') { _transferOwnership(_addresses.collectionOwnerAddress); generalConfig = _generalConfig; tokenConfig = _tokenConfig; addresses = _addresses; } /* ====================== Views ====================== */ function name() public view override(IHyperMintERC721A_2_3_0, ERC721A, IERC721A) returns (string memory collectionName) { collectionName = generalConfig.name; } function symbol() public view override(IHyperMintERC721A_2_3_0, ERC721A, IERC721A) returns (string memory collectionSymbol) { collectionSymbol = generalConfig.symbol; } function supply() external view override returns (uint256 _supply) { _supply = _totalMinted(); } function totalMinted( address addr ) external view override returns (uint256 numMinted) { numMinted = _numberMinted(addr); } function contractURI() public view override returns (string memory uri) { uri = generalConfig.contractMetadataUrl; } function tokenURI( uint256 _tokenId ) public view override(IHyperMintERC721A_2_3_0, ERC721A, IERC721A) returns (string memory uri) { if (!_exists(_tokenId)) revert NonExistentToken(); uri = string( abi.encodePacked( generalConfig.tokenMetadataUrl, _toString(_tokenId) ) ); } function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view override returns (address royaltyAddress, uint256 royaltyAmount) { /// @dev secondary royalty to be paid out by the marketplace /// to the splitter contract royaltyAddress = addresses.secondaryRoyaltyAddress; royaltyAmount = (_salePrice * generalConfig.secondaryRoyaltyFee) / BASIS_POINTS; } function supportsInterface( bytes4 _interfaceId ) public view override(IHyperMintERC721A_2_3_0, ERC721A, IERC721A) returns (bool result) { result = (_interfaceId == type(IERC2981).interfaceId || _interfaceId == bytes4(0x49064906) || super.supportsInterface(_interfaceId)); } /* ================ MUTATIVE FUNCTIONS ================ */ // ============ Restricted ============= function setNameAndSymbol( string calldata _newName, string calldata _newSymbol ) external override onlyContractManager { generalConfig.name = _newName; generalConfig.symbol = _newSymbol; } function setMetadataURIs( string calldata _contractURI, string calldata _tokenURI ) external override onlyContractManager { generalConfig.contractMetadataUrl = _contractURI; generalConfig.tokenMetadataUrl = _tokenURI; /// @dev trigger a metadata refresh of all tokens /// minted so far, starting with tokenId 1 if (totalSupply() != 0) { emit BatchMetadataUpdate(1, _nextTokenId() - 1); } } function setDates( uint256 _publicSale, uint256 _saleClosed ) external override onlyContractManager { generalConfig.publicSaleDate = _publicSale; generalConfig.saleCloseDate = _saleClosed; } function setTokenConfig( uint256 _price, uint256 _maxSupply, uint256 _maxPerTransaction ) external override onlyContractManager { if (totalSupply() > _maxSupply) revert NewSupplyTooLow(); tokenConfig.price = _price; tokenConfig.maxSupply = _maxSupply; tokenConfig.maxPerTransaction = _maxPerTransaction; } function setAddresses( Addresses calldata _addresses ) external override onlyContractManager { if (_addresses.recoveryAddress != addresses.recoveryAddress) revert ImmutableRecoveryAddress(); if ( addresses.collectionOwnerAddress != _addresses.collectionOwnerAddress ) { _transferOwnership(_addresses.collectionOwnerAddress); } addresses = _addresses; } function setAllowBuy(bool _allowBuy) external override onlyContractManager { generalConfig.allowBuy = _allowBuy; } function setAllowPublicTransfer( bool _allowPublicTransfer ) external override onlyContractManager { generalConfig.allowPublicTransfer = _allowPublicTransfer; } function setRoyalty( uint256 _primaryFee, uint256 _secondaryFee ) external override onlyContractManager { generalConfig.primaryRoyaltyFee = _primaryFee; generalConfig.secondaryRoyaltyFee = _secondaryFee; } // ============== Minting ============== function mintBatch( address[] calldata _accounts, uint256[] calldata _amounts ) external override onlyContractManager nonContract { uint256 length = _accounts.length; for (uint256 i = 0; i < length; ) { address account = _accounts[i]; uint256 amount = _amounts[i]; if (_totalMinted() + amount > tokenConfig.maxSupply) revert MaxSupplyExceeded(); _mint(account, amount); unchecked { i += 1; } } } // ================ Buy ================ function buyAuthorised( uint256 _amount, uint256 _totalPrice, uint256 _maxPerAddress, uint256 _expires, bytes calldata _signature ) external payable override buyAllowed nonContract { if (block.timestamp >= _expires) revert SignatureExpired(); bytes32 hash = keccak256( abi.encodePacked( address(this), msg.sender, _amount, _totalPrice, _maxPerAddress, _expires ) ); bytes32 message = ECDSA.toEthSignedMessageHash(hash); if ( ECDSA.recover(message, _signature) != addresses.authorisationAddress ) revert NotAuthorised(); if (_maxPerAddress != 0) { if (_numberMinted(msg.sender) + _amount > _maxPerAddress) revert MaxPerAddressExceeded(); } _buy(_amount, _totalPrice); } function buy( uint256 _amount ) external payable override buyAllowed nonContract { if ( generalConfig.publicSaleDate == 0 || block.timestamp < generalConfig.publicSaleDate ) revert PublicSaleClosed(); uint256 totalPrice = tokenConfig.price * _amount; _buy(_amount, totalPrice); } function _buy(uint256 _amount, uint256 _totalPrice) internal { if (generalConfig.saleCloseDate != 0) { if (block.timestamp >= generalConfig.saleCloseDate) revert SaleClosed(); } if (_totalMinted() + _amount > tokenConfig.maxSupply) revert MaxSupplyExceeded(); if (tokenConfig.maxPerTransaction != 0) { if (_amount > tokenConfig.maxPerTransaction) revert MaxPerTransactionExceeded(); } uint256 royaltyAmount = (_totalPrice * generalConfig.primaryRoyaltyFee) / BASIS_POINTS; if (addresses.purchaseTokenAddress != address(0)) { IERC20 token = IERC20(addresses.purchaseTokenAddress); /// @dev primary royalty cut for HyperMint if (royaltyAmount != 0) { // only transfer if royaltyAmount is non-zero so we don't waste gas token.safeTransferFrom( msg.sender, addresses.managerPrimaryRoyaltyAddress, royaltyAmount ); } /// @dev primary sale (i.e. minting revenue) for customer (or its payees) token.safeTransferFrom( msg.sender, addresses.customerPrimaryRoyaltyAddress, _totalPrice - royaltyAmount ); } else { if (msg.value < _totalPrice) revert InsufficientPaymentValue(); /// @dev primary royalty cut for HyperMint if (royaltyAmount != 0) { // only transfer if royaltyAmount is non-zero so we don't waste gas (bool successManager, ) = addresses .managerPrimaryRoyaltyAddress .call{value: royaltyAmount}(''); if (!successManager) revert PayoutToManagerFailed(); } /// @dev primary sale (i.e. minting revenue) for customer (or its payees) (bool successCustomer, ) = addresses .customerPrimaryRoyaltyAddress .call{value: _totalPrice - royaltyAmount}(''); if (!successCustomer) revert PayoutToCustomerFailed(); } /// @dev mint tokens _mint(msg.sender, _amount); } // ================ Transfers ================ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override transferAllowed(from, to) { super._beforeTokenTransfers(from, to, startTokenId, quantity); } function transferAuthorised( address _from, address _to, uint256 _tokenId, uint256 _expires, bytes calldata _signature ) external override nonContract { if (block.timestamp >= _expires) revert SignatureExpired(); bytes32 hash = keccak256( abi.encodePacked( address(this), msg.sender, _from, _to, _tokenId, _expires ) ); bytes32 message = ECDSA.toEthSignedMessageHash(hash); if ( ECDSA.recover(message, _signature) != addresses.authorisationAddress ) revert NotAuthorised(); super.safeTransferFrom(_from, _to, _tokenId); } // ============= Ownership ============= function recoverContract() external { if (msg.sender != addresses.recoveryAddress) revert NotAuthorised(); _transferContractManager(addresses.recoveryAddress); } function _startTokenId() internal pure override returns (uint256 tokenId) { tokenId = 1; } /* ==================== MODIFIERS ===================== */ modifier buyAllowed() { if (!generalConfig.allowBuy) revert BuyDisabled(); _; } /// @dev this eliminates the possibility of being called /// from a contract modifier nonContract() { if (tx.origin != msg.sender) revert ContractCallBlocked(); _; } modifier transferAllowed(address from, address to) { bool isMinting = from == address(0); bool isBurning = to == address(0); bool isContractManager = from == this.contractManager(); bool isTransferAuthorised = msg.sig == this.transferAuthorised.selector; if ( !isMinting && !isContractManager && !isBurning && !isTransferAuthorised ) { if (!generalConfig.allowPublicTransfer) revert TransfersDisabled(); } _; } }
// 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.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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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 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 (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.4; import '@openzeppelin/contracts/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; address private _contractManager; event ContractManagerTransferred( address indexed previousContractManager, address indexed newContractManager ); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferContractManager(msg.sender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), 'Ownable: new owner is the zero address' ); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev Returns the manager of the contract */ function contractManager() public view virtual returns (address) { return _contractManager; } /** * @dev Throws if called by any account other than the Contract Manager. */ modifier onlyContractManager() { require( _msgSender() == _contractManager, 'Ownable: caller is not the contract manager' ); _; } /** * @dev Transfers manager of the contract to a new account (`newContractManager`). * Can only be called by the current _contractManager. */ function transferContractManager(address newContractManager) public virtual onlyContractManager { require( newContractManager != address(0), 'Ownable: new contract owner is the zero address' ); _transferContractManager(newContractManager); } /** * @dev Transfers management of the contract to a new account (`newContractManager`). * Internal function without access restriction. */ function _transferContractManager(address newContractManager) internal virtual { address oldContractManager = _contractManager; _contractManager = newContractManager; emit ContractManagerTransferred(oldContractManager, newContractManager); } }
// 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 v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; import 'erc721a/contracts/interfaces/IERC721A.sol'; import './IERC4906.sol'; // ============== Structs ============== struct GeneralConfig { string name; string symbol; string contractMetadataUrl; string tokenMetadataUrl; bool allowBuy; bool allowPublicTransfer; uint256 publicSaleDate; uint256 saleCloseDate; uint256 primaryRoyaltyFee; uint256 secondaryRoyaltyFee; } struct TokenConfig { uint256 price; uint256 maxSupply; uint256 maxPerTransaction; } struct Addresses { address recoveryAddress; address collectionOwnerAddress; address authorisationAddress; address purchaseTokenAddress; address managerPrimaryRoyaltyAddress; address customerPrimaryRoyaltyAddress; address secondaryRoyaltyAddress; } interface IHyperMintERC721A_2_3_0 is IERC4906 { /* ================= CUSTOM ERRORS ================= */ error NewSupplyTooLow(); error MaxSupplyExceeded(); error SignatureExpired(); error NotAuthorised(); error BuyDisabled(); error InsufficientPaymentValue(); error PublicSaleClosed(); error SaleClosed(); error MaxPerAddressExceeded(); error MaxPerTransactionExceeded(); error NonExistentToken(); error ContractCallBlocked(); error ImmutableRecoveryAddress(); error TransfersDisabled(); error PayoutToManagerFailed(); error PayoutToCustomerFailed(); /* ====================== Views ====================== */ function name() external view returns (string memory collectionName); function symbol() external view returns (string memory collectionSymbol); function supply() external view returns (uint256 _supply); function totalMinted( address _addr ) external view returns (uint256 numMinted); function contractURI() external view returns (string memory uri); function tokenURI( uint256 _tokenId ) external view returns (string memory uri); function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view returns (address royaltyAddress, uint256 royaltyAmount); function supportsInterface( bytes4 _interfaceId ) external view returns (bool result); /* ================ MUTATIVE FUNCTIONS ================ */ // ============ Restricted ============= function setNameAndSymbol( string calldata _name, string calldata _symbol ) external; function setMetadataURIs( string calldata _contractUri, string calldata _tokenUri ) external; function setDates(uint256 _publicSale, uint256 _saleClosed) external; function setTokenConfig( uint256 _price, uint256 _maxSupply, uint256 _maxPerTransaction ) external; function setAddresses(Addresses calldata _addresses) external; function setAllowBuy(bool allowBuy) external; function setAllowPublicTransfer(bool _allowPublicTransfer) external; function setRoyalty(uint256 primaryFee, uint256 secondaryFee) external; // ============== Minting ============== function mintBatch( address[] calldata _accounts, uint256[] calldata _amounts ) external; // ================ Buy ================ function buyAuthorised( uint256 _amount, uint256 _totalPrice, uint256 _maxPerAddress, uint256 _expires, bytes calldata _signature ) external payable; function buy(uint256 _amount) external payable; // ================ Transfers ================ function transferAuthorised( address _from, address _to, uint256 _tokenId, uint256 _expires, bytes calldata _signature ) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnable.sol'; import '../ERC721A.sol'; /** * @title ERC721ABurnable. * * @dev ERC721A token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// 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) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol';
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import '@openzeppelin/contracts/interfaces/IERC165.sol'; import 'erc721a/contracts/interfaces/IERC721A.sol'; interface IERC4906 is IERC165, IERC721A { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); /// @dev See {IERC165-supportsInterface}. function supportsInterface( bytes4 interfaceId ) external view override(IERC165, IERC721A) returns (bool); }
// 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 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721ABurnable. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs" }, "optimizer": { "enabled": true, "runs": 1000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"contractMetadataUrl","type":"string"},{"internalType":"string","name":"tokenMetadataUrl","type":"string"},{"internalType":"bool","name":"allowBuy","type":"bool"},{"internalType":"bool","name":"allowPublicTransfer","type":"bool"},{"internalType":"uint256","name":"publicSaleDate","type":"uint256"},{"internalType":"uint256","name":"saleCloseDate","type":"uint256"},{"internalType":"uint256","name":"primaryRoyaltyFee","type":"uint256"},{"internalType":"uint256","name":"secondaryRoyaltyFee","type":"uint256"}],"internalType":"struct GeneralConfig","name":"_generalConfig","type":"tuple"},{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerTransaction","type":"uint256"}],"internalType":"struct TokenConfig","name":"_tokenConfig","type":"tuple"},{"components":[{"internalType":"address","name":"recoveryAddress","type":"address"},{"internalType":"address","name":"collectionOwnerAddress","type":"address"},{"internalType":"address","name":"authorisationAddress","type":"address"},{"internalType":"address","name":"purchaseTokenAddress","type":"address"},{"internalType":"address","name":"managerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"customerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"secondaryRoyaltyAddress","type":"address"}],"internalType":"struct Addresses","name":"_addresses","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BuyDisabled","type":"error"},{"inputs":[],"name":"ContractCallBlocked","type":"error"},{"inputs":[],"name":"ImmutableRecoveryAddress","type":"error"},{"inputs":[],"name":"InsufficientPaymentValue","type":"error"},{"inputs":[],"name":"MaxPerAddressExceeded","type":"error"},{"inputs":[],"name":"MaxPerTransactionExceeded","type":"error"},{"inputs":[],"name":"MaxSupplyExceeded","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewSupplyTooLow","type":"error"},{"inputs":[],"name":"NonExistentToken","type":"error"},{"inputs":[],"name":"NotAuthorised","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PayoutToCustomerFailed","type":"error"},{"inputs":[],"name":"PayoutToManagerFailed","type":"error"},{"inputs":[],"name":"PublicSaleClosed","type":"error"},{"inputs":[],"name":"SaleClosed","type":"error"},{"inputs":[],"name":"SignatureExpired","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"TransfersDisabled","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":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","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":"previousContractManager","type":"address"},{"indexed":true,"internalType":"address","name":"newContractManager","type":"address"}],"name":"ContractManagerTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","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":"addresses","outputs":[{"internalType":"address","name":"recoveryAddress","type":"address"},{"internalType":"address","name":"collectionOwnerAddress","type":"address"},{"internalType":"address","name":"authorisationAddress","type":"address"},{"internalType":"address","name":"purchaseTokenAddress","type":"address"},{"internalType":"address","name":"managerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"customerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"secondaryRoyaltyAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_totalPrice","type":"uint256"},{"internalType":"uint256","name":"_maxPerAddress","type":"uint256"},{"internalType":"uint256","name":"_expires","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"buyAuthorised","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"generalConfig","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"contractMetadataUrl","type":"string"},{"internalType":"string","name":"tokenMetadataUrl","type":"string"},{"internalType":"bool","name":"allowBuy","type":"bool"},{"internalType":"bool","name":"allowPublicTransfer","type":"bool"},{"internalType":"uint256","name":"publicSaleDate","type":"uint256"},{"internalType":"uint256","name":"saleCloseDate","type":"uint256"},{"internalType":"uint256","name":"primaryRoyaltyFee","type":"uint256"},{"internalType":"uint256","name":"secondaryRoyaltyFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"_accounts","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"collectionName","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":"recoverContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"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":[{"components":[{"internalType":"address","name":"recoveryAddress","type":"address"},{"internalType":"address","name":"collectionOwnerAddress","type":"address"},{"internalType":"address","name":"authorisationAddress","type":"address"},{"internalType":"address","name":"purchaseTokenAddress","type":"address"},{"internalType":"address","name":"managerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"customerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"secondaryRoyaltyAddress","type":"address"}],"internalType":"struct Addresses","name":"_addresses","type":"tuple"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowBuy","type":"bool"}],"name":"setAllowBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowPublicTransfer","type":"bool"}],"name":"setAllowPublicTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSale","type":"uint256"},{"internalType":"uint256","name":"_saleClosed","type":"uint256"}],"name":"setDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setMetadataURIs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newName","type":"string"},{"internalType":"string","name":"_newSymbol","type":"string"}],"name":"setNameAndSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_primaryFee","type":"uint256"},{"internalType":"uint256","name":"_secondaryFee","type":"uint256"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxPerTransaction","type":"uint256"}],"name":"setTokenConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supply","outputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"collectionSymbol","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenConfig","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerTransaction","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"numMinted","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_expires","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"transferAuthorised","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newContractManager","type":"address"}],"name":"transferContractManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200404a3803806200404a8339810160408190526200003491620004f2565b6040805160208082018352600080835283519182019093529182529060026200005e8382620006e5565b5060036200006d8282620006e5565b50506001600055506200008033620001fb565b602081015162000090906200024d565b82518390600a908190620000a59082620006e5565b5060208201516001820190620000bc9082620006e5565b5060408201516002820190620000d39082620006e5565b5060608201516003820190620000ea9082620006e5565b5060808281015160048301805460a08087015161ffff1990921693151561ff0019169390931761010091151582021790915560c080860151600586015560e086015160068601559085015160078501556101209094015160089093019290925584516013556020808601516014556040958601516015558451601680546001600160a01b03199081166001600160a01b03938416179091559186015160178054841691831691909117905595850151601880548316918816919091179055606085015160198054831691881691909117905590840151601a8054831691871691909117905590830151601b80548316918616919091179055910151601c8054909216921691909117905550620007b1565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f5fb4f5c581870540f90f9705018e944972197c5be2aa889f6bb847b6cd2236e190600090a35050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b60405161014081016001600160401b0381118282101715620002db57620002db6200029f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200030c576200030c6200029f565b604052919050565b600082601f8301126200032657600080fd5b81516001600160401b038111156200034257620003426200029f565b602062000358601f8301601f19168201620002e1565b82815285828487010111156200036d57600080fd5b60005b838110156200038d57858101830151828201840152820162000370565b506000928101909101919091529392505050565b80518015158114620003b257600080fd5b919050565b600060608284031215620003ca57600080fd5b604051606081016001600160401b0381118282101715620003ef57620003ef6200029f565b80604052508091508251815260208301516020820152604083015160408201525092915050565b80516001600160a01b0381168114620003b257600080fd5b600060e082840312156200044157600080fd5b60405160e081016001600160401b03811182821017156200046657620004666200029f565b604052905080620004778362000416565b8152620004876020840162000416565b60208201526200049a6040840162000416565b6040820152620004ad6060840162000416565b6060820152620004c06080840162000416565b6080820152620004d360a0840162000416565b60a0820152620004e660c0840162000416565b60c08201525092915050565b600080600061016084860312156200050957600080fd5b83516001600160401b03808211156200052157600080fd5b9085019061014082880312156200053757600080fd5b62000541620002b5565b8251828111156200055157600080fd5b6200055f8982860162000314565b8252506020830151828111156200057557600080fd5b620005838982860162000314565b6020830152506040830151828111156200059c57600080fd5b620005aa8982860162000314565b604083015250606083015182811115620005c357600080fd5b620005d18982860162000314565b606083015250620005e560808401620003a1565b6080820152620005f860a08401620003a1565b60a082015260c0838101519082015260e08084015190820152610100808401519082015261012092830151928101929092525092506200063c8560208601620003b7565b91506200064d85608086016200042e565b90509250925092565b600181811c908216806200066b57607f821691505b6020821081036200068c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620006e057600081815260208120601f850160051c81016020861015620006bb5750805b601f850160051c820191505b81811015620006dc57828155600101620006c7565b5050505b505050565b81516001600160401b038111156200070157620007016200029f565b620007198162000712845462000656565b8462000692565b602080601f831160018114620007515760008415620007385750858301515b600019600386901b1c1916600185901b178555620006dc565b600085815260208120601f198616915b82811015620007825788860151825594840194600190910190840162000761565b5085821015620007a15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61388980620007c16000396000f3fe6080604052600436106102c55760003560e01c806382875f7911610179578063b39e12cf116100d6578063d96a094a1161008a578063e8a3d48511610064578063e8a3d48514610827578063e985e9c51461083c578063f2fde38b1461088557600080fd5b8063d96a094a14610766578063da0321cd14610779578063dedf141e1461080757600080fd5b8063ba9341c0116100bb578063ba9341c0146106ec578063c87b56dd14610726578063d60468361461074657600080fd5b8063b39e12cf146106bb578063b88d4fde146106d957600080fd5b806395d89b411161012d578063ae0aa35b11610112578063ae0aa35b1461065b578063aeb2de351461067b578063b375d4921461069b57600080fd5b806395d89b4114610626578063a22cb4651461063b57600080fd5b80638da5cb5b1161015e5780638da5cb5b146105bd578063927a97a1146105db578063933a6f0d1461060657600080fd5b806382875f79146105955780638bc3bdec146105aa57600080fd5b80632843e344116102275780635a446215116101db57806370a08231116101c057806370a0823114610540578063715018a6146105605780637c88e3d91461057557600080fd5b80635a446215146105005780636352211e1461052057600080fd5b806342842e0e1161020c57806342842e0e1461048457806342966c681461049757806354fd4d50146104b757600080fd5b80632843e344146104255780632a55205a1461044557600080fd5b8063095ea7b31161027e57806318160ddd1161026357806318160ddd146103d557806323b872dd146103f25780632541b0911461040557600080fd5b8063095ea7b3146103a0578063166d44ea146103b557600080fd5b8063047fc9aa116102af578063047fc9aa1461032d57806306fdde0314610346578063081812fc1461036857600080fd5b80623d4790146102ca57806301ffc9a7146102fd575b600080fd5b3480156102d657600080fd5b506102ea6102e5366004612e48565b6108a5565b6040519081526020015b60405180910390f35b34801561030957600080fd5b5061031d610318366004612e7b565b6108d2565b60405190151581526020016102f4565b34801561033957600080fd5b50600054600019016102ea565b34801561035257600080fd5b5061035b610944565b6040516102f49190612ee8565b34801561037457600080fd5b50610388610383366004612efb565b6109d9565b6040516001600160a01b0390911681526020016102f4565b6103b36103ae366004612f14565b610a36565b005b3480156103c157600080fd5b506103b36103d0366004612f4e565b610b0c565b3480156103e157600080fd5b5060015460005403600019016102ea565b6103b3610400366004612f6b565b610ba2565b34801561041157600080fd5b506103b3610420366004612fee565b610da2565b34801561043157600080fd5b506103b361044036600461306a565b610f20565b34801561045157600080fd5b50610465610460366004613096565b610feb565b604080516001600160a01b0390931683526020830191909152016102f4565b6103b3610492366004612f6b565b611021565b3480156104a357600080fd5b506103b36104b2366004612efb565b611041565b3480156104c357600080fd5b5061035b6040518060400160405280600581526020017f322e332e3000000000000000000000000000000000000000000000000000000081525081565b34801561050c57600080fd5b506103b361051b3660046130b8565b61104f565b34801561052c57600080fd5b5061038861053b366004612efb565b6110e8565b34801561054c57600080fd5b506102ea61055b366004612e48565b6110f3565b34801561056c57600080fd5b506103b361115b565b34801561058157600080fd5b506103b3610590366004613169565b6111c1565b3480156105a157600080fd5b506103b36112fd565b6103b36105b83660046131c9565b61133d565b3480156105c957600080fd5b506008546001600160a01b0316610388565b3480156105e757600080fd5b506105f0611536565b6040516102f49a99989796959493929190613215565b34801561061257600080fd5b506103b3610621366004613096565b61179d565b34801561063257600080fd5b5061035b61181f565b34801561064757600080fd5b506103b361065636600461329c565b611831565b34801561066757600080fd5b506103b3610676366004612e48565b61189d565b34801561068757600080fd5b506103b36106963660046130b8565b611999565b3480156106a757600080fd5b506103b36106b63660046132d5565b611a92565b3480156106c757600080fd5b506009546001600160a01b0316610388565b6103b36106e7366004613303565b611bac565b3480156106f857600080fd5b5060135460145460155461070b92919083565b604080519384526020840192909252908201526060016102f4565b34801561073257600080fd5b5061035b610741366004612efb565b611bf0565b34801561075257600080fd5b506103b3610761366004612f4e565b611c63565b6103b3610774366004612efb565b611ced565b34801561078557600080fd5b50601654601754601854601954601a54601b54601c546107be966001600160a01b03908116968116958116948116938116928116911687565b604080516001600160a01b039889168152968816602088015294871694860194909452918516606085015284166080840152831660a083015290911660c082015260e0016102f4565b34801561081357600080fd5b506103b3610822366004613096565b611d98565b34801561083357600080fd5b5061035b611e1a565b34801561084857600080fd5b5061031d6108573660046133e3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561089157600080fd5b506103b36108a0366004612e48565b611e2c565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c165b92915050565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061093557506001600160e01b031982167f4906490600000000000000000000000000000000000000000000000000000000145b806108cc57506108cc82611f0b565b6060600a600001805461095690613411565b80601f016020809104026020016040519081016040528092919081815260200182805461098290613411565b80156109cf5780601f106109a4576101008083540402835291602001916109cf565b820191906000526020600020905b8154815290600101906020018083116109b257829003601f168201915b5050505050905090565b60006109e482611fa4565b610a1a576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a41826110e8565b9050336001600160a01b03821614610ab0576001600160a01b038116600090815260076020908152604080832033845290915290205460ff16610ab0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6009546001600160a01b0316336001600160a01b031614610b885760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b60648201526084015b60405180910390fd5b600e80549115156101000261ff0019909216919091179055565b6000610bad82611fd9565b9050836001600160a01b0316816001600160a01b031614610bfa576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054610c268187335b6001600160a01b039081169116811491141790565b610c6e576001600160a01b038616600090815260076020908152604080832033845290915290205460ff16610c6e57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610cae576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cbb8686866001612068565b8015610cc657600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610d5857600184016000818152600460205260408120549003610d56576000548114610d565760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b323314610dc257604051633ebb273b60e21b815260040160405180910390fd5b824210610de257604051630819bdcd60e01b815260040160405180910390fd5b6040805130606090811b6bffffffffffffffffffffffff1990811660208085019190915233831b821660348501528a831b821660488501529189901b16605c8301526070820187905260908083018790528351808403909101815260b0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060d084015260ec8084018290528451808503909101815261010c9093019093528151910120600090601854604080516020601f88018190048102820181019092528681529293506001600160a01b0390911691610ee49184919088908890819084018382808284376000920191909152506121ac92505050565b6001600160a01b031614610f0b57604051631648fd0160e01b815260040160405180910390fd5b610f16888888611021565b5050505050505050565b6009546001600160a01b0316336001600160a01b031614610f975760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b60015460005483919003600019011115610fdd576040517f1d77a89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601392909255601455601555565b601c546012546001600160a01b03909116906000906127109061100e908561345b565b6110189190613472565b90509250929050565b61103c83838360405180602001604052806000815250611bac565b505050565b61104c8160016121d0565b50565b6009546001600160a01b0316336001600160a01b0316146110c65760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600a6110d38486836134da565b50600b6110e18284836134da565b5050505050565b60006108cc82611fd9565b60006001600160a01b038216611135576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146111b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7f565b6111bf600061235e565b565b6009546001600160a01b0316336001600160a01b0316146112385760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b32331461125857604051633ebb273b60e21b815260040160405180910390fd5b8260005b81811015610d9a5760008686838181106112785761127861359a565b905060200201602081019061128d9190612e48565b905060008585848181106112a3576112a361359a565b905060200201359050601360010154816112c06000546000190190565b6112ca91906135b0565b11156112e957604051638a164f6360e01b815260040160405180910390fd5b6112f382826123b0565b505060010161125c565b6016546001600160a01b0316331461132857604051631648fd0160e01b815260040160405180910390fd5b6016546111bf906001600160a01b03166124ee565b600e5460ff1661136057604051639d7da54560e01b815260040160405180910390fd5b32331461138057604051633ebb273b60e21b815260040160405180910390fd5b8242106113a057604051630819bdcd60e01b815260040160405180910390fd5b6040805130606090811b6bffffffffffffffffffffffff199081166020808501919091523390921b16603483015260488201899052606882018890526088820187905260a88083018790528351808403909101815260c8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060e8840152610104808401829052845180850390910181526101249093019093528151910120600090601854604080516020601f88018190048102820181019092528681529293506001600160a01b039091169161149d9184919088908890819084018382808284376000920191909152506121ac92505050565b6001600160a01b0316146114c457604051631648fd0160e01b815260040160405180910390fd5b851561152c5733600090815260056020526040908190205487916114f4918b911c67ffffffffffffffff166135b0565b111561152c576040517f550ffa9c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f168888612540565b600a8054819061154590613411565b80601f016020809104026020016040519081016040528092919081815260200182805461157190613411565b80156115be5780601f10611593576101008083540402835291602001916115be565b820191906000526020600020905b8154815290600101906020018083116115a157829003601f168201915b5050505050908060010180546115d390613411565b80601f01602080910402602001604051908101604052809291908181526020018280546115ff90613411565b801561164c5780601f106116215761010080835404028352916020019161164c565b820191906000526020600020905b81548152906001019060200180831161162f57829003601f168201915b50505050509080600201805461166190613411565b80601f016020809104026020016040519081016040528092919081815260200182805461168d90613411565b80156116da5780601f106116af576101008083540402835291602001916116da565b820191906000526020600020905b8154815290600101906020018083116116bd57829003601f168201915b5050505050908060030180546116ef90613411565b80601f016020809104026020016040519081016040528092919081815260200182805461171b90613411565b80156117685780601f1061173d57610100808354040283529160200191611768565b820191906000526020600020905b81548152906001019060200180831161174b57829003601f168201915b5050506004840154600585015460068601546007870154600890970154959660ff80851697610100909504169550919350918a565b6009546001600160a01b0316336001600160a01b0316146118145760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b601191909155601255565b6060600a600101805461095690613411565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6009546001600160a01b0316336001600160a01b0316146119145760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b6001600160a01b0381166119905760405162461bcd60e51b815260206004820152602f60248201527f4f776e61626c653a206e657720636f6e7472616374206f776e6572206973207460448201527f6865207a65726f206164647265737300000000000000000000000000000000006064820152608401610b7f565b61104c816124ee565b6009546001600160a01b0316336001600160a01b031614611a105760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600c611a1d8486836134da565b50600d611a2b8284836134da565b50600154600054036000190115611a8c577f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600180611a6960005490565b611a7391906135c3565b6040805192835260208301919091520160405180910390a15b50505050565b6009546001600160a01b0316336001600160a01b031614611b095760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b6016546001600160a01b0316611b226020830183612e48565b6001600160a01b031614611b62576040517f9598453c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b726040820160208301612e48565b6017546001600160a01b03908116911614611b9f57611b9f611b9a6040830160208401612e48565b61235e565b80601661103c82826135d6565b611bb7848484610ba2565b6001600160a01b0383163b15611a8c57611bd384848484612805565b611a8c576040516368d2bf6b60e11b815260040160405180910390fd5b6060611bfb82611fa4565b611c31576040517f9430a17e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d611c3c836128f1565b604051602001611c4d929190613707565b6040516020818303038152906040529050919050565b6009546001600160a01b0316336001600160a01b031614611cda5760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600e805460ff1916911515919091179055565b600e5460ff16611d1057604051639d7da54560e01b815260040160405180910390fd5b323314611d3057604051633ebb273b60e21b815260040160405180910390fd5b600f541580611d405750600f5442105b15611d77576040517fdd4e010600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601354600090611d8890839061345b565b9050611d948282612540565b5050565b6009546001600160a01b0316336001600160a01b031614611e0f5760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600f91909155601055565b6060600a600201805461095690613411565b6008546001600160a01b03163314611e865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7f565b6001600160a01b038116611f025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b7f565b61104c8161235e565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480611f6e57507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806108cc5750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b600081600111158015611fb8575060005482105b80156108cc575050600090815260046020526040902054600160e01b161590565b60008180600111612036576000548110156120365760008181526004602052604081205490600160e01b82169003612034575b8060000361202d57506000190160008181526004602052604090205461200c565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fb39e12cf0000000000000000000000000000000000000000000000000000000081529051859185916001600160a01b0380851615929084161591600091309163b39e12cf916004808201926020929091908290030181865afa1580156120d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fb919061378e565b6001600160a01b0386811691161490506000356001600160e01b0319167f2541b091000000000000000000000000000000000000000000000000000000001483158015612146575081155b8015612150575082155b801561215a575080155b156121a057600e54610100900460ff166121a0576040517f8574adcf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b60008060006121bb8585612935565b915091506121c88161297a565b509392505050565b60006121db83611fd9565b9050806000806121f986600090815260066020526040902080549091565b9150915084156122565761220e818433610c11565b612256576001600160a01b038316600090815260076020908152604080832033845290915290205460ff1661225657604051632ce44b5f60e11b815260040160405180910390fd5b612264836000886001612068565b801561226f57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b85169003612316576001860160008181526004602052604081205490036123145760005481146123145760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008054908290036123ee576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123fb6000848385612068565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146124aa57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612472565b50816000036124e5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f5fb4f5c581870540f90f9705018e944972197c5be2aa889f6bb847b6cd2236e190600090a35050565b60105415612583576010544210612583576040517f4c013bd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601454826125946000546000190190565b61259e91906135b0565b11156125bd57604051638a164f6360e01b815260040160405180910390fd5b6015541561260157601554821115612601576040517f9782cdff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115460009061271090612615908461345b565b61261f9190613472565b6019549091506001600160a01b031615612695576019546001600160a01b0316811561266157601a54612661906001600160a01b038381169133911685612adf565b601b5461268f9033906001600160a01b031661267d85876135c3565b6001600160a01b038516929190612adf565b506127fb565b813410156126cf576040517f7e6fc84600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561276457601a546040516000916001600160a01b03169083908381818185875af1925050503d8060008114612722576040519150601f19603f3d011682016040523d82523d6000602084013e612727565b606091505b5050905080612762576040517ff1fc694900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b601b546000906001600160a01b031661277d83856135c3565b604051600081818185875af1925050503d80600081146127b9576040519150601f19603f3d011682016040523d82523d6000602084013e6127be565b606091505b50509050806127f9576040517f475c941300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b61103c33846123b0565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061283a9033908990889088906004016137ab565b6020604051808303816000875af1925050508015612875575060408051601f3d908101601f19168201909252612872918101906137e7565b60015b6128d3573d8080156128a3576040519150601f19603f3d011682016040523d82523d6000602084013e6128a8565b606091505b5080516000036128cb576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a90048061290b5750819003601f19909101908152919050565b600080825160410361296b5760208301516040840151606085015160001a61295f87828585612b67565b94509450505050612973565b506000905060025b9250929050565b600081600481111561298e5761298e613804565b036129965750565b60018160048111156129aa576129aa613804565b036129f75760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b7f565b6002816004811115612a0b57612a0b613804565b03612a585760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b7f565b6003816004811115612a6c57612a6c613804565b0361104c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610b7f565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611a8c908590612c2b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612b9e5750600090506003612c22565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612bf2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612c1b57600060019250925050612c22565b9150600090505b94509492505050565b6000612c80826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d109092919063ffffffff16565b80519091501561103c5780806020019051810190612c9e919061381a565b61103c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b7f565b60606128e9848460008585600080866001600160a01b03168587604051612d379190613837565b60006040518083038185875af1925050503d8060008114612d74576040519150601f19603f3d011682016040523d82523d6000602084013e612d79565b606091505b5091509150612d8a87838387612d95565b979650505050505050565b60608315612e04578251600003612dfd576001600160a01b0385163b612dfd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b7f565b50816128e9565b6128e98383815115612e195781518083602001fd5b8060405162461bcd60e51b8152600401610b7f9190612ee8565b6001600160a01b038116811461104c57600080fd5b600060208284031215612e5a57600080fd5b813561202d81612e33565b6001600160e01b03198116811461104c57600080fd5b600060208284031215612e8d57600080fd5b813561202d81612e65565b60005b83811015612eb3578181015183820152602001612e9b565b50506000910152565b60008151808452612ed4816020860160208601612e98565b601f01601f19169290920160200192915050565b60208152600061202d6020830184612ebc565b600060208284031215612f0d57600080fd5b5035919050565b60008060408385031215612f2757600080fd5b8235612f3281612e33565b946020939093013593505050565b801515811461104c57600080fd5b600060208284031215612f6057600080fd5b813561202d81612f40565b600080600060608486031215612f8057600080fd5b8335612f8b81612e33565b92506020840135612f9b81612e33565b929592945050506040919091013590565b60008083601f840112612fbe57600080fd5b50813567ffffffffffffffff811115612fd657600080fd5b60208301915083602082850101111561297357600080fd5b60008060008060008060a0878903121561300757600080fd5b863561301281612e33565b9550602087013561302281612e33565b94506040870135935060608701359250608087013567ffffffffffffffff81111561304c57600080fd5b61305889828a01612fac565b979a9699509497509295939492505050565b60008060006060848603121561307f57600080fd5b505081359360208301359350604090920135919050565b600080604083850312156130a957600080fd5b50508035926020909101359150565b600080600080604085870312156130ce57600080fd5b843567ffffffffffffffff808211156130e657600080fd5b6130f288838901612fac565b9096509450602087013591508082111561310b57600080fd5b5061311887828801612fac565b95989497509550505050565b60008083601f84011261313657600080fd5b50813567ffffffffffffffff81111561314e57600080fd5b6020830191508360208260051b850101111561297357600080fd5b6000806000806040858703121561317f57600080fd5b843567ffffffffffffffff8082111561319757600080fd5b6131a388838901613124565b909650945060208701359150808211156131bc57600080fd5b5061311887828801613124565b60008060008060008060a087890312156131e257600080fd5b86359550602087013594506040870135935060608701359250608087013567ffffffffffffffff81111561304c57600080fd5b60006101408083526132298184018e612ebc565b9050828103602084015261323d818d612ebc565b90508281036040840152613251818c612ebc565b90508281036060840152613265818b612ebc565b9815156080840152505094151560a086015260c085019390935260e084019190915261010083015261012090910152949350505050565b600080604083850312156132af57600080fd5b82356132ba81612e33565b915060208301356132ca81612f40565b809150509250929050565b600060e082840312156132e757600080fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561331957600080fd5b843561332481612e33565b9350602085013561333481612e33565b925060408501359150606085013567ffffffffffffffff8082111561335857600080fd5b818701915087601f83011261336c57600080fd5b81358181111561337e5761337e6132ed565b604051601f8201601f19908116603f011681019083821181831017156133a6576133a66132ed565b816040528281528a60208487010111156133bf57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156133f657600080fd5b823561340181612e33565b915060208301356132ca81612e33565b600181811c9082168061342557607f821691505b6020821081036132e757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176108cc576108cc613445565b60008261348f57634e487b7160e01b600052601260045260246000fd5b500490565b601f82111561103c57600081815260208120601f850160051c810160208610156134bb5750805b601f850160051c820191505b81811015610d9a578281556001016134c7565b67ffffffffffffffff8311156134f2576134f26132ed565b613506836135008354613411565b83613494565b6000601f84116001811461353a57600085156135225750838201355b600019600387901b1c1916600186901b1783556110e1565b600083815260209020601f19861690835b8281101561356b578685013582556020948501946001909201910161354b565b50868210156135885760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603260045260246000fd5b808201808211156108cc576108cc613445565b818103818111156108cc576108cc613445565b81356135e181612e33565b81546001600160a01b0319166001600160a01b03821617825550602082013561360981612e33565b6001820180546001600160a01b0319166001600160a01b03831617905550604082013561363581612e33565b6002820180546001600160a01b0319166001600160a01b03831617905550606082013561366181612e33565b6003820180546001600160a01b0319166001600160a01b03831617905550608082013561368d81612e33565b6004820180546001600160a01b0319166001600160a01b0383161790555060a08201356136b981612e33565b6005820180546001600160a01b0319166001600160a01b0383161790555060c08201356136e581612e33565b6006820180546001600160a01b0319166001600160a01b038316179055505050565b600080845461371581613411565b6001828116801561372d576001811461374257613771565b60ff1984168752821515830287019450613771565b8860005260208060002060005b858110156137685781548a82015290840190820161374f565b50505082870194505b505050508351613785818360208801612e98565b01949350505050565b6000602082840312156137a057600080fd5b815161202d81612e33565b60006001600160a01b038087168352808616602084015250836040830152608060608301526137dd6080830184612ebc565b9695505050505050565b6000602082840312156137f957600080fd5b815161202d81612e65565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561382c57600080fd5b815161202d81612f40565b60008251613849818460208701612e98565b919091019291505056fea2646970667358221220af20ef1bd595808557c66da0b2677f189d121e8a8b0687a60514adcdc30fa3e664736f6c63430008120033000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000014d1120d7b16000000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000000030000000000000000000000007b58d24ed811b1cba23887855982f283fade14930000000000000000000000007b58d24ed811b1cba23887855982f283fade14930000000000000000000000000eb8f441c42512bbd4b7cbcfc7c493955da6ecf2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000062d516276381042016b38b65c89c05ea59ccb13b0000000000000000000000007b58d24ed811b1cba23887855982f283fade149300000000000000000000000072ec88d4318e0a976d0999f5d6ad943bc0ac3b7a0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000065d91560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000000a56616e746120436c756200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000556414e5441000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004768747470733a2f2f6170692e68797065726d696e742e636f6d2f6d657461646174612f31373438303436652d613765372d343938382d383839362d33303339356366396236363400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004868747470733a2f2f6170692e68797065726d696e742e636f6d2f6d657461646174612f31373438303436652d613765372d343938382d383839362d3330333935636639623636342f000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102c55760003560e01c806382875f7911610179578063b39e12cf116100d6578063d96a094a1161008a578063e8a3d48511610064578063e8a3d48514610827578063e985e9c51461083c578063f2fde38b1461088557600080fd5b8063d96a094a14610766578063da0321cd14610779578063dedf141e1461080757600080fd5b8063ba9341c0116100bb578063ba9341c0146106ec578063c87b56dd14610726578063d60468361461074657600080fd5b8063b39e12cf146106bb578063b88d4fde146106d957600080fd5b806395d89b411161012d578063ae0aa35b11610112578063ae0aa35b1461065b578063aeb2de351461067b578063b375d4921461069b57600080fd5b806395d89b4114610626578063a22cb4651461063b57600080fd5b80638da5cb5b1161015e5780638da5cb5b146105bd578063927a97a1146105db578063933a6f0d1461060657600080fd5b806382875f79146105955780638bc3bdec146105aa57600080fd5b80632843e344116102275780635a446215116101db57806370a08231116101c057806370a0823114610540578063715018a6146105605780637c88e3d91461057557600080fd5b80635a446215146105005780636352211e1461052057600080fd5b806342842e0e1161020c57806342842e0e1461048457806342966c681461049757806354fd4d50146104b757600080fd5b80632843e344146104255780632a55205a1461044557600080fd5b8063095ea7b31161027e57806318160ddd1161026357806318160ddd146103d557806323b872dd146103f25780632541b0911461040557600080fd5b8063095ea7b3146103a0578063166d44ea146103b557600080fd5b8063047fc9aa116102af578063047fc9aa1461032d57806306fdde0314610346578063081812fc1461036857600080fd5b80623d4790146102ca57806301ffc9a7146102fd575b600080fd5b3480156102d657600080fd5b506102ea6102e5366004612e48565b6108a5565b6040519081526020015b60405180910390f35b34801561030957600080fd5b5061031d610318366004612e7b565b6108d2565b60405190151581526020016102f4565b34801561033957600080fd5b50600054600019016102ea565b34801561035257600080fd5b5061035b610944565b6040516102f49190612ee8565b34801561037457600080fd5b50610388610383366004612efb565b6109d9565b6040516001600160a01b0390911681526020016102f4565b6103b36103ae366004612f14565b610a36565b005b3480156103c157600080fd5b506103b36103d0366004612f4e565b610b0c565b3480156103e157600080fd5b5060015460005403600019016102ea565b6103b3610400366004612f6b565b610ba2565b34801561041157600080fd5b506103b3610420366004612fee565b610da2565b34801561043157600080fd5b506103b361044036600461306a565b610f20565b34801561045157600080fd5b50610465610460366004613096565b610feb565b604080516001600160a01b0390931683526020830191909152016102f4565b6103b3610492366004612f6b565b611021565b3480156104a357600080fd5b506103b36104b2366004612efb565b611041565b3480156104c357600080fd5b5061035b6040518060400160405280600581526020017f322e332e3000000000000000000000000000000000000000000000000000000081525081565b34801561050c57600080fd5b506103b361051b3660046130b8565b61104f565b34801561052c57600080fd5b5061038861053b366004612efb565b6110e8565b34801561054c57600080fd5b506102ea61055b366004612e48565b6110f3565b34801561056c57600080fd5b506103b361115b565b34801561058157600080fd5b506103b3610590366004613169565b6111c1565b3480156105a157600080fd5b506103b36112fd565b6103b36105b83660046131c9565b61133d565b3480156105c957600080fd5b506008546001600160a01b0316610388565b3480156105e757600080fd5b506105f0611536565b6040516102f49a99989796959493929190613215565b34801561061257600080fd5b506103b3610621366004613096565b61179d565b34801561063257600080fd5b5061035b61181f565b34801561064757600080fd5b506103b361065636600461329c565b611831565b34801561066757600080fd5b506103b3610676366004612e48565b61189d565b34801561068757600080fd5b506103b36106963660046130b8565b611999565b3480156106a757600080fd5b506103b36106b63660046132d5565b611a92565b3480156106c757600080fd5b506009546001600160a01b0316610388565b6103b36106e7366004613303565b611bac565b3480156106f857600080fd5b5060135460145460155461070b92919083565b604080519384526020840192909252908201526060016102f4565b34801561073257600080fd5b5061035b610741366004612efb565b611bf0565b34801561075257600080fd5b506103b3610761366004612f4e565b611c63565b6103b3610774366004612efb565b611ced565b34801561078557600080fd5b50601654601754601854601954601a54601b54601c546107be966001600160a01b03908116968116958116948116938116928116911687565b604080516001600160a01b039889168152968816602088015294871694860194909452918516606085015284166080840152831660a083015290911660c082015260e0016102f4565b34801561081357600080fd5b506103b3610822366004613096565b611d98565b34801561083357600080fd5b5061035b611e1a565b34801561084857600080fd5b5061031d6108573660046133e3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561089157600080fd5b506103b36108a0366004612e48565b611e2c565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c165b92915050565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061093557506001600160e01b031982167f4906490600000000000000000000000000000000000000000000000000000000145b806108cc57506108cc82611f0b565b6060600a600001805461095690613411565b80601f016020809104026020016040519081016040528092919081815260200182805461098290613411565b80156109cf5780601f106109a4576101008083540402835291602001916109cf565b820191906000526020600020905b8154815290600101906020018083116109b257829003601f168201915b5050505050905090565b60006109e482611fa4565b610a1a576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a41826110e8565b9050336001600160a01b03821614610ab0576001600160a01b038116600090815260076020908152604080832033845290915290205460ff16610ab0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6009546001600160a01b0316336001600160a01b031614610b885760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b60648201526084015b60405180910390fd5b600e80549115156101000261ff0019909216919091179055565b6000610bad82611fd9565b9050836001600160a01b0316816001600160a01b031614610bfa576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054610c268187335b6001600160a01b039081169116811491141790565b610c6e576001600160a01b038616600090815260076020908152604080832033845290915290205460ff16610c6e57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610cae576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cbb8686866001612068565b8015610cc657600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610d5857600184016000818152600460205260408120549003610d56576000548114610d565760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b323314610dc257604051633ebb273b60e21b815260040160405180910390fd5b824210610de257604051630819bdcd60e01b815260040160405180910390fd5b6040805130606090811b6bffffffffffffffffffffffff1990811660208085019190915233831b821660348501528a831b821660488501529189901b16605c8301526070820187905260908083018790528351808403909101815260b0830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060d084015260ec8084018290528451808503909101815261010c9093019093528151910120600090601854604080516020601f88018190048102820181019092528681529293506001600160a01b0390911691610ee49184919088908890819084018382808284376000920191909152506121ac92505050565b6001600160a01b031614610f0b57604051631648fd0160e01b815260040160405180910390fd5b610f16888888611021565b5050505050505050565b6009546001600160a01b0316336001600160a01b031614610f975760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b60015460005483919003600019011115610fdd576040517f1d77a89900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601392909255601455601555565b601c546012546001600160a01b03909116906000906127109061100e908561345b565b6110189190613472565b90509250929050565b61103c83838360405180602001604052806000815250611bac565b505050565b61104c8160016121d0565b50565b6009546001600160a01b0316336001600160a01b0316146110c65760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600a6110d38486836134da565b50600b6110e18284836134da565b5050505050565b60006108cc82611fd9565b60006001600160a01b038216611135576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146111b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7f565b6111bf600061235e565b565b6009546001600160a01b0316336001600160a01b0316146112385760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b32331461125857604051633ebb273b60e21b815260040160405180910390fd5b8260005b81811015610d9a5760008686838181106112785761127861359a565b905060200201602081019061128d9190612e48565b905060008585848181106112a3576112a361359a565b905060200201359050601360010154816112c06000546000190190565b6112ca91906135b0565b11156112e957604051638a164f6360e01b815260040160405180910390fd5b6112f382826123b0565b505060010161125c565b6016546001600160a01b0316331461132857604051631648fd0160e01b815260040160405180910390fd5b6016546111bf906001600160a01b03166124ee565b600e5460ff1661136057604051639d7da54560e01b815260040160405180910390fd5b32331461138057604051633ebb273b60e21b815260040160405180910390fd5b8242106113a057604051630819bdcd60e01b815260040160405180910390fd5b6040805130606090811b6bffffffffffffffffffffffff199081166020808501919091523390921b16603483015260488201899052606882018890526088820187905260a88083018790528351808403909101815260c8830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060e8840152610104808401829052845180850390910181526101249093019093528151910120600090601854604080516020601f88018190048102820181019092528681529293506001600160a01b039091169161149d9184919088908890819084018382808284376000920191909152506121ac92505050565b6001600160a01b0316146114c457604051631648fd0160e01b815260040160405180910390fd5b851561152c5733600090815260056020526040908190205487916114f4918b911c67ffffffffffffffff166135b0565b111561152c576040517f550ffa9c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f168888612540565b600a8054819061154590613411565b80601f016020809104026020016040519081016040528092919081815260200182805461157190613411565b80156115be5780601f10611593576101008083540402835291602001916115be565b820191906000526020600020905b8154815290600101906020018083116115a157829003601f168201915b5050505050908060010180546115d390613411565b80601f01602080910402602001604051908101604052809291908181526020018280546115ff90613411565b801561164c5780601f106116215761010080835404028352916020019161164c565b820191906000526020600020905b81548152906001019060200180831161162f57829003601f168201915b50505050509080600201805461166190613411565b80601f016020809104026020016040519081016040528092919081815260200182805461168d90613411565b80156116da5780601f106116af576101008083540402835291602001916116da565b820191906000526020600020905b8154815290600101906020018083116116bd57829003601f168201915b5050505050908060030180546116ef90613411565b80601f016020809104026020016040519081016040528092919081815260200182805461171b90613411565b80156117685780601f1061173d57610100808354040283529160200191611768565b820191906000526020600020905b81548152906001019060200180831161174b57829003601f168201915b5050506004840154600585015460068601546007870154600890970154959660ff80851697610100909504169550919350918a565b6009546001600160a01b0316336001600160a01b0316146118145760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b601191909155601255565b6060600a600101805461095690613411565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6009546001600160a01b0316336001600160a01b0316146119145760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b6001600160a01b0381166119905760405162461bcd60e51b815260206004820152602f60248201527f4f776e61626c653a206e657720636f6e7472616374206f776e6572206973207460448201527f6865207a65726f206164647265737300000000000000000000000000000000006064820152608401610b7f565b61104c816124ee565b6009546001600160a01b0316336001600160a01b031614611a105760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600c611a1d8486836134da565b50600d611a2b8284836134da565b50600154600054036000190115611a8c577f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600180611a6960005490565b611a7391906135c3565b6040805192835260208301919091520160405180910390a15b50505050565b6009546001600160a01b0316336001600160a01b031614611b095760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b6016546001600160a01b0316611b226020830183612e48565b6001600160a01b031614611b62576040517f9598453c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b726040820160208301612e48565b6017546001600160a01b03908116911614611b9f57611b9f611b9a6040830160208401612e48565b61235e565b80601661103c82826135d6565b611bb7848484610ba2565b6001600160a01b0383163b15611a8c57611bd384848484612805565b611a8c576040516368d2bf6b60e11b815260040160405180910390fd5b6060611bfb82611fa4565b611c31576040517f9430a17e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d611c3c836128f1565b604051602001611c4d929190613707565b6040516020818303038152906040529050919050565b6009546001600160a01b0316336001600160a01b031614611cda5760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600e805460ff1916911515919091179055565b600e5460ff16611d1057604051639d7da54560e01b815260040160405180910390fd5b323314611d3057604051633ebb273b60e21b815260040160405180910390fd5b600f541580611d405750600f5442105b15611d77576040517fdd4e010600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601354600090611d8890839061345b565b9050611d948282612540565b5050565b6009546001600160a01b0316336001600160a01b031614611e0f5760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f742074686520636f6e747260448201526a30b1ba1036b0b730b3b2b960a91b6064820152608401610b7f565b600f91909155601055565b6060600a600201805461095690613411565b6008546001600160a01b03163314611e865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7f565b6001600160a01b038116611f025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b7f565b61104c8161235e565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480611f6e57507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806108cc5750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b600081600111158015611fb8575060005482105b80156108cc575050600090815260046020526040902054600160e01b161590565b60008180600111612036576000548110156120365760008181526004602052604081205490600160e01b82169003612034575b8060000361202d57506000190160008181526004602052604090205461200c565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fb39e12cf0000000000000000000000000000000000000000000000000000000081529051859185916001600160a01b0380851615929084161591600091309163b39e12cf916004808201926020929091908290030181865afa1580156120d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fb919061378e565b6001600160a01b0386811691161490506000356001600160e01b0319167f2541b091000000000000000000000000000000000000000000000000000000001483158015612146575081155b8015612150575082155b801561215a575080155b156121a057600e54610100900460ff166121a0576040517f8574adcf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b60008060006121bb8585612935565b915091506121c88161297a565b509392505050565b60006121db83611fd9565b9050806000806121f986600090815260066020526040902080549091565b9150915084156122565761220e818433610c11565b612256576001600160a01b038316600090815260076020908152604080832033845290915290205460ff1661225657604051632ce44b5f60e11b815260040160405180910390fd5b612264836000886001612068565b801561226f57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b85169003612316576001860160008181526004602052604081205490036123145760005481146123145760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008054908290036123ee576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6123fb6000848385612068565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146124aa57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612472565b50816000036124e5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f5fb4f5c581870540f90f9705018e944972197c5be2aa889f6bb847b6cd2236e190600090a35050565b60105415612583576010544210612583576040517f4c013bd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601454826125946000546000190190565b61259e91906135b0565b11156125bd57604051638a164f6360e01b815260040160405180910390fd5b6015541561260157601554821115612601576040517f9782cdff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60115460009061271090612615908461345b565b61261f9190613472565b6019549091506001600160a01b031615612695576019546001600160a01b0316811561266157601a54612661906001600160a01b038381169133911685612adf565b601b5461268f9033906001600160a01b031661267d85876135c3565b6001600160a01b038516929190612adf565b506127fb565b813410156126cf576040517f7e6fc84600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561276457601a546040516000916001600160a01b03169083908381818185875af1925050503d8060008114612722576040519150601f19603f3d011682016040523d82523d6000602084013e612727565b606091505b5050905080612762576040517ff1fc694900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b601b546000906001600160a01b031661277d83856135c3565b604051600081818185875af1925050503d80600081146127b9576040519150601f19603f3d011682016040523d82523d6000602084013e6127be565b606091505b50509050806127f9576040517f475c941300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b61103c33846123b0565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061283a9033908990889088906004016137ab565b6020604051808303816000875af1925050508015612875575060408051601f3d908101601f19168201909252612872918101906137e7565b60015b6128d3573d8080156128a3576040519150601f19603f3d011682016040523d82523d6000602084013e6128a8565b606091505b5080516000036128cb576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a90048061290b5750819003601f19909101908152919050565b600080825160410361296b5760208301516040840151606085015160001a61295f87828585612b67565b94509450505050612973565b506000905060025b9250929050565b600081600481111561298e5761298e613804565b036129965750565b60018160048111156129aa576129aa613804565b036129f75760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b7f565b6002816004811115612a0b57612a0b613804565b03612a585760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b7f565b6003816004811115612a6c57612a6c613804565b0361104c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610b7f565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052611a8c908590612c2b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612b9e5750600090506003612c22565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612bf2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612c1b57600060019250925050612c22565b9150600090505b94509492505050565b6000612c80826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d109092919063ffffffff16565b80519091501561103c5780806020019051810190612c9e919061381a565b61103c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610b7f565b60606128e9848460008585600080866001600160a01b03168587604051612d379190613837565b60006040518083038185875af1925050503d8060008114612d74576040519150601f19603f3d011682016040523d82523d6000602084013e612d79565b606091505b5091509150612d8a87838387612d95565b979650505050505050565b60608315612e04578251600003612dfd576001600160a01b0385163b612dfd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b7f565b50816128e9565b6128e98383815115612e195781518083602001fd5b8060405162461bcd60e51b8152600401610b7f9190612ee8565b6001600160a01b038116811461104c57600080fd5b600060208284031215612e5a57600080fd5b813561202d81612e33565b6001600160e01b03198116811461104c57600080fd5b600060208284031215612e8d57600080fd5b813561202d81612e65565b60005b83811015612eb3578181015183820152602001612e9b565b50506000910152565b60008151808452612ed4816020860160208601612e98565b601f01601f19169290920160200192915050565b60208152600061202d6020830184612ebc565b600060208284031215612f0d57600080fd5b5035919050565b60008060408385031215612f2757600080fd5b8235612f3281612e33565b946020939093013593505050565b801515811461104c57600080fd5b600060208284031215612f6057600080fd5b813561202d81612f40565b600080600060608486031215612f8057600080fd5b8335612f8b81612e33565b92506020840135612f9b81612e33565b929592945050506040919091013590565b60008083601f840112612fbe57600080fd5b50813567ffffffffffffffff811115612fd657600080fd5b60208301915083602082850101111561297357600080fd5b60008060008060008060a0878903121561300757600080fd5b863561301281612e33565b9550602087013561302281612e33565b94506040870135935060608701359250608087013567ffffffffffffffff81111561304c57600080fd5b61305889828a01612fac565b979a9699509497509295939492505050565b60008060006060848603121561307f57600080fd5b505081359360208301359350604090920135919050565b600080604083850312156130a957600080fd5b50508035926020909101359150565b600080600080604085870312156130ce57600080fd5b843567ffffffffffffffff808211156130e657600080fd5b6130f288838901612fac565b9096509450602087013591508082111561310b57600080fd5b5061311887828801612fac565b95989497509550505050565b60008083601f84011261313657600080fd5b50813567ffffffffffffffff81111561314e57600080fd5b6020830191508360208260051b850101111561297357600080fd5b6000806000806040858703121561317f57600080fd5b843567ffffffffffffffff8082111561319757600080fd5b6131a388838901613124565b909650945060208701359150808211156131bc57600080fd5b5061311887828801613124565b60008060008060008060a087890312156131e257600080fd5b86359550602087013594506040870135935060608701359250608087013567ffffffffffffffff81111561304c57600080fd5b60006101408083526132298184018e612ebc565b9050828103602084015261323d818d612ebc565b90508281036040840152613251818c612ebc565b90508281036060840152613265818b612ebc565b9815156080840152505094151560a086015260c085019390935260e084019190915261010083015261012090910152949350505050565b600080604083850312156132af57600080fd5b82356132ba81612e33565b915060208301356132ca81612f40565b809150509250929050565b600060e082840312156132e757600080fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561331957600080fd5b843561332481612e33565b9350602085013561333481612e33565b925060408501359150606085013567ffffffffffffffff8082111561335857600080fd5b818701915087601f83011261336c57600080fd5b81358181111561337e5761337e6132ed565b604051601f8201601f19908116603f011681019083821181831017156133a6576133a66132ed565b816040528281528a60208487010111156133bf57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156133f657600080fd5b823561340181612e33565b915060208301356132ca81612e33565b600181811c9082168061342557607f821691505b6020821081036132e757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176108cc576108cc613445565b60008261348f57634e487b7160e01b600052601260045260246000fd5b500490565b601f82111561103c57600081815260208120601f850160051c810160208610156134bb5750805b601f850160051c820191505b81811015610d9a578281556001016134c7565b67ffffffffffffffff8311156134f2576134f26132ed565b613506836135008354613411565b83613494565b6000601f84116001811461353a57600085156135225750838201355b600019600387901b1c1916600186901b1783556110e1565b600083815260209020601f19861690835b8281101561356b578685013582556020948501946001909201910161354b565b50868210156135885760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603260045260246000fd5b808201808211156108cc576108cc613445565b818103818111156108cc576108cc613445565b81356135e181612e33565b81546001600160a01b0319166001600160a01b03821617825550602082013561360981612e33565b6001820180546001600160a01b0319166001600160a01b03831617905550604082013561363581612e33565b6002820180546001600160a01b0319166001600160a01b03831617905550606082013561366181612e33565b6003820180546001600160a01b0319166001600160a01b03831617905550608082013561368d81612e33565b6004820180546001600160a01b0319166001600160a01b0383161790555060a08201356136b981612e33565b6005820180546001600160a01b0319166001600160a01b0383161790555060c08201356136e581612e33565b6006820180546001600160a01b0319166001600160a01b038316179055505050565b600080845461371581613411565b6001828116801561372d576001811461374257613771565b60ff1984168752821515830287019450613771565b8860005260208060002060005b858110156137685781548a82015290840190820161374f565b50505082870194505b505050508351613785818360208801612e98565b01949350505050565b6000602082840312156137a057600080fd5b815161202d81612e33565b60006001600160a01b038087168352808616602084015250836040830152608060608301526137dd6080830184612ebc565b9695505050505050565b6000602082840312156137f957600080fd5b815161202d81612e65565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561382c57600080fd5b815161202d81612f40565b60008251613849818460208701612e98565b919091019291505056fea2646970667358221220af20ef1bd595808557c66da0b2677f189d121e8a8b0687a60514adcdc30fa3e664736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000014d1120d7b16000000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000000030000000000000000000000007b58d24ed811b1cba23887855982f283fade14930000000000000000000000007b58d24ed811b1cba23887855982f283fade14930000000000000000000000000eb8f441c42512bbd4b7cbcfc7c493955da6ecf2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000062d516276381042016b38b65c89c05ea59ccb13b0000000000000000000000007b58d24ed811b1cba23887855982f283fade149300000000000000000000000072ec88d4318e0a976d0999f5d6ad943bc0ac3b7a0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000065d91560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000000a56616e746120436c756200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000556414e5441000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004768747470733a2f2f6170692e68797065726d696e742e636f6d2f6d657461646174612f31373438303436652d613765372d343938382d383839362d33303339356366396236363400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004868747470733a2f2f6170692e68797065726d696e742e636f6d2f6d657461646174612f31373438303436652d613765372d343938382d383839362d3330333935636639623636342f000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _generalConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : _tokenConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [2] : _addresses (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
33 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [1] : 00000000000000000000000000000000000000000000000014d1120d7b160000
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [4] : 0000000000000000000000007b58d24ed811b1cba23887855982f283fade1493
Arg [5] : 0000000000000000000000007b58d24ed811b1cba23887855982f283fade1493
Arg [6] : 0000000000000000000000000eb8f441c42512bbd4b7cbcfc7c493955da6ecf2
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 00000000000000000000000062d516276381042016b38b65c89c05ea59ccb13b
Arg [9] : 0000000000000000000000007b58d24ed811b1cba23887855982f283fade1493
Arg [10] : 00000000000000000000000072ec88d4318e0a976d0999f5d6ad943bc0ac3b7a
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [13] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [17] : 0000000000000000000000000000000000000000000000000000000065d91560
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [19] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [20] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [21] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [22] : 56616e746120436c756200000000000000000000000000000000000000000000
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [24] : 56414e5441000000000000000000000000000000000000000000000000000000
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000047
Arg [26] : 68747470733a2f2f6170692e68797065726d696e742e636f6d2f6d6574616461
Arg [27] : 74612f31373438303436652d613765372d343938382d383839362d3330333935
Arg [28] : 6366396236363400000000000000000000000000000000000000000000000000
Arg [29] : 0000000000000000000000000000000000000000000000000000000000000048
Arg [30] : 68747470733a2f2f6170692e68797065726d696e742e636f6d2f6d6574616461
Arg [31] : 74612f31373438303436652d613765372d343938382d383839362d3330333935
Arg [32] : 636639623636342f000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
OVERVIEW
Vanta Club is a hand-selected, NFT-gated DAO of web3 leaders and investors, focused on early-stage investment and advisory.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.