Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 20560012 | 99 days ago | IN | 0 ETH | 0.00552659 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | ||||
---|---|---|---|---|---|---|---|
20607847 | 93 days ago | 0 ETH | |||||
20607828 | 93 days ago | 0 ETH | |||||
20607814 | 93 days ago | 0 ETH | |||||
20607798 | 93 days ago | 0 ETH | |||||
20607782 | 93 days ago | 0 ETH | |||||
20607764 | 93 days ago | 0 ETH | |||||
20607760 | 93 days ago | 0 ETH | |||||
20607745 | 93 days ago | 0 ETH | |||||
20607740 | 93 days ago | 0 ETH | |||||
20607722 | 93 days ago | 0 ETH | |||||
20607722 | 93 days ago | 0 ETH | |||||
20607722 | 93 days ago | 0 ETH | |||||
20607718 | 93 days ago | 0 ETH | |||||
20607703 | 93 days ago | 0 ETH | |||||
20607696 | 93 days ago | 0 ETH | |||||
20607696 | 93 days ago | 0 ETH | |||||
20607696 | 93 days ago | 0 ETH | |||||
20607693 | 93 days ago | 0 ETH | |||||
20607686 | 93 days ago | 0 ETH | |||||
20607686 | 93 days ago | 0 ETH | |||||
20607680 | 93 days ago | 0 ETH | |||||
20607674 | 93 days ago | 0 ETH | |||||
20607670 | 93 days ago | 0 ETH | |||||
20607669 | 93 days ago | 0 ETH | |||||
20607656 | 93 days ago | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Jirasan
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {ERC2981Upgradeable} from "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol"; import {OperatorFilterer} from "closedsea/src/OperatorFilterer.sol"; import {IERC721AUpgradeable, ERC721AUpgradeable} from "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol"; import {ERC721AQueryableUpgradeable} from "erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol"; import {ERC721ABurnableUpgradeable} from "erc721a-upgradeable/contracts/extensions/ERC721ABurnableUpgradeable.sol"; import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract Jirasan is ERC721AQueryableUpgradeable, ERC721ABurnableUpgradeable, ERC2981Upgradeable, OperatorFilterer, OwnableUpgradeable, ReentrancyGuardUpgradeable, IERC721Receiver { using ECDSA for bytes32; /// @notice Base uri string public currentBaseURI; /// @dev Treasury address public treasury; /// @dev Trusted signer address public trustedSigner; /// @notice Maximum supply for the collection uint256 public maxSupply; /// @notice Live timestamp uint256 public liveAt; /// @notice Expires timestamp uint256 public expiresAt; /// @notice Swap paused bool public isSwapPaused; /// @notice Operator filter toggle switch bool private operatorFilteringEnabled; /// @notice Set soulbound state of pre-sale nfts bool public isSoulboundActive; /// @notice An mapping from address to claim mapping(address => bool) public claimed; /// @notice An mapping from token id to lock status mapping(uint256 => bool) public soulbound; /// @dev Reverts if claim is not active error CLAIM_NOT_LIVE(); /// @dev Reverts if trying to send out a soulbound NFT error SOUL_BOUND(); /// @dev Reverts if trying to swap a token you don't own error NOT_OWNER(); /// @dev Reverts if claim already happened for a particular wallet address error ALREADY_CLAIMED(); /// @dev Reverts if trying to swap for a token not in the pool error NOT_IN_POOL(); /// @dev Reverts if swap is not active error SWAP_NOT_LIVE(); /// @dev Reverts if signature is invalid error INVALID_SIGNATURE(); event PoolSwap(address indexed swapper, uint256 inTokenId, uint256 outTokenId); event Claimed(address indexed claimer, address indexed recipient, uint256 amount, uint256 presale, address[] wallets, uint256 startTokenId, uint256 endTokenId); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( string memory currentBaseURI_ ) public initializer initializerERC721A { __ERC721A_init("Jirasan", "JIRASAN"); __Ownable_init(msg.sender); __ERC2981_init(); // Setup filter registry _registerForOperatorFiltering(); operatorFilteringEnabled = true; // Setup royalties to 5% (default denominator is 10000) _setDefaultRoyalty(msg.sender, 500); // Set metadata currentBaseURI = currentBaseURI_; // Set treasury treasury = payable(msg.sender); // Set other contract configurations maxSupply = 10001; // (n-1) liveAt = 1721707200; expiresAt = 1755277766; isSoulboundActive = true; // soulbound by default trustedSigner = msg.sender; isSwapPaused = true; // Initially paused } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function _isValidSignature( address _recipient, uint256 _amount, uint256 _presale, address[] calldata _wallets, bytes memory _signature ) internal view returns (bool) { bytes32 messageHash = keccak256(abi.encodePacked(_recipient, _amount, _presale, abi.encode(_wallets))); bytes32 prefixedHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", messageHash)); address recoveredSigner = ECDSA.recover(prefixedHash, _signature); return recoveredSigner == trustedSigner; } /** * @notice Jirasan Claim w/ signature, handles multiple wallet claiming and pre-sale use case * * @param _recipient The address to mint the tokens to * @param _amount The number of tokens to claim * @param _presale The number of tokens to claim * @param _wallets The wallet addresses the signature is covering * @param _signature The signature for the claim */ function claim( address _recipient, uint256 _amount, uint256 _presale, address[] calldata _wallets, bytes calldata _signature ) external nonReentrant { if(!isLive()) revert CLAIM_NOT_LIVE(); if (!_isValidSignature(_recipient, _amount, _presale, _wallets, _signature)) revert INVALID_SIGNATURE(); // Process flipping claimed wallets for(uint256 i = 0; i < _wallets.length; i++){ if(claimed[_wallets[i]]) revert ALREADY_CLAIMED(); claimed[_wallets[i]] = true; } uint256 startTokenId = _nextTokenId(); // Process mints _mint(_recipient, _amount + _presale); // Process pre-sale token id locking (assumes that the last `presale` amount tokens is locked) for (uint256 j = 0; j < _presale; j++) { soulbound[_totalMinted() - j] = true; } // Leverage set of claimed wallets and pre-sale amount for the metadata derivation emit Claimed(msg.sender, _recipient, _amount, _presale, _wallets, startTokenId, startTokenId + _amount + _presale); } /** * @dev Jirasan Swap * @param _fromTokenId The incoming token id * @param _outTokenId The outgoing token id */ function swap(uint256 _fromTokenId, uint256 _outTokenId) external { if(isSwapPaused) revert SWAP_NOT_LIVE(); // Check that the new tokenId is owned by the swap contract if (ownerOf(_outTokenId) != address(this)) revert NOT_IN_POOL(); // Check that the tokenId is owned by the caller if (ownerOf(_fromTokenId) != _msgSenderERC721A()) revert NOT_OWNER(); // Transfer the token to the swap contract super.transferFrom(_msgSenderERC721A(), address(this), _fromTokenId); // Transfer the new token to the caller this.transferFrom(address(this), _msgSenderERC721A(), _outTokenId); emit PoolSwap(_msgSenderERC721A(), _fromTokenId, _outTokenId); } /** * @notice Deposit a set of jirasan tokens to the contract * @param _tokenIds The token IDs to deposit */ function deposit(uint256[] calldata _tokenIds) external onlyOwner { for (uint256 i = 0; i < _tokenIds.length; i++) { safeTransferFrom(owner(), address(this), _tokenIds[i]); } } /** * @notice Withdraw any tokens sent to the contract * @param _tokenIds The token IDs to withdraw */ function withdraw(uint256[] calldata _tokenIds) external onlyOwner { for (uint256 i = 0; i < _tokenIds.length; i++) { this.safeTransferFrom(address(this), owner(), _tokenIds[i]); } } /// @notice Override isApprovedForAll function isApprovedForAll(address owner, address operator) public view virtual override(IERC721AUpgradeable, ERC721AUpgradeable) returns (bool) { if (operator == address(this)) { return true; } // Fallback to the default implementation return super.isApprovedForAll(owner, operator); } function setApprovalForAll( address operator, bool approved ) public override(IERC721AUpgradeable, ERC721AUpgradeable) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve( address operator, uint256 tokenId ) public payable override(IERC721AUpgradeable, ERC721AUpgradeable) onlyAllowedOperatorApproval(operator) { if(isSoulboundActive && soulbound[tokenId]) revert SOUL_BOUND(); super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public payable override(IERC721AUpgradeable, ERC721AUpgradeable) onlyAllowedOperator(from) { if(isSoulboundActive && soulbound[tokenId]) revert SOUL_BOUND(); super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(IERC721AUpgradeable, ERC721AUpgradeable) onlyAllowedOperator(from) { if(isSoulboundActive && soulbound[tokenId]) revert SOUL_BOUND(); super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(IERC721AUpgradeable, ERC721AUpgradeable) onlyAllowedOperator(from) { if(isSoulboundActive && soulbound[tokenId]) revert SOUL_BOUND(); super.safeTransferFrom(from, to, tokenId, data); } function supportsInterface( bytes4 interfaceId ) public view virtual override( IERC721AUpgradeable, ERC721AUpgradeable, ERC2981Upgradeable ) returns (bool) { return ERC721AUpgradeable.supportsInterface(interfaceId) || ERC2981Upgradeable.supportsInterface(interfaceId); } function _baseURI() internal view virtual override returns (string memory) { return currentBaseURI; } /// @dev Check if mint is live function isLive() public view returns (bool) { return block.timestamp >= liveAt && block.timestamp <= expiresAt; } /** * @notice Sets trusted signer for claims * @param _trustedSigner The signer for valid claims */ function setTrustedSigner(address _trustedSigner) external onlyOwner { trustedSigner = _trustedSigner; } /** * @notice Sets soulboundness * @param _isSoulboundActive The boolean value of soulboundness */ function setSoulBoundActive(bool _isSoulboundActive) external onlyOwner { isSoulboundActive = _isSoulboundActive; } /** * @notice Sets swap pause * @param _isSwapPaused The boolean value of pauseness */ function setSwapPaused(bool _isSwapPaused) external onlyOwner { isSwapPaused = _isSwapPaused; } /** * @notice Sets the collection max supply * @param _maxSupply The max supply of the collection */ function setMaxSupply(uint256 _maxSupply) external onlyOwner { maxSupply = _maxSupply; } /** * @notice Sets timestamps for live and expires timeframe * @param _liveAt A unix timestamp for live date * @param _expiresAt A unix timestamp for expiration date */ function setMintWindow( uint256 _liveAt, uint256 _expiresAt ) external onlyOwner { liveAt = _liveAt; expiresAt = _expiresAt; } /** * @notice Sets the treasury recipient * @param _treasury The treasury address */ function setTreasury(address _treasury) public onlyOwner { treasury = payable(_treasury); } /** * @notice Sets the base uri for the token metadata * @param _currentBaseURI The base uri */ function setBaseURI(string memory _currentBaseURI) external onlyOwner { currentBaseURI = _currentBaseURI; } /** * @notice Set default royalty * @param receiver The royalty receiver address * @param feeNumerator A number for 10k basis */ function setDefaultRoyalty( address receiver, uint96 feeNumerator ) external onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } /** * @dev Airdrop function * @param _to The addresses to mint to airdrop too */ function airdrop(address[] calldata _to, uint256[] calldata _amounts) external onlyOwner { for (uint256 i = 0; i < _to.length; i++) { _mint(_to[i], _amounts[i]); } } /** * @notice Sets whether the operator filter is enabled or disabled * @param operatorFilteringEnabled_ A boolean value for the operator filter */ function setOperatorFilteringEnabled( bool operatorFilteringEnabled_ ) public onlyOwner { operatorFilteringEnabled = operatorFilteringEnabled_; } function _operatorFilteringEnabled() internal view override returns (bool) { return operatorFilteringEnabled; } function _isPriorityOperator( address operator ) internal pure override returns (bool) { // OpenSea Seaport Conduit: // https://etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71 return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71); } function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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. * * The initial owner is set to the address provided by the deployer. 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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol) pragma solidity ^0.8.20; import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {ERC165Upgradeable} from "../../utils/introspection/ERC165Upgradeable.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. */ abstract contract ERC2981Upgradeable is Initializable, IERC2981, ERC165Upgradeable { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } /// @custom:storage-location erc7201:openzeppelin.storage.ERC2981 struct ERC2981Storage { RoyaltyInfo _defaultRoyaltyInfo; mapping(uint256 tokenId => RoyaltyInfo) _tokenRoyaltyInfo; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC2981")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ERC2981StorageLocation = 0xdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00; function _getERC2981Storage() private pure returns (ERC2981Storage storage $) { assembly { $.slot := ERC2981StorageLocation } } /** * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1). */ error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator); /** * @dev The default royalty receiver is invalid. */ error ERC2981InvalidDefaultRoyaltyReceiver(address receiver); /** * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1). */ error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator); /** * @dev The royalty receiver for `tokenId` is invalid. */ error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver); function __ERC2981_init() internal onlyInitializing { } function __ERC2981_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165Upgradeable) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address, uint256) { ERC2981Storage storage $ = _getERC2981Storage(); RoyaltyInfo memory royalty = $._tokenRoyaltyInfo[tokenId]; if (royalty.receiver == address(0)) { royalty = $._defaultRoyaltyInfo; } uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { ERC2981Storage storage $ = _getERC2981Storage(); uint256 denominator = _feeDenominator(); if (feeNumerator > denominator) { // Royalty fee will exceed the sale price revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator); } if (receiver == address(0)) { revert ERC2981InvalidDefaultRoyaltyReceiver(address(0)); } $._defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { ERC2981Storage storage $ = _getERC2981Storage(); delete $._defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { ERC2981Storage storage $ = _getERC2981Storage(); uint256 denominator = _feeDenominator(); if (feeNumerator > denominator) { // Royalty fee will exceed the sale price revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator); } if (receiver == address(0)) { revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0)); } $._tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { ERC2981Storage storage $ = _getERC2981Storage(); delete $._tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } 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 v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {Initializable} from "../../proxy/utils/Initializable.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); * } * ``` */ abstract contract ERC165Upgradeable is Initializable, IERC165 { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard struct ReentrancyGuardStorage { uint256 _status; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) { assembly { $.slot := ReentrancyGuardStorageLocation } } /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); $._status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // On the first call to nonReentrant, _status will be NOT_ENTERED if ($._status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail $._status = ENTERED; } function _nonReentrantAfter() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) $._status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); return $._status == ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.20; import {IERC165} from "../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. */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @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 } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile 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 {MessageHashUtils-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] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { 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, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); 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] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. 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. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // 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, s); } // 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, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @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, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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 pragma solidity ^0.8.4; /// @notice Optimized and flexible operator filterer to abide to OpenSea's /// mandatory on-chain royalty enforcement in order for new collections to /// receive royalties. /// For more information, see: /// See: https://github.com/ProjectOpenSea/operator-filter-registry abstract contract OperatorFilterer { /// @dev The default OpenSea operator blocklist subscription. address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6; /// @dev The OpenSea operator filter registry. address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E; /// @dev Registers the current contract to OpenSea's operator filter, /// and subscribe to the default OpenSea operator blocklist. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering() internal virtual { _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true); } /// @dev Registers the current contract to OpenSea's operator filter. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe) internal virtual { /// @solidity memory-safe-assembly assembly { let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`. // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty. subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy)) for {} iszero(subscribe) {} { if iszero(subscriptionOrRegistrantToCopy) { functionSelector := 0x4420e486 // `register(address)`. break } functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`. break } // Store the function selector. mstore(0x00, shl(224, functionSelector)) // Store the `address(this)`. mstore(0x04, address()) // Store the `subscriptionOrRegistrantToCopy`. mstore(0x24, subscriptionOrRegistrantToCopy) // Register into the registry. if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) { // If the function selector has not been overwritten, // it is an out-of-gas error. if eq(shr(224, mload(0x00)), functionSelector) { // To prevent gas under-estimation. revert(0, 0) } } // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, because of Solidity's memory size limits. mstore(0x24, 0) } } /// @dev Modifier to guard a function and revert if the caller is a blocked operator. modifier onlyAllowedOperator(address from) virtual { if (from != msg.sender) { if (!_isPriorityOperator(msg.sender)) { if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender); } } _; } /// @dev Modifier to guard a function from approving a blocked operator.. modifier onlyAllowedOperatorApproval(address operator) virtual { if (!_isPriorityOperator(operator)) { if (_operatorFilteringEnabled()) _revertIfBlocked(operator); } _; } /// @dev Helper function that reverts if the `operator` is blocked by the registry. function _revertIfBlocked(address operator) private view { /// @solidity memory-safe-assembly assembly { // Store the function selector of `isOperatorAllowed(address,address)`, // shifted left by 6 bytes, which is enough for 8tb of memory. // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL). mstore(0x00, 0xc6171134001122334455) // Store the `address(this)`. mstore(0x1a, address()) // Store the `operator`. mstore(0x3a, operator) // `isOperatorAllowed` always returns true if it does not revert. if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) { // Bubble up the revert if the staticcall reverts. returndatacopy(0x00, 0x00, returndatasize()) revert(0x00, returndatasize()) } // We'll skip checking if `from` is inside the blacklist. // Even though that can block transferring out of wrapper contracts, // we don't want tokens to be stuck. // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, if less than 8tb of memory is used. mstore(0x3a, 0) } } /// @dev For deriving contracts to override, so that operator filtering /// can be turned on / off. /// Returns true by default. function _operatorFilteringEnabled() internal view virtual returns (bool) { return true; } /// @dev For deriving contracts to override, so that preferred marketplaces can /// skip operator filtering, helping users save gas. /// Returns false for all inputs by default. function _isPriorityOperator(address) internal view virtual returns (bool) { return false; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol'; abstract contract ERC721A__Initializable { using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializerERC721A() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require( ERC721A__InitializableStorage.layout()._initializing ? _isConstructor() : !ERC721A__InitializableStorage.layout()._initialized, 'ERC721A__Initializable: contract is already initialized' ); bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._initializing = true; ERC721A__InitializableStorage.layout()._initialized = true; } _; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializingERC721A() { require( ERC721A__InitializableStorage.layout()._initializing, 'ERC721A__Initializable: contract is not initializing' ); _; } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base storage for the initialization function for upgradeable diamond facet contracts **/ library ERC721A__InitializableStorage { struct Layout { /* * Indicates that the contract has been initialized. */ bool _initialized; /* * Indicates that the contract is in the process of being initialized. */ bool _initializing; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ERC721AStorage { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } struct Layout { // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 _currentIndex; // The number of tokens burned. uint256 _burnCounter; // Token name string _name; // Token symbol string _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) _operatorApprovals; // The amount of tokens minted above `_sequentialUpTo()`. // We call these spot mints (i.e. non-sequential mints). uint256 _spotMinted; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AUpgradeable.sol'; import {ERC721AStorage} from './ERC721AStorage.sol'; import './ERC721A__Initializable.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721ReceiverUpgradeable { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * The `_sequentialUpTo()` function can be overriden to enable spot mints * (i.e. non-consecutive mints) for `tokenId`s greater than `_sequentialUpTo()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable { using ERC721AStorage for ERC721AStorage.Layout; // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // CONSTRUCTOR // ============================================================= function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A { __ERC721A_init_unchained(name_, symbol_); } function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A { ERC721AStorage.layout()._name = name_; ERC721AStorage.layout()._symbol = symbol_; ERC721AStorage.layout()._currentIndex = _startTokenId(); if (_sequentialUpTo() < _startTokenId()) _revert(SequentialUpToTooSmall.selector); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID for sequential mints. * * Override this function to change the starting token ID for sequential mints. * * Note: The value returned must never change after any tokens have been minted. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the maximum token ID (inclusive) for sequential mints. * * Override this function to return a value less than 2**256 - 1, * but greater than `_startTokenId()`, to enable spot (non-sequential) mints. * * Note: The value returned must never change after any tokens have been minted. */ function _sequentialUpTo() internal view virtual returns (uint256) { return type(uint256).max; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return ERC721AStorage.layout()._currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256 result) { // Counter underflow is impossible as `_burnCounter` cannot be incremented // more than `_currentIndex + _spotMinted - _startTokenId()` times. unchecked { // With spot minting, the intermediate `result` can be temporarily negative, // and the computation must be unchecked. result = ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += ERC721AStorage.layout()._spotMinted; } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256 result) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { result = ERC721AStorage.layout()._currentIndex - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += ERC721AStorage.layout()._spotMinted; } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return ERC721AStorage.layout()._burnCounter; } /** * @dev Returns the total number of tokens that are spot-minted. */ function _totalSpotMinted() internal view virtual returns (uint256) { return ERC721AStorage.layout()._spotMinted; } // ============================================================= // 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.selector); return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = ERC721AStorage.layout()._packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); ERC721AStorage.layout()._packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return ERC721AStorage.layout()._name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return ERC721AStorage.layout()._symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(ERC721AStorage.layout()._packedOwnerships[index]); } /** * @dev Returns whether the ownership slot at `index` is initialized. * An uninitialized slot does not necessarily mean that the slot has no owner. */ function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) { return ERC721AStorage.layout()._packedOwnerships[index] != 0; } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (ERC721AStorage.layout()._packedOwnerships[index] == 0) { ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index); } } /** * @dev Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = ERC721AStorage.layout()._packedOwnerships[tokenId]; if (tokenId > _sequentialUpTo()) { if (_packedOwnershipExists(packed)) return packed; _revert(OwnerQueryForNonexistentToken.selector); } // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= ERC721AStorage.layout()._currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = ERC721AStorage.layout()._packedOwnerships[--tokenId]; } if (packed == 0) continue; if (packed & _BITMASK_BURNED == 0) return packed; // Otherwise, the token is burned, and we must revert. // This handles the case of batch burned tokens, where only the burned bit // of the starting slot is set, and remaining slots are left uninitialized. _revert(OwnerQueryForNonexistentToken.selector); } } // Otherwise, the data exists and we can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. // If the token is not burned, return `packed`. Otherwise, revert. if (packed & _BITMASK_BURNED == 0) return packed; } _revert(OwnerQueryForNonexistentToken.selector); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector); return ERC721AStorage.layout()._tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { ERC721AStorage.layout()._operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return ERC721AStorage.layout()._operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool result) { if (_startTokenId() <= tokenId) { if (tokenId > _sequentialUpTo()) return _packedOwnershipExists(ERC721AStorage.layout()._packedOwnerships[tokenId]); if (tokenId < ERC721AStorage.layout()._currentIndex) { uint256 packed; while ((packed = ERC721AStorage.layout()._packedOwnerships[tokenId]) == 0) --tokenId; result = packed & _BITMASK_BURNED == 0; } } } /** * @dev Returns whether `packed` represents a token that exists. */ function _packedOwnershipExists(uint256 packed) private pure returns (bool result) { assembly { // The following is equivalent to `owner != address(0) && burned == false`. // Symbolically tested. result := gt(and(packed, _BITMASK_ADDRESS), and(packed, _BITMASK_BURNED)) } } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (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.selector); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`. ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // 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. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _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.selector); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (bytes4 retval) { return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { _revert(TransferToNonERC721ReceiverImplementer.selector); } assembly { revert(add(32, reason), mload(reason)) } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (quantity == 0) _revert(MintZeroQuantity.selector); _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: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; if (end - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); do { assembly { // 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`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); ERC721AStorage.layout()._currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (to == address(0)) _revert(MintToZeroAddress.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); if (startTokenId + quantity - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); ERC721AStorage.layout()._currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = ERC721AStorage.layout()._currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } while (index < end); // This prevents reentrancy to `_safeMint`. // It does not prevent reentrancy to `_safeMintSpot`. if (ERC721AStorage.layout()._currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } /** * @dev Mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * Emits a {Transfer} event for each mint. */ function _mintSpot(address to, uint256 tokenId) internal virtual { if (tokenId <= _sequentialUpTo()) _revert(SpotMintTokenIdTooSmall.selector); uint256 prevOwnershipPacked = ERC721AStorage.layout()._packedOwnerships[tokenId]; if (_packedOwnershipExists(prevOwnershipPacked)) _revert(TokenAlreadyExists.selector); _beforeTokenTransfers(address(0), to, tokenId, 1); // Overflows are incredibly unrealistic. // The `numberMinted` for `to` is incremented by 1, and has a max limit of 2**64 - 1. // `_spotMinted` is incremented by 1, and has a max limit of 2**256 - 1. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `true` (as `quantity == 1`). ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( to, _nextInitializedFlag(1) | _nextExtraData(address(0), to, prevOwnershipPacked) ); // Updates: // - `balance += 1`. // - `numberMinted += 1`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += (1 << _BITPOS_NUMBER_MINTED) | 1; // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); assembly { // 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`. tokenId // `tokenId`. ) } ++ERC721AStorage.layout()._spotMinted; } _afterTokenTransfers(address(0), to, tokenId, 1); } /** * @dev Safely mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * See {_mintSpot}. * * Emits a {Transfer} event. */ function _safeMintSpot( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mintSpot(to, tokenId); unchecked { if (to.code.length != 0) { uint256 currentSpotMinted = ERC721AStorage.layout()._spotMinted; if (!_checkContractOnERC721Received(address(0), to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } // This prevents reentrancy to `_safeMintSpot`. // It does not prevent reentrancy to `_safeMint`. if (ERC721AStorage.layout()._spotMinted != currentSpotMinted) revert(); } } } /** * @dev Equivalent to `_safeMintSpot(to, tokenId, '')`. */ function _safeMintSpot(address to, uint256 tokenId) internal virtual { _safeMintSpot(to, tokenId, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } ERC721AStorage.layout()._tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. ERC721AStorage.layout()._packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as `_burnCounter` cannot be exceed `_currentIndex + _spotMinted` times. unchecked { ERC721AStorage.layout()._burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = ERC721AStorage.layout()._packedOwnerships[index]; if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); ERC721AStorage.layout()._packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnableUpgradeable.sol'; import '../ERC721AUpgradeable.sol'; import '../ERC721A__Initializable.sol'; /** * @title ERC721ABurnable. * * @dev ERC721A token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnableUpgradeable is ERC721A__Initializable, ERC721AUpgradeable, IERC721ABurnableUpgradeable { function __ERC721ABurnable_init() internal onlyInitializingERC721A { __ERC721ABurnable_init_unchained(); } function __ERC721ABurnable_init_unchained() internal onlyInitializingERC721A {} /** * @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 // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryableUpgradeable.sol'; import '../ERC721AUpgradeable.sol'; import '../ERC721A__Initializable.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryableUpgradeable is ERC721A__Initializable, ERC721AUpgradeable, IERC721AQueryableUpgradeable { function __ERC721AQueryable_init() internal onlyInitializingERC721A { __ERC721AQueryable_init_unchained(); } function __ERC721AQueryable_init_unchained() internal onlyInitializingERC721A {} /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory ownership) { unchecked { if (tokenId >= _startTokenId()) { if (tokenId > _sequentialUpTo()) return _ownershipAt(tokenId); if (tokenId < _nextTokenId()) { // If the `tokenId` is within bounds, // scan backwards for the initialized ownership slot. while (!_ownershipIsInitialized(tokenId)) --tokenId; return _ownershipAt(tokenId); } } } } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { TokenOwnership[] memory ownerships; uint256 i = tokenIds.length; assembly { // Grab the free memory pointer. ownerships := mload(0x40) // Store the length. mstore(ownerships, i) // Allocate one word for the length, // `tokenIds.length` words for the pointers. i := shl(5, i) // Multiply `i` by 32. mstore(0x40, add(add(ownerships, 0x20), i)) } while (i != 0) { uint256 tokenId; assembly { i := sub(i, 0x20) tokenId := calldataload(add(tokenIds.offset, i)) } TokenOwnership memory ownership = explicitOwnershipOf(tokenId); assembly { // Store the pointer of `ownership` in the `ownerships` array. mstore(add(add(ownerships, 0x20), i), ownership) } } return ownerships; } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { return _tokensOfOwnerIn(owner, start, stop); } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { // If spot mints are enabled, full-range scan is disabled. if (_sequentialUpTo() != type(uint256).max) _revert(NotCompatibleWithSpotMints.selector); uint256 start = _startTokenId(); uint256 stop = _nextTokenId(); uint256[] memory tokenIds; if (start != stop) tokenIds = _tokensOfOwnerIn(owner, start, stop); return tokenIds; } /** * @dev Helper function for returning an array of token IDs owned by `owner`. * * Note that this function is optimized for smaller bytecode size over runtime gas, * since it is meant to be called off-chain. */ function _tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) private view returns (uint256[] memory tokenIds) { unchecked { if (start >= stop) _revert(InvalidQueryRange.selector); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) start = _startTokenId(); uint256 nextTokenId = _nextTokenId(); // If spot mints are enabled, scan all the way until the specified `stop`. uint256 stopLimit = _sequentialUpTo() != type(uint256).max ? stop : nextTokenId; // Set `stop = min(stop, stopLimit)`. if (stop >= stopLimit) stop = stopLimit; // Number of tokens to scan. uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength` to zero if the range contains no tokens. if (start >= stop) tokenIdsMaxLength = 0; // If there are one or more tokens to scan. if (tokenIdsMaxLength != 0) { // Set `tokenIdsMaxLength = min(balanceOf(owner), tokenIdsMaxLength)`. if (stop - start <= tokenIdsMaxLength) tokenIdsMaxLength = stop - start; uint256 m; // Start of available memory. assembly { // Grab the free memory pointer. tokenIds := mload(0x40) // Allocate one word for the length, and `tokenIdsMaxLength` words // for the data. `shl(5, x)` is equivalent to `mul(32, x)`. m := add(tokenIds, shl(5, add(tokenIdsMaxLength, 1))) mstore(0x40, m) } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), // initialize `currOwnershipAddr`. // `ownership.address` will not be zero, // as `start` is clamped to the valid token ID range. if (!ownership.burned) currOwnershipAddr = ownership.addr; uint256 tokenIdsIdx; // Use a do-while, which is slightly more efficient for this case, // as the array will at least contain one element. do { if (_sequentialUpTo() != type(uint256).max) { // Skip the remaining unused sequential slots. if (start == nextTokenId) start = _sequentialUpTo() + 1; // Reset `currOwnershipAddr`, as each spot-minted token is a batch of one. if (start > _sequentialUpTo()) currOwnershipAddr = address(0); } ownership = _ownershipAt(start); // This implicitly allocates memory. assembly { switch mload(add(ownership, 0x40)) // if `ownership.burned == false`. case 0 { // if `ownership.addr != address(0)`. // The `addr` already has it's upper 96 bits clearned, // since it is written to memory with regular Solidity. if mload(ownership) { currOwnershipAddr := mload(ownership) } // if `currOwnershipAddr == owner`. // The `shl(96, x)` is to make the comparison agnostic to any // dirty upper 96 bits in `owner`. if iszero(shl(96, xor(currOwnershipAddr, owner))) { tokenIdsIdx := add(tokenIdsIdx, 1) mstore(add(tokenIds, shl(5, tokenIdsIdx)), start) } } // Otherwise, reset `currOwnershipAddr`. // This handles the case of batch burned tokens // (burned bit of first slot set, remaining slots left uninitialized). default { currOwnershipAddr := 0 } start := add(start, 1) // Free temporary memory implicitly allocated for ownership // to avoid quadratic memory expansion costs. mstore(0x40, m) } } while (!(start == stop || tokenIdsIdx == tokenIdsMaxLength)); // Store the length of the array. assembly { mstore(tokenIds, tokenIdsIdx) } } } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721AUpgradeable.sol'; /** * @dev Interface of ERC721ABurnable. */ interface IERC721ABurnableUpgradeable is IERC721AUpgradeable { /** * @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.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721AUpgradeable.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryableUpgradeable is IERC721AUpgradeable { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721AUpgradeable { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); /** * `_sequentialUpTo()` must be greater than `_startTokenId()`. */ error SequentialUpToTooSmall(); /** * The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`. */ error SequentialMintExceedsLimit(); /** * Spot minting requires a `tokenId` greater than `_sequentialUpTo()`. */ error SpotMintTokenIdTooSmall(); /** * Cannot mint over a token that already exists. */ error TokenAlreadyExists(); /** * The feature is not compatible with spot mints. */ error NotCompatibleWithSpotMints(); // ============================================================= // 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); }
{ "evmVersion": "paris", "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ALREADY_CLAIMED","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CLAIM_NOT_LIVE","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[],"name":"INVALID_SIGNATURE","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NOT_IN_POOL","type":"error"},{"inputs":[],"name":"NOT_OWNER","type":"error"},{"inputs":[],"name":"NotCompatibleWithSpotMints","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"SOUL_BOUND","type":"error"},{"inputs":[],"name":"SWAP_NOT_LIVE","type":"error"},{"inputs":[],"name":"SequentialMintExceedsLimit","type":"error"},{"inputs":[],"name":"SequentialUpToTooSmall","type":"error"},{"inputs":[],"name":"SpotMintTokenIdTooSmall","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"presale","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"wallets","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTokenId","type":"uint256"}],"name":"Claimed","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":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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":"swapper","type":"address"},{"indexed":false,"internalType":"uint256","name":"inTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outTokenId","type":"uint256"}],"name":"PoolSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_presale","type":"uint256"},{"internalType":"address[]","name":"_wallets","type":"address[]"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expiresAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership","name":"ownership","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"currentBaseURI_","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSoulboundActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSwapPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liveAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","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":"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":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_currentBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liveAt","type":"uint256"},{"internalType":"uint256","name":"_expiresAt","type":"uint256"}],"name":"setMintWindow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"operatorFilteringEnabled_","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isSoulboundActive","type":"bool"}],"name":"setSoulBoundActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isSwapPaused","type":"bool"}],"name":"setSwapPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_trustedSigner","type":"address"}],"name":"setTrustedSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"soulbound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"internalType":"uint256","name":"_outTokenId","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50620000226200002860201b60201c565b6200019c565b60006200003a6200013260201b60201c565b90508060000160089054906101000a900460ff161562000086576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80168160000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff16146200012f5767ffffffffffffffff8160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff6040516200012691906200017f565b60405180910390a15b50565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b600067ffffffffffffffff82169050919050565b62000179816200015a565b82525050565b60006020820190506200019660008301846200016e565b92915050565b615f7980620001ac6000396000f3fe6080604052600436106102c95760003560e01c80638403d44f11610175578063b88d4fde116100dc578063d5abeb0111610095578063f0f442601161006f578063f0f4426014610b17578063f2fde38b14610b40578063f62d188814610b69578063f74d548014610b92576102c9565b8063d5abeb0114610a86578063d96073cf14610ab1578063e985e9c514610ada576102c9565b8063b88d4fde1461095f578063b8f7a6651461097b578063bbce8716146109a6578063c23dc68f146109cf578063c87b56dd14610a0c578063c884ef8314610a49576102c9565b8063983d95ce1161012e578063983d95ce1461085357806399a2557a1461087c5780639a21d11a146108b9578063a22cb465146108e2578063ae2ef2711461090b578063b7c0b8e814610936576102c9565b80638403d44f146107415780638462151c1461076a5780638622a689146107a75780638da5cb5b146107d257806395d89b41146107fd57806397d4ccd214610828576102c9565b8063462159ff1161023457806361d027b3116101ed5780636f8b44b0116101c75780636f8b44b01461068757806370a08231146106b0578063715018a6146106ed5780637a18159714610704576102c9565b806361d027b3146105f65780636352211e14610621578063672434821461065e576102c9565b8063462159ff146104e857806353f8bb9a1461051357806355f804b31461053e57806356a1c70114610567578063598b8e71146105905780635bbb2177146105b9576102c9565b8063150b7a0211610286578063150b7a02146103e157806318160ddd1461041e57806323b872dd146104495780632a55205a1461046557806342842e0e146104a357806342966c68146104bf576102c9565b806301ffc9a7146102ce57806304634d8d1461030b57806306fdde0314610334578063081812fc1461035f578063095ea7b31461039c5780630f867751146103b8575b600080fd5b3480156102da57600080fd5b506102f560048036038101906102f09190614621565b610bbd565b6040516103029190614669565b60405180910390f35b34801561031757600080fd5b50610332600480360381019061032d9190614726565b610bdf565b005b34801561034057600080fd5b50610349610bf5565b60405161035691906147f6565b60405180910390f35b34801561036b57600080fd5b506103866004803603810190610381919061484e565b610c90565b604051610393919061488a565b60405180910390f35b6103b660048036038101906103b191906148a5565b610cf7565b005b3480156103c457600080fd5b506103df60048036038101906103da91906148e5565b610d9c565b005b3480156103ed57600080fd5b506104086004803603810190610403919061498a565b610db6565b6040516104159190614a21565b60405180910390f35b34801561042a57600080fd5b50610433610dcb565b6040516104409190614a4b565b60405180910390f35b610463600480360381019061045e9190614a66565b610e33565b005b34801561047157600080fd5b5061048c600480360381019061048791906148e5565b610f0e565b60405161049a929190614ab9565b60405180910390f35b6104bd60048036038101906104b89190614a66565b611109565b005b3480156104cb57600080fd5b506104e660048036038101906104e1919061484e565b6111e4565b005b3480156104f457600080fd5b506104fd6111f2565b60405161050a9190614669565b60405180910390f35b34801561051f57600080fd5b50610528611205565b6040516105359190614a4b565b60405180910390f35b34801561054a57600080fd5b5061056560048036038101906105609190614c12565b61120b565b005b34801561057357600080fd5b5061058e60048036038101906105899190614c5b565b611226565b005b34801561059c57600080fd5b506105b760048036038101906105b29190614cde565b611272565b005b3480156105c557600080fd5b506105e060048036038101906105db9190614cde565b6112c5565b6040516105ed9190614e8e565b60405180910390f35b34801561060257600080fd5b5061060b611325565b604051610618919061488a565b60405180910390f35b34801561062d57600080fd5b506106486004803603810190610643919061484e565b61134b565b604051610655919061488a565b60405180910390f35b34801561066a57600080fd5b5061068560048036038101906106809190614f06565b61135d565b005b34801561069357600080fd5b506106ae60048036038101906106a9919061484e565b6113d1565b005b3480156106bc57600080fd5b506106d760048036038101906106d29190614c5b565b6113e3565b6040516106e49190614a4b565b60405180910390f35b3480156106f957600080fd5b50610702611483565b005b34801561071057600080fd5b5061072b6004803603810190610726919061484e565b611497565b6040516107389190614669565b60405180910390f35b34801561074d57600080fd5b5061076860048036038101906107639190614fb3565b6114b7565b005b34801561077657600080fd5b50610791600480360381019061078c9190614c5b565b6114dc565b60405161079e919061509e565b60405180910390f35b3480156107b357600080fd5b506107bc611557565b6040516107c99190614a4b565b60405180910390f35b3480156107de57600080fd5b506107e761155d565b6040516107f4919061488a565b60405180910390f35b34801561080957600080fd5b50610812611595565b60405161081f91906147f6565b60405180910390f35b34801561083457600080fd5b5061083d611630565b60405161084a91906147f6565b60405180910390f35b34801561085f57600080fd5b5061087a60048036038101906108759190614cde565b6116be565b005b34801561088857600080fd5b506108a3600480360381019061089e91906150c0565b611775565b6040516108b0919061509e565b60405180910390f35b3480156108c557600080fd5b506108e060048036038101906108db9190614fb3565b61178b565b005b3480156108ee57600080fd5b5061090960048036038101906109049190615113565b6117b0565b005b34801561091757600080fd5b506109206117e5565b60405161092d9190614669565b60405180910390f35b34801561094257600080fd5b5061095d60048036038101906109589190614fb3565b6117f8565b005b610979600480360381019061097491906151f4565b61181d565b005b34801561098757600080fd5b506109906118fa565b60405161099d9190614669565b60405180910390f35b3480156109b257600080fd5b506109cd60048036038101906109c89190615277565b611915565b005b3480156109db57600080fd5b506109f660048036038101906109f1919061484e565b611c38565b604051610a039190615388565b60405180910390f35b348015610a1857600080fd5b50610a336004803603810190610a2e919061484e565b611cad565b604051610a4091906147f6565b60405180910390f35b348015610a5557600080fd5b50610a706004803603810190610a6b9190614c5b565b611d2a565b604051610a7d9190614669565b60405180910390f35b348015610a9257600080fd5b50610a9b611d4a565b604051610aa89190614a4b565b60405180910390f35b348015610abd57600080fd5b50610ad86004803603810190610ad391906148e5565b611d50565b005b348015610ae657600080fd5b50610b016004803603810190610afc91906153a3565b611f5b565b604051610b0e9190614669565b60405180910390f35b348015610b2357600080fd5b50610b3e6004803603810190610b399190614c5b565b611fac565b005b348015610b4c57600080fd5b50610b676004803603810190610b629190614c5b565b611ff8565b005b348015610b7557600080fd5b50610b906004803603810190610b8b9190614c12565b61207e565b005b348015610b9e57600080fd5b50610ba76124bc565b604051610bb4919061488a565b60405180910390f35b6000610bc8826124e2565b80610bd85750610bd782612574565b5b9050919050565b610be76125ee565b610bf18282612675565b5050565b6060610bff612826565b6002018054610c0d90615412565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3990615412565b8015610c865780601f10610c5b57610100808354040283529160200191610c86565b820191906000526020600020905b815481529060010190602001808311610c6957829003601f168201915b5050505050905090565b6000610c9b82612853565b610cb057610caf63cf4700e460e01b61291a565b5b610cb8612826565b600601600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610d0181612924565b610d1d57610d0d612970565b15610d1c57610d1b81612987565b5b5b600660029054906101000a900460ff168015610d5657506008600083815260200190815260200160002060009054906101000a900460ff165b15610d8d576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d9783836129cb565b505050565b610da46125ee565b81600481905550806005819055505050565b600063150b7a0260e01b905095945050505050565b6000610dd56129db565b610ddd612826565b60010154610de9612826565b60000154030390507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610e1a6129e4565b14610e3057610e27612826565b60080154810190505b90565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e8d57610e7033612924565b610e8c57610e7c612970565b15610e8b57610e8a33612987565b5b5b5b600660029054906101000a900460ff168015610ec657506008600083815260200190815260200160002060009054906101000a900460ff165b15610efd576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f08848484612a0c565b50505050565b6000806000610f1b612d03565b905060008160010160008781526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036110b357816000016040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b60006110bd612d2b565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff16876110e99190615472565b6110f391906154e3565b9050816000015181945094505050509250929050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111635761114633612924565b61116257611152612970565b156111615761116033612987565b5b5b5b600660029054906101000a900460ff16801561119c57506008600083815260200190815260200160002060009054906101000a900460ff165b156111d3576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111de848484612d35565b50505050565b6111ef816001612d55565b50565b600660029054906101000a900460ff1681565b60045481565b6112136125ee565b806000908161122291906156c0565b5050565b61122e6125ee565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61127a6125ee565b60005b828290508110156112c0576112b361129361155d565b308585858181106112a7576112a6615792565b5b90506020020135611109565b808060010191505061127d565b505050565b606080600084849050905060405191508082528060051b90508060208301016040525b6000811461131a576000602082039150818601359050600061130982611c38565b9050808360208601015250506112e8565b819250505092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061135682612fbc565b9050919050565b6113656125ee565b60005b848490508110156113ca576113bd85858381811061138957611388615792565b5b905060200201602081019061139e9190614c5b565b8484848181106113b1576113b0615792565b5b905060200201356130f0565b8080600101915050611368565b5050505050565b6113d96125ee565b8060038190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361142957611428638f4eb60460e01b61291a565b5b67ffffffffffffffff61143a612826565b60050160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b61148b6125ee565b611495600061329b565b565b60086020528060005260406000206000915054906101000a900460ff1681565b6114bf6125ee565b80600660026101000a81548160ff02191690831515021790555050565b60607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6115076129e4565b1461151d5761151c63bdba09d760e01b61291a565b5b60006115276129db565b90506000611533613372565b9050606081831461154c57611549858484613385565b90505b809350505050919050565b60055481565b600080611568613541565b90508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b606061159f612826565b60030180546115ad90615412565b80601f01602080910402602001604051908101604052809291908181526020018280546115d990615412565b80156116265780601f106115fb57610100808354040283529160200191611626565b820191906000526020600020905b81548152906001019060200180831161160957829003601f168201915b5050505050905090565b6000805461163d90615412565b80601f016020809104026020016040519081016040528092919081815260200182805461166990615412565b80156116b65780601f1061168b576101008083540402835291602001916116b6565b820191906000526020600020905b81548152906001019060200180831161169957829003601f168201915b505050505081565b6116c66125ee565b60005b82829050811015611770573073ffffffffffffffffffffffffffffffffffffffff166342842e0e306116f961155d565b86868681811061170c5761170b615792565b5b905060200201356040518463ffffffff1660e01b8152600401611731939291906157c1565b600060405180830381600087803b15801561174b57600080fd5b505af115801561175f573d6000803e3d6000fd5b5050505080806001019150506116c9565b505050565b6060611782848484613385565b90509392505050565b6117936125ee565b80600660006101000a81548160ff02191690831515021790555050565b816117ba81612924565b6117d6576117c6612970565b156117d5576117d481612987565b5b5b6117e08383613569565b505050565b600660009054906101000a900460ff1681565b6118006125ee565b80600660016101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146118775761185a33612924565b61187657611866612970565b156118755761187433612987565b5b5b5b600660029054906101000a900460ff1680156118b057506008600084815260200190815260200160002060009054906101000a900460ff165b156118e7576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118f38585858561367d565b5050505050565b6000600454421015801561191057506005544211155b905090565b61191d6136cf565b6119256118fa565b61195b576040517f4d39fcb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119ad878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613726565b6119e3576040517fa3402a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84849050811015611b285760076000868684818110611a0857611a07615792565b5b9050602002016020810190611a1d9190614c5b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611a9c576040517fa308b6e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160076000878785818110611ab557611ab4615792565b5b9050602002016020810190611aca9190614c5b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506119e6565b506000611b33613372565b9050611b4a888789611b4591906157f8565b6130f0565b60005b86811015611ba05760016008600083611b64613812565b611b6e919061582c565b815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050611b4d565b508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f9e58d894248b707354c9e8bda0dcf30e32084288af8a0b27d396c2198747cb89898989878d8f8a611c0291906157f8565b611c0c91906157f8565b604051611c1e96959493929190615914565b60405180910390a350611c2f61386d565b50505050505050565b611c40614566565b611c486129db565b8210611ca757611c566129e4565b821115611c6d57611c6682613886565b9050611ca8565b611c75613372565b821015611ca6575b611c86826138ba565b611c965781600190039150611c7d565b611c9f82613886565b9050611ca8565b5b5b919050565b6060611cb882612853565b611ccd57611ccc63a14c4b5060e01b61291a565b5b6000611cd76138e3565b90506000815103611cf75760405180602001604052806000815250611d22565b80611d0184613975565b604051602001611d129291906159ac565b6040516020818303038152906040525b915050919050565b60076020528060005260406000206000915054906101000a900460ff1681565b60035481565b600660009054906101000a900460ff1615611d97576040517ff302244700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16611db78261134b565b73ffffffffffffffffffffffffffffffffffffffff1614611e04576040517ff3df485c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e0c6139c5565b73ffffffffffffffffffffffffffffffffffffffff16611e2b8361134b565b73ffffffffffffffffffffffffffffffffffffffff1614611e78576040517f71d78b1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e8a611e836139c5565b3084612a0c565b3073ffffffffffffffffffffffffffffffffffffffff166323b872dd30611eaf6139c5565b846040518463ffffffff1660e01b8152600401611ece939291906157c1565b600060405180830381600087803b158015611ee857600080fd5b505af1158015611efc573d6000803e3d6000fd5b50505050611f086139c5565b73ffffffffffffffffffffffffffffffffffffffff167f82ce360ee1020ce141460af73d00dec45f239c7867e5fc3d9917f5c04e5840cc8383604051611f4f9291906159d0565b60405180910390a25050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611f995760019050611fa6565b611fa383836139cd565b90505b92915050565b611fb46125ee565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6120006125ee565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036120725760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401612069919061488a565b60405180910390fd5b61207b8161329b565b50565b6000612088613a6a565b905060008160000160089054906101000a900460ff1615905060008260000160009054906101000a900467ffffffffffffffff1690506000808267ffffffffffffffff161480156120d65750825b9050600060018367ffffffffffffffff1614801561210b575060003073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015612119575080155b15612150576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018560000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083156121a05760018560000160086101000a81548160ff0219169083151502179055505b6121a8613a92565b60000160019054906101000a900460ff166121dc576121c5613a92565b60000160009054906101000a900460ff16156121e5565b6121e4613abf565b5b612224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221b90615a6b565b60405180910390fd5b600061222e613a92565b60000160019054906101000a900460ff161590508015612291576001612252613a92565b60000160016101000a81548160ff0219169083151502179055506001612276613a92565b60000160006101000a81548160ff0219169083151502179055505b6123056040518060400160405280600781526020017f4a69726173616e000000000000000000000000000000000000000000000000008152506040518060400160405280600781526020017f4a49524153414e00000000000000000000000000000000000000000000000000815250613ad6565b61230e33613b3c565b612316613b50565b61231e613b5a565b6001600660016101000a81548160ff021916908315150217905550612345336101f4612675565b866000908161235491906156c0565b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061271160038190555063669f2ac060048190555063689f69c66005819055506001600660026101000a81548160ff02191690831515021790555033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600660006101000a81548160ff021916908315150217905550801561245757600061243c613a92565b60000160016101000a81548160ff0219169083151502179055505b5083156124b45760008560000160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516124ab9190615ac6565b60405180910390a15b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061253d57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061256d5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806125e757506125e682613b7b565b5b9050919050565b6125f6613be5565b73ffffffffffffffffffffffffffffffffffffffff1661261461155d565b73ffffffffffffffffffffffffffffffffffffffff161461267357612637613be5565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161266a919061488a565b60405180910390fd5b565b600061267f612d03565b9050600061268b612d2b565b6bffffffffffffffffffffffff16905080836bffffffffffffffffffffffff1611156126f05782816040517f6f483d090000000000000000000000000000000000000000000000000000000081526004016126e7929190615b12565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036127625760006040517fb6d9900a000000000000000000000000000000000000000000000000000000008152600401612759919061488a565b60405180910390fd5b60405180604001604052808573ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152508260000160008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555090505050505050565b6000807f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090508091505090565b60008161285e6129db565b116129145761286b6129e4565b82111561289e5761289761287d612826565b600401600084815260200190815260200160002054613bed565b9050612915565b6128a6612826565b600001548210156129135760005b60006128be612826565b600401600085815260200190815260200160002054915081036128ec57826128e590615b3b565b92506128b4565b60007c01000000000000000000000000000000000000000000000000000000008216149150505b5b5b919050565b8060005260046000fd5b6000731e0049783f008a0085193e00003d00cd54003c7173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000600660019054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa6129c3573d6000803e3d6000fd5b6000603a5250565b6129d782826001613c2e565b5050565b60006001905090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905090565b6000612a1782612fbc565b905073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161693508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612a8c57612a8b63a114810060e01b61291a565b5b600080612a9884613d66565b91509150612aae8187612aa96139c5565b613d96565b612ad957612ac386612abe6139c5565b611f5b565b612ad857612ad76359c896be60e01b61291a565b5b5b612ae68686866001613dda565b8015612af157600082555b612af9612826565b60050160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550612b50612826565b60050160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612bd185612bad888887613de0565b7c020000000000000000000000000000000000000000000000000000000017613e08565b612bd9612826565b60040160008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612c7b5760006001850190506000612c2a612826565b60040160008381526020019081526020016000205403612c7957612c4c612826565b600001548114612c785783612c5f612826565b6004016000838152602001908152602001600020819055505b5b505b600073ffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff161690508481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460008103612ced57612cec63ea553b3460e01b61291a565b5b612cfa8787876001613e33565b50505050505050565b60007fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00905090565b6000612710905090565b612d508383836040518060200160405280600081525061181d565b505050565b6000612d6083612fbc565b90506000819050600080612d7386613d66565b915091508415612dbb57612d8f8184612d8a6139c5565b613d96565b612dba57612da483612d9f6139c5565b611f5b565b612db957612db86359c896be60e01b61291a565b5b5b5b612dc9836000886001613dda565b8015612dd457600082555b600160806001901b03612de5612826565b60050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612e8583612e4285600088613de0565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717613e08565b612e8d612826565b60040160008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603612f2f5760006001870190506000612ede612826565b60040160008381526020019081526020016000205403612f2d57612f00612826565b600001548114612f2c5784612f13612826565b6004016000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f99836000886001613e33565b612fa1612826565b60010160008154809291906001019190505550505050505050565b600081612fc76129db565b116130da57612fd4612826565b6004016000838152602001908152602001600020549050612ff36129e4565b8211156130185761300381613bed565b6130eb5761301763df2d9b4260e01b61291a565b5b600081036130b157613028612826565b6000015482106130435761304263df2d9b4260e01b61291a565b5b5b61304c612826565b60040160008360019003935083815260200190815260200160002054905060008103156130ac5760007c0100000000000000000000000000000000000000000000000000000000821603156130eb576130ab63df2d9b4260e01b61291a565b5b613044565b60007c0100000000000000000000000000000000000000000000000000000000821603156130eb575b6130ea63df2d9b4260e01b61291a565b5b919050565b60006130fa612826565b600001549050600082036131195761311863b562e8dd60e01b61291a565b5b6131266000848385613dda565b613146836131376000866000613de0565b61314085613e39565b17613e08565b61314e612826565b600401600083815260200190815260200160002081905550600160406001901b178202613179612826565b60050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff16169050600081036132105761320f632e07630060e01b61291a565b5b6000838301905060008390506132246129e4565b60018303111561323f5761323e6381647e3a60e01b61291a565b5b5b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103613240578161327f612826565b600001819055505050506132966000848385613e33565b505050565b60006132a5613541565b905060008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b600061337c612826565b60000154905090565b606081831061339f5761339e6332c1995a60e01b61291a565b5b6133a76129db565b8310156133b9576133b66129db565b92505b60006133c3613372565b905060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6133f06129e4565b036133fb57816133fd565b835b905080841061340a578093505b6000613415876113e3565b905084861061342357600090505b6000811461353757808686031161343a5785850390505b600060405194506001820160051b8501905080604052600061345b88611c38565b90506000816040015161347057816000015190505b60005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61349c6129e4565b146134cb57868a036134b65760016134b26129e4565b0199505b6134be6129e4565b8a11156134ca57600091505b5b6134d48a613886565b92506040830151600081146134ec5760009250613512565b8351156134f857835192505b8b831860601b613511576001820191508a8260051b8a01525b5b5060018a01995083604052888a148061352a57508481145b1561347357808852505050505b5050509392505050565b60007f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b80613572612826565b600701600061357f6139c5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661362c6139c5565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516136719190614669565b60405180910390a35050565b613688848484610e33565b60008373ffffffffffffffffffffffffffffffffffffffff163b146136c9576136b384848484613e49565b6136c8576136c763d1a57ed660e01b61291a565b5b5b50505050565b60006136d9613f78565b90506002816000015403613719576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816000018190555050565b600080878787878760405160200161373f929190615b64565b6040516020818303038152906040526040516020016137619493929190615c38565b60405160208183030381529060405280519060200120905060008160405160200161378c9190615cf9565b60405160208183030381529060405280519060200120905060006137b08286613fa0565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161493505050509695505050505050565b600061381c6129db565b613824612826565b600001540390507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6138546129e4565b1461386a57613861612826565b60080154810190505b90565b6000613877613f78565b90506001816000018190555050565b61388e614566565b6138b3613899612826565b600401600084815260200190815260200160002054613fcc565b9050919050565b6000806138c5612826565b60040160008481526020019081526020016000205414159050919050565b6060600080546138f290615412565b80601f016020809104026020016040519081016040528092919081815260200182805461391e90615412565b801561396b5780601f106139405761010080835404028352916020019161396b565b820191906000526020600020905b81548152906001019060200180831161394e57829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b6001156139b057600184039350600a81066030018453600a810490508061398e575b50828103602084039350808452505050919050565b600033905090565b60006139d7612826565b60070160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b6000807fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90508091505090565b6000803090506000813b9050600081149250505090565b613ade613a92565b60000160019054906101000a900460ff16613b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b2590615d91565b60405180910390fd5b613b388282614082565b5050565b613b4461414e565b613b4d8161418e565b50565b613b5861414e565b565b613b79733cc6cdda760b79bafa08df41ecfa224f810dceb66001614214565b565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b60007c0100000000000000000000000000000000000000000000000000000000821673ffffffffffffffffffffffffffffffffffffffff8316119050919050565b6000613c398361134b565b9050818015613c7b57508073ffffffffffffffffffffffffffffffffffffffff16613c626139c5565b73ffffffffffffffffffffffffffffffffffffffff1614155b15613ca757613c9181613c8c6139c5565b611f5b565b613ca657613ca563cfb3b94260e01b61291a565b5b5b83613cb0612826565b600601600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550828473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a450505050565b6000806000613d73612826565b600601600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613df7868684614289565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613e6f6139c5565b8786866040518563ffffffff1660e01b8152600401613e919493929190615dfb565b6020604051808303816000875af1925050508015613ecd57506040513d601f19601f82011682018060405250810190613eca9190615e5c565b60015b613f25573d8060008114613efd576040519150601f19603f3d011682016040523d82523d6000602084013e613f02565b606091505b506000815103613f1d57613f1c63d1a57ed660e01b61291a565b5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60007f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00905090565b600080600080613fb08686614292565b925092509250613fc082826142ee565b82935050505092915050565b613fd4614566565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b61408a613a92565b60000160019054906101000a900460ff166140da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016140d190615d91565b60405180910390fd5b816140e3612826565b60020190816140f291906156c0565b50806140fc612826565b600301908161410b91906156c0565b506141146129db565b61411c612826565b6000018190555061412b6129db565b6141336129e4565b101561414a5761414963fed8210f60e01b61291a565b5b5050565b614156614452565b61418c576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61419661414e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036142085760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016141ff919061488a565b60405180910390fd5b6142118161329b565b50565b637d3e3dbe8260601b60601c925081614240578261423857634420e4869050614240565b63a0af290390505b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af161427f578060005160e01c0361427e57600080fd5b5b6000602452505050565b60009392505050565b600080600060418451036142d75760008060006020870151925060408701519150606087015160001a90506142c988828585614472565b9550955095505050506142e7565b60006002855160001b9250925092505b9250925092565b6000600381111561430257614301615e89565b5b82600381111561431557614314615e89565b5b031561444e576001600381111561432f5761432e615e89565b5b82600381111561434257614341615e89565b5b03614379576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600381111561438d5761438c615e89565b5b8260038111156143a05761439f615e89565b5b036143e5578060001c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016143dc9190614a4b565b60405180910390fd5b6003808111156143f8576143f7615e89565b5b82600381111561440b5761440a615e89565b5b0361444d57806040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004016144449190615ec7565b60405180910390fd5b5b5050565b600061445c613a6a565b60000160089054906101000a900460ff16905090565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c11156144b257600060038592509250925061455c565b6000600188888888604051600081526020016040526040516144d79493929190615efe565b6020604051602081039080840390855afa1580156144f9573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361454d57600060016000801b9350935093505061455c565b8060008060001b935093509350505b9450945094915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6145fe816145c9565b811461460957600080fd5b50565b60008135905061461b816145f5565b92915050565b600060208284031215614637576146366145bf565b5b60006146458482850161460c565b91505092915050565b60008115159050919050565b6146638161464e565b82525050565b600060208201905061467e600083018461465a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006146af82614684565b9050919050565b6146bf816146a4565b81146146ca57600080fd5b50565b6000813590506146dc816146b6565b92915050565b60006bffffffffffffffffffffffff82169050919050565b614703816146e2565b811461470e57600080fd5b50565b600081359050614720816146fa565b92915050565b6000806040838503121561473d5761473c6145bf565b5b600061474b858286016146cd565b925050602061475c85828601614711565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156147a0578082015181840152602081019050614785565b60008484015250505050565b6000601f19601f8301169050919050565b60006147c882614766565b6147d28185614771565b93506147e2818560208601614782565b6147eb816147ac565b840191505092915050565b6000602082019050818103600083015261481081846147bd565b905092915050565b6000819050919050565b61482b81614818565b811461483657600080fd5b50565b60008135905061484881614822565b92915050565b600060208284031215614864576148636145bf565b5b600061487284828501614839565b91505092915050565b614884816146a4565b82525050565b600060208201905061489f600083018461487b565b92915050565b600080604083850312156148bc576148bb6145bf565b5b60006148ca858286016146cd565b92505060206148db85828601614839565b9150509250929050565b600080604083850312156148fc576148fb6145bf565b5b600061490a85828601614839565b925050602061491b85828601614839565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f84011261494a57614949614925565b5b8235905067ffffffffffffffff8111156149675761496661492a565b5b6020830191508360018202830111156149835761498261492f565b5b9250929050565b6000806000806000608086880312156149a6576149a56145bf565b5b60006149b4888289016146cd565b95505060206149c5888289016146cd565b94505060406149d688828901614839565b935050606086013567ffffffffffffffff8111156149f7576149f66145c4565b5b614a0388828901614934565b92509250509295509295909350565b614a1b816145c9565b82525050565b6000602082019050614a366000830184614a12565b92915050565b614a4581614818565b82525050565b6000602082019050614a606000830184614a3c565b92915050565b600080600060608486031215614a7f57614a7e6145bf565b5b6000614a8d868287016146cd565b9350506020614a9e868287016146cd565b9250506040614aaf86828701614839565b9150509250925092565b6000604082019050614ace600083018561487b565b614adb6020830184614a3c565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b614b1f826147ac565b810181811067ffffffffffffffff82111715614b3e57614b3d614ae7565b5b80604052505050565b6000614b516145b5565b9050614b5d8282614b16565b919050565b600067ffffffffffffffff821115614b7d57614b7c614ae7565b5b614b86826147ac565b9050602081019050919050565b82818337600083830152505050565b6000614bb5614bb084614b62565b614b47565b905082815260208101848484011115614bd157614bd0614ae2565b5b614bdc848285614b93565b509392505050565b600082601f830112614bf957614bf8614925565b5b8135614c09848260208601614ba2565b91505092915050565b600060208284031215614c2857614c276145bf565b5b600082013567ffffffffffffffff811115614c4657614c456145c4565b5b614c5284828501614be4565b91505092915050565b600060208284031215614c7157614c706145bf565b5b6000614c7f848285016146cd565b91505092915050565b60008083601f840112614c9e57614c9d614925565b5b8235905067ffffffffffffffff811115614cbb57614cba61492a565b5b602083019150836020820283011115614cd757614cd661492f565b5b9250929050565b60008060208385031215614cf557614cf46145bf565b5b600083013567ffffffffffffffff811115614d1357614d126145c4565b5b614d1f85828601614c88565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b614d60816146a4565b82525050565b600067ffffffffffffffff82169050919050565b614d8381614d66565b82525050565b614d928161464e565b82525050565b600062ffffff82169050919050565b614db081614d98565b82525050565b608082016000820151614dcc6000850182614d57565b506020820151614ddf6020850182614d7a565b506040820151614df26040850182614d89565b506060820151614e056060850182614da7565b50505050565b6000614e178383614db6565b60808301905092915050565b6000602082019050919050565b6000614e3b82614d2b565b614e458185614d36565b9350614e5083614d47565b8060005b83811015614e81578151614e688882614e0b565b9750614e7383614e23565b925050600181019050614e54565b5085935050505092915050565b60006020820190508181036000830152614ea88184614e30565b905092915050565b60008083601f840112614ec657614ec5614925565b5b8235905067ffffffffffffffff811115614ee357614ee261492a565b5b602083019150836020820283011115614eff57614efe61492f565b5b9250929050565b60008060008060408587031215614f2057614f1f6145bf565b5b600085013567ffffffffffffffff811115614f3e57614f3d6145c4565b5b614f4a87828801614eb0565b9450945050602085013567ffffffffffffffff811115614f6d57614f6c6145c4565b5b614f7987828801614c88565b925092505092959194509250565b614f908161464e565b8114614f9b57600080fd5b50565b600081359050614fad81614f87565b92915050565b600060208284031215614fc957614fc86145bf565b5b6000614fd784828501614f9e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61501581614818565b82525050565b6000615027838361500c565b60208301905092915050565b6000602082019050919050565b600061504b82614fe0565b6150558185614feb565b935061506083614ffc565b8060005b83811015615091578151615078888261501b565b975061508383615033565b925050600181019050615064565b5085935050505092915050565b600060208201905081810360008301526150b88184615040565b905092915050565b6000806000606084860312156150d9576150d86145bf565b5b60006150e7868287016146cd565b93505060206150f886828701614839565b925050604061510986828701614839565b9150509250925092565b6000806040838503121561512a576151296145bf565b5b6000615138858286016146cd565b925050602061514985828601614f9e565b9150509250929050565b600067ffffffffffffffff82111561516e5761516d614ae7565b5b615177826147ac565b9050602081019050919050565b600061519761519284615153565b614b47565b9050828152602081018484840111156151b3576151b2614ae2565b5b6151be848285614b93565b509392505050565b600082601f8301126151db576151da614925565b5b81356151eb848260208601615184565b91505092915050565b6000806000806080858703121561520e5761520d6145bf565b5b600061521c878288016146cd565b945050602061522d878288016146cd565b935050604061523e87828801614839565b925050606085013567ffffffffffffffff81111561525f5761525e6145c4565b5b61526b878288016151c6565b91505092959194509250565b600080600080600080600060a0888a031215615296576152956145bf565b5b60006152a48a828b016146cd565b97505060206152b58a828b01614839565b96505060406152c68a828b01614839565b955050606088013567ffffffffffffffff8111156152e7576152e66145c4565b5b6152f38a828b01614eb0565b9450945050608088013567ffffffffffffffff811115615316576153156145c4565b5b6153228a828b01614934565b925092505092959891949750929550565b6080820160008201516153496000850182614d57565b50602082015161535c6020850182614d7a565b50604082015161536f6040850182614d89565b5060608201516153826060850182614da7565b50505050565b600060808201905061539d6000830184615333565b92915050565b600080604083850312156153ba576153b96145bf565b5b60006153c8858286016146cd565b92505060206153d9858286016146cd565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061542a57607f821691505b60208210810361543d5761543c6153e3565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061547d82614818565b915061548883614818565b925082820261549681614818565b915082820484148315176154ad576154ac615443565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006154ee82614818565b91506154f983614818565b925082615509576155086154b4565b5b828204905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026155767fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82615539565b6155808683615539565b95508019841693508086168417925050509392505050565b6000819050919050565b60006155bd6155b86155b384614818565b615598565b614818565b9050919050565b6000819050919050565b6155d7836155a2565b6155eb6155e3826155c4565b848454615546565b825550505050565b600090565b6156006155f3565b61560b8184846155ce565b505050565b5b8181101561562f576156246000826155f8565b600181019050615611565b5050565b601f8211156156745761564581615514565b61564e84615529565b8101602085101561565d578190505b61567161566985615529565b830182615610565b50505b505050565b600082821c905092915050565b600061569760001984600802615679565b1980831691505092915050565b60006156b08383615686565b9150826002028217905092915050565b6156c982614766565b67ffffffffffffffff8111156156e2576156e1614ae7565b5b6156ec8254615412565b6156f7828285615633565b600060209050601f83116001811461572a5760008415615718578287015190505b61572285826156a4565b86555061578a565b601f19841661573886615514565b60005b828110156157605784890151825560018201915060208501945060208101905061573b565b8683101561577d5784890151615779601f891682615686565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006060820190506157d6600083018661487b565b6157e3602083018561487b565b6157f06040830184614a3c565b949350505050565b600061580382614818565b915061580e83614818565b925082820190508082111561582657615825615443565b5b92915050565b600061583782614818565b915061584283614818565b925082820390508181111561585a57615859615443565b5b92915050565b600082825260208201905092915050565b6000819050919050565b60006158878383614d57565b60208301905092915050565b60006158a260208401846146cd565b905092915050565b6000602082019050919050565b60006158c38385615860565b93506158ce82615871565b8060005b85811015615907576158e48284615893565b6158ee888261587b565b97506158f9836158aa565b9250506001810190506158d2565b5085925050509392505050565b600060a0820190506159296000830189614a3c565b6159366020830188614a3c565b81810360408301526159498186886158b7565b90506159586060830185614a3c565b6159656080830184614a3c565b979650505050505050565b600081905092915050565b600061598682614766565b6159908185615970565b93506159a0818560208601614782565b80840191505092915050565b60006159b8828561597b565b91506159c4828461597b565b91508190509392505050565b60006040820190506159e56000830185614a3c565b6159f26020830184614a3c565b9392505050565b7f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460008201527f20697320616c726561647920696e697469616c697a6564000000000000000000602082015250565b6000615a55603783614771565b9150615a60826159f9565b604082019050919050565b60006020820190508181036000830152615a8481615a48565b9050919050565b6000819050919050565b6000615ab0615aab615aa684615a8b565b615598565b614d66565b9050919050565b615ac081615a95565b82525050565b6000602082019050615adb6000830184615ab7565b92915050565b6000615afc615af7615af2846146e2565b615598565b614818565b9050919050565b615b0c81615ae1565b82525050565b6000604082019050615b276000830185615b03565b615b346020830184614a3c565b9392505050565b6000615b4682614818565b915060008203615b5957615b58615443565b5b600182039050919050565b60006020820190508181036000830152615b7f8184866158b7565b90509392505050565b60008160601b9050919050565b6000615ba082615b88565b9050919050565b6000615bb282615b95565b9050919050565b615bca615bc5826146a4565b615ba7565b82525050565b6000819050919050565b615beb615be682614818565b615bd0565b82525050565b600081519050919050565b600081905092915050565b6000615c1282615bf1565b615c1c8185615bfc565b9350615c2c818560208601614782565b80840191505092915050565b6000615c448287615bb9565b601482019150615c548286615bda565b602082019150615c648285615bda565b602082019150615c748284615c07565b915081905095945050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000615cb8601c83615970565b9150615cc382615c82565b601c82019050919050565b6000819050919050565b6000819050919050565b615cf3615cee82615cce565b615cd8565b82525050565b6000615d0482615cab565b9150615d108284615ce2565b60208201915081905092915050565b7f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460008201527f206973206e6f7420696e697469616c697a696e67000000000000000000000000602082015250565b6000615d7b603483614771565b9150615d8682615d1f565b604082019050919050565b60006020820190508181036000830152615daa81615d6e565b9050919050565b600082825260208201905092915050565b6000615dcd82615bf1565b615dd78185615db1565b9350615de7818560208601614782565b615df0816147ac565b840191505092915050565b6000608082019050615e10600083018761487b565b615e1d602083018661487b565b615e2a6040830185614a3c565b8181036060830152615e3c8184615dc2565b905095945050505050565b600081519050615e56816145f5565b92915050565b600060208284031215615e7257615e716145bf565b5b6000615e8084828501615e47565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b615ec181615cce565b82525050565b6000602082019050615edc6000830184615eb8565b92915050565b600060ff82169050919050565b615ef881615ee2565b82525050565b6000608082019050615f136000830187615eb8565b615f206020830186615eef565b615f2d6040830185615eb8565b615f3a6060830184615eb8565b9594505050505056fea26469706673582212202aca4af1546121fd4c4dfce1b209a3b5dbbfa75db88cac6534f2265fe9decb6364736f6c63430008180033
Deployed Bytecode
0x6080604052600436106102c95760003560e01c80638403d44f11610175578063b88d4fde116100dc578063d5abeb0111610095578063f0f442601161006f578063f0f4426014610b17578063f2fde38b14610b40578063f62d188814610b69578063f74d548014610b92576102c9565b8063d5abeb0114610a86578063d96073cf14610ab1578063e985e9c514610ada576102c9565b8063b88d4fde1461095f578063b8f7a6651461097b578063bbce8716146109a6578063c23dc68f146109cf578063c87b56dd14610a0c578063c884ef8314610a49576102c9565b8063983d95ce1161012e578063983d95ce1461085357806399a2557a1461087c5780639a21d11a146108b9578063a22cb465146108e2578063ae2ef2711461090b578063b7c0b8e814610936576102c9565b80638403d44f146107415780638462151c1461076a5780638622a689146107a75780638da5cb5b146107d257806395d89b41146107fd57806397d4ccd214610828576102c9565b8063462159ff1161023457806361d027b3116101ed5780636f8b44b0116101c75780636f8b44b01461068757806370a08231146106b0578063715018a6146106ed5780637a18159714610704576102c9565b806361d027b3146105f65780636352211e14610621578063672434821461065e576102c9565b8063462159ff146104e857806353f8bb9a1461051357806355f804b31461053e57806356a1c70114610567578063598b8e71146105905780635bbb2177146105b9576102c9565b8063150b7a0211610286578063150b7a02146103e157806318160ddd1461041e57806323b872dd146104495780632a55205a1461046557806342842e0e146104a357806342966c68146104bf576102c9565b806301ffc9a7146102ce57806304634d8d1461030b57806306fdde0314610334578063081812fc1461035f578063095ea7b31461039c5780630f867751146103b8575b600080fd5b3480156102da57600080fd5b506102f560048036038101906102f09190614621565b610bbd565b6040516103029190614669565b60405180910390f35b34801561031757600080fd5b50610332600480360381019061032d9190614726565b610bdf565b005b34801561034057600080fd5b50610349610bf5565b60405161035691906147f6565b60405180910390f35b34801561036b57600080fd5b506103866004803603810190610381919061484e565b610c90565b604051610393919061488a565b60405180910390f35b6103b660048036038101906103b191906148a5565b610cf7565b005b3480156103c457600080fd5b506103df60048036038101906103da91906148e5565b610d9c565b005b3480156103ed57600080fd5b506104086004803603810190610403919061498a565b610db6565b6040516104159190614a21565b60405180910390f35b34801561042a57600080fd5b50610433610dcb565b6040516104409190614a4b565b60405180910390f35b610463600480360381019061045e9190614a66565b610e33565b005b34801561047157600080fd5b5061048c600480360381019061048791906148e5565b610f0e565b60405161049a929190614ab9565b60405180910390f35b6104bd60048036038101906104b89190614a66565b611109565b005b3480156104cb57600080fd5b506104e660048036038101906104e1919061484e565b6111e4565b005b3480156104f457600080fd5b506104fd6111f2565b60405161050a9190614669565b60405180910390f35b34801561051f57600080fd5b50610528611205565b6040516105359190614a4b565b60405180910390f35b34801561054a57600080fd5b5061056560048036038101906105609190614c12565b61120b565b005b34801561057357600080fd5b5061058e60048036038101906105899190614c5b565b611226565b005b34801561059c57600080fd5b506105b760048036038101906105b29190614cde565b611272565b005b3480156105c557600080fd5b506105e060048036038101906105db9190614cde565b6112c5565b6040516105ed9190614e8e565b60405180910390f35b34801561060257600080fd5b5061060b611325565b604051610618919061488a565b60405180910390f35b34801561062d57600080fd5b506106486004803603810190610643919061484e565b61134b565b604051610655919061488a565b60405180910390f35b34801561066a57600080fd5b5061068560048036038101906106809190614f06565b61135d565b005b34801561069357600080fd5b506106ae60048036038101906106a9919061484e565b6113d1565b005b3480156106bc57600080fd5b506106d760048036038101906106d29190614c5b565b6113e3565b6040516106e49190614a4b565b60405180910390f35b3480156106f957600080fd5b50610702611483565b005b34801561071057600080fd5b5061072b6004803603810190610726919061484e565b611497565b6040516107389190614669565b60405180910390f35b34801561074d57600080fd5b5061076860048036038101906107639190614fb3565b6114b7565b005b34801561077657600080fd5b50610791600480360381019061078c9190614c5b565b6114dc565b60405161079e919061509e565b60405180910390f35b3480156107b357600080fd5b506107bc611557565b6040516107c99190614a4b565b60405180910390f35b3480156107de57600080fd5b506107e761155d565b6040516107f4919061488a565b60405180910390f35b34801561080957600080fd5b50610812611595565b60405161081f91906147f6565b60405180910390f35b34801561083457600080fd5b5061083d611630565b60405161084a91906147f6565b60405180910390f35b34801561085f57600080fd5b5061087a60048036038101906108759190614cde565b6116be565b005b34801561088857600080fd5b506108a3600480360381019061089e91906150c0565b611775565b6040516108b0919061509e565b60405180910390f35b3480156108c557600080fd5b506108e060048036038101906108db9190614fb3565b61178b565b005b3480156108ee57600080fd5b5061090960048036038101906109049190615113565b6117b0565b005b34801561091757600080fd5b506109206117e5565b60405161092d9190614669565b60405180910390f35b34801561094257600080fd5b5061095d60048036038101906109589190614fb3565b6117f8565b005b610979600480360381019061097491906151f4565b61181d565b005b34801561098757600080fd5b506109906118fa565b60405161099d9190614669565b60405180910390f35b3480156109b257600080fd5b506109cd60048036038101906109c89190615277565b611915565b005b3480156109db57600080fd5b506109f660048036038101906109f1919061484e565b611c38565b604051610a039190615388565b60405180910390f35b348015610a1857600080fd5b50610a336004803603810190610a2e919061484e565b611cad565b604051610a4091906147f6565b60405180910390f35b348015610a5557600080fd5b50610a706004803603810190610a6b9190614c5b565b611d2a565b604051610a7d9190614669565b60405180910390f35b348015610a9257600080fd5b50610a9b611d4a565b604051610aa89190614a4b565b60405180910390f35b348015610abd57600080fd5b50610ad86004803603810190610ad391906148e5565b611d50565b005b348015610ae657600080fd5b50610b016004803603810190610afc91906153a3565b611f5b565b604051610b0e9190614669565b60405180910390f35b348015610b2357600080fd5b50610b3e6004803603810190610b399190614c5b565b611fac565b005b348015610b4c57600080fd5b50610b676004803603810190610b629190614c5b565b611ff8565b005b348015610b7557600080fd5b50610b906004803603810190610b8b9190614c12565b61207e565b005b348015610b9e57600080fd5b50610ba76124bc565b604051610bb4919061488a565b60405180910390f35b6000610bc8826124e2565b80610bd85750610bd782612574565b5b9050919050565b610be76125ee565b610bf18282612675565b5050565b6060610bff612826565b6002018054610c0d90615412565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3990615412565b8015610c865780601f10610c5b57610100808354040283529160200191610c86565b820191906000526020600020905b815481529060010190602001808311610c6957829003601f168201915b5050505050905090565b6000610c9b82612853565b610cb057610caf63cf4700e460e01b61291a565b5b610cb8612826565b600601600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610d0181612924565b610d1d57610d0d612970565b15610d1c57610d1b81612987565b5b5b600660029054906101000a900460ff168015610d5657506008600083815260200190815260200160002060009054906101000a900460ff165b15610d8d576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d9783836129cb565b505050565b610da46125ee565b81600481905550806005819055505050565b600063150b7a0260e01b905095945050505050565b6000610dd56129db565b610ddd612826565b60010154610de9612826565b60000154030390507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610e1a6129e4565b14610e3057610e27612826565b60080154810190505b90565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e8d57610e7033612924565b610e8c57610e7c612970565b15610e8b57610e8a33612987565b5b5b5b600660029054906101000a900460ff168015610ec657506008600083815260200190815260200160002060009054906101000a900460ff165b15610efd576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f08848484612a0c565b50505050565b6000806000610f1b612d03565b905060008160010160008781526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036110b357816000016040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b60006110bd612d2b565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff16876110e99190615472565b6110f391906154e3565b9050816000015181945094505050509250929050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111635761114633612924565b61116257611152612970565b156111615761116033612987565b5b5b5b600660029054906101000a900460ff16801561119c57506008600083815260200190815260200160002060009054906101000a900460ff165b156111d3576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6111de848484612d35565b50505050565b6111ef816001612d55565b50565b600660029054906101000a900460ff1681565b60045481565b6112136125ee565b806000908161122291906156c0565b5050565b61122e6125ee565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61127a6125ee565b60005b828290508110156112c0576112b361129361155d565b308585858181106112a7576112a6615792565b5b90506020020135611109565b808060010191505061127d565b505050565b606080600084849050905060405191508082528060051b90508060208301016040525b6000811461131a576000602082039150818601359050600061130982611c38565b9050808360208601015250506112e8565b819250505092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061135682612fbc565b9050919050565b6113656125ee565b60005b848490508110156113ca576113bd85858381811061138957611388615792565b5b905060200201602081019061139e9190614c5b565b8484848181106113b1576113b0615792565b5b905060200201356130f0565b8080600101915050611368565b5050505050565b6113d96125ee565b8060038190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361142957611428638f4eb60460e01b61291a565b5b67ffffffffffffffff61143a612826565b60050160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b61148b6125ee565b611495600061329b565b565b60086020528060005260406000206000915054906101000a900460ff1681565b6114bf6125ee565b80600660026101000a81548160ff02191690831515021790555050565b60607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6115076129e4565b1461151d5761151c63bdba09d760e01b61291a565b5b60006115276129db565b90506000611533613372565b9050606081831461154c57611549858484613385565b90505b809350505050919050565b60055481565b600080611568613541565b90508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b606061159f612826565b60030180546115ad90615412565b80601f01602080910402602001604051908101604052809291908181526020018280546115d990615412565b80156116265780601f106115fb57610100808354040283529160200191611626565b820191906000526020600020905b81548152906001019060200180831161160957829003601f168201915b5050505050905090565b6000805461163d90615412565b80601f016020809104026020016040519081016040528092919081815260200182805461166990615412565b80156116b65780601f1061168b576101008083540402835291602001916116b6565b820191906000526020600020905b81548152906001019060200180831161169957829003601f168201915b505050505081565b6116c66125ee565b60005b82829050811015611770573073ffffffffffffffffffffffffffffffffffffffff166342842e0e306116f961155d565b86868681811061170c5761170b615792565b5b905060200201356040518463ffffffff1660e01b8152600401611731939291906157c1565b600060405180830381600087803b15801561174b57600080fd5b505af115801561175f573d6000803e3d6000fd5b5050505080806001019150506116c9565b505050565b6060611782848484613385565b90509392505050565b6117936125ee565b80600660006101000a81548160ff02191690831515021790555050565b816117ba81612924565b6117d6576117c6612970565b156117d5576117d481612987565b5b5b6117e08383613569565b505050565b600660009054906101000a900460ff1681565b6118006125ee565b80600660016101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146118775761185a33612924565b61187657611866612970565b156118755761187433612987565b5b5b5b600660029054906101000a900460ff1680156118b057506008600084815260200190815260200160002060009054906101000a900460ff165b156118e7576040517fa3292bd500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118f38585858561367d565b5050505050565b6000600454421015801561191057506005544211155b905090565b61191d6136cf565b6119256118fa565b61195b576040517f4d39fcb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119ad878787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613726565b6119e3576040517fa3402a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84849050811015611b285760076000868684818110611a0857611a07615792565b5b9050602002016020810190611a1d9190614c5b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611a9c576040517fa308b6e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160076000878785818110611ab557611ab4615792565b5b9050602002016020810190611aca9190614c5b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506119e6565b506000611b33613372565b9050611b4a888789611b4591906157f8565b6130f0565b60005b86811015611ba05760016008600083611b64613812565b611b6e919061582c565b815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050611b4d565b508773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f5f9e58d894248b707354c9e8bda0dcf30e32084288af8a0b27d396c2198747cb89898989878d8f8a611c0291906157f8565b611c0c91906157f8565b604051611c1e96959493929190615914565b60405180910390a350611c2f61386d565b50505050505050565b611c40614566565b611c486129db565b8210611ca757611c566129e4565b821115611c6d57611c6682613886565b9050611ca8565b611c75613372565b821015611ca6575b611c86826138ba565b611c965781600190039150611c7d565b611c9f82613886565b9050611ca8565b5b5b919050565b6060611cb882612853565b611ccd57611ccc63a14c4b5060e01b61291a565b5b6000611cd76138e3565b90506000815103611cf75760405180602001604052806000815250611d22565b80611d0184613975565b604051602001611d129291906159ac565b6040516020818303038152906040525b915050919050565b60076020528060005260406000206000915054906101000a900460ff1681565b60035481565b600660009054906101000a900460ff1615611d97576040517ff302244700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16611db78261134b565b73ffffffffffffffffffffffffffffffffffffffff1614611e04576040517ff3df485c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e0c6139c5565b73ffffffffffffffffffffffffffffffffffffffff16611e2b8361134b565b73ffffffffffffffffffffffffffffffffffffffff1614611e78576040517f71d78b1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611e8a611e836139c5565b3084612a0c565b3073ffffffffffffffffffffffffffffffffffffffff166323b872dd30611eaf6139c5565b846040518463ffffffff1660e01b8152600401611ece939291906157c1565b600060405180830381600087803b158015611ee857600080fd5b505af1158015611efc573d6000803e3d6000fd5b50505050611f086139c5565b73ffffffffffffffffffffffffffffffffffffffff167f82ce360ee1020ce141460af73d00dec45f239c7867e5fc3d9917f5c04e5840cc8383604051611f4f9291906159d0565b60405180910390a25050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611f995760019050611fa6565b611fa383836139cd565b90505b92915050565b611fb46125ee565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6120006125ee565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036120725760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401612069919061488a565b60405180910390fd5b61207b8161329b565b50565b6000612088613a6a565b905060008160000160089054906101000a900460ff1615905060008260000160009054906101000a900467ffffffffffffffff1690506000808267ffffffffffffffff161480156120d65750825b9050600060018367ffffffffffffffff1614801561210b575060003073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015612119575080155b15612150576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018560000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083156121a05760018560000160086101000a81548160ff0219169083151502179055505b6121a8613a92565b60000160019054906101000a900460ff166121dc576121c5613a92565b60000160009054906101000a900460ff16156121e5565b6121e4613abf565b5b612224576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161221b90615a6b565b60405180910390fd5b600061222e613a92565b60000160019054906101000a900460ff161590508015612291576001612252613a92565b60000160016101000a81548160ff0219169083151502179055506001612276613a92565b60000160006101000a81548160ff0219169083151502179055505b6123056040518060400160405280600781526020017f4a69726173616e000000000000000000000000000000000000000000000000008152506040518060400160405280600781526020017f4a49524153414e00000000000000000000000000000000000000000000000000815250613ad6565b61230e33613b3c565b612316613b50565b61231e613b5a565b6001600660016101000a81548160ff021916908315150217905550612345336101f4612675565b866000908161235491906156c0565b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061271160038190555063669f2ac060048190555063689f69c66005819055506001600660026101000a81548160ff02191690831515021790555033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600660006101000a81548160ff021916908315150217905550801561245757600061243c613a92565b60000160016101000a81548160ff0219169083151502179055505b5083156124b45760008560000160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d260016040516124ab9190615ac6565b60405180910390a15b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061253d57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061256d5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806125e757506125e682613b7b565b5b9050919050565b6125f6613be5565b73ffffffffffffffffffffffffffffffffffffffff1661261461155d565b73ffffffffffffffffffffffffffffffffffffffff161461267357612637613be5565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161266a919061488a565b60405180910390fd5b565b600061267f612d03565b9050600061268b612d2b565b6bffffffffffffffffffffffff16905080836bffffffffffffffffffffffff1611156126f05782816040517f6f483d090000000000000000000000000000000000000000000000000000000081526004016126e7929190615b12565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036127625760006040517fb6d9900a000000000000000000000000000000000000000000000000000000008152600401612759919061488a565b60405180910390fd5b60405180604001604052808573ffffffffffffffffffffffffffffffffffffffff168152602001846bffffffffffffffffffffffff168152508260000160008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555090505050505050565b6000807f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090508091505090565b60008161285e6129db565b116129145761286b6129e4565b82111561289e5761289761287d612826565b600401600084815260200190815260200160002054613bed565b9050612915565b6128a6612826565b600001548210156129135760005b60006128be612826565b600401600085815260200190815260200160002054915081036128ec57826128e590615b3b565b92506128b4565b60007c01000000000000000000000000000000000000000000000000000000008216149150505b5b5b919050565b8060005260046000fd5b6000731e0049783f008a0085193e00003d00cd54003c7173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000600660019054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa6129c3573d6000803e3d6000fd5b6000603a5250565b6129d782826001613c2e565b5050565b60006001905090565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905090565b6000612a1782612fbc565b905073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff161693508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612a8c57612a8b63a114810060e01b61291a565b5b600080612a9884613d66565b91509150612aae8187612aa96139c5565b613d96565b612ad957612ac386612abe6139c5565b611f5b565b612ad857612ad76359c896be60e01b61291a565b5b5b612ae68686866001613dda565b8015612af157600082555b612af9612826565b60050160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550612b50612826565b60050160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612bd185612bad888887613de0565b7c020000000000000000000000000000000000000000000000000000000017613e08565b612bd9612826565b60040160008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612c7b5760006001850190506000612c2a612826565b60040160008381526020019081526020016000205403612c7957612c4c612826565b600001548114612c785783612c5f612826565b6004016000838152602001908152602001600020819055505b5b505b600073ffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff161690508481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460008103612ced57612cec63ea553b3460e01b61291a565b5b612cfa8787876001613e33565b50505050505050565b60007fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00905090565b6000612710905090565b612d508383836040518060200160405280600081525061181d565b505050565b6000612d6083612fbc565b90506000819050600080612d7386613d66565b915091508415612dbb57612d8f8184612d8a6139c5565b613d96565b612dba57612da483612d9f6139c5565b611f5b565b612db957612db86359c896be60e01b61291a565b5b5b5b612dc9836000886001613dda565b8015612dd457600082555b600160806001901b03612de5612826565b60050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612e8583612e4285600088613de0565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717613e08565b612e8d612826565b60040160008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603612f2f5760006001870190506000612ede612826565b60040160008381526020019081526020016000205403612f2d57612f00612826565b600001548114612f2c5784612f13612826565b6004016000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f99836000886001613e33565b612fa1612826565b60010160008154809291906001019190505550505050505050565b600081612fc76129db565b116130da57612fd4612826565b6004016000838152602001908152602001600020549050612ff36129e4565b8211156130185761300381613bed565b6130eb5761301763df2d9b4260e01b61291a565b5b600081036130b157613028612826565b6000015482106130435761304263df2d9b4260e01b61291a565b5b5b61304c612826565b60040160008360019003935083815260200190815260200160002054905060008103156130ac5760007c0100000000000000000000000000000000000000000000000000000000821603156130eb576130ab63df2d9b4260e01b61291a565b5b613044565b60007c0100000000000000000000000000000000000000000000000000000000821603156130eb575b6130ea63df2d9b4260e01b61291a565b5b919050565b60006130fa612826565b600001549050600082036131195761311863b562e8dd60e01b61291a565b5b6131266000848385613dda565b613146836131376000866000613de0565b61314085613e39565b17613e08565b61314e612826565b600401600083815260200190815260200160002081905550600160406001901b178202613179612826565b60050160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600073ffffffffffffffffffffffffffffffffffffffff8473ffffffffffffffffffffffffffffffffffffffff16169050600081036132105761320f632e07630060e01b61291a565b5b6000838301905060008390506132246129e4565b60018303111561323f5761323e6381647e3a60e01b61291a565b5b5b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103613240578161327f612826565b600001819055505050506132966000848385613e33565b505050565b60006132a5613541565b905060008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b600061337c612826565b60000154905090565b606081831061339f5761339e6332c1995a60e01b61291a565b5b6133a76129db565b8310156133b9576133b66129db565b92505b60006133c3613372565b905060007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6133f06129e4565b036133fb57816133fd565b835b905080841061340a578093505b6000613415876113e3565b905084861061342357600090505b6000811461353757808686031161343a5785850390505b600060405194506001820160051b8501905080604052600061345b88611c38565b90506000816040015161347057816000015190505b60005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61349c6129e4565b146134cb57868a036134b65760016134b26129e4565b0199505b6134be6129e4565b8a11156134ca57600091505b5b6134d48a613886565b92506040830151600081146134ec5760009250613512565b8351156134f857835192505b8b831860601b613511576001820191508a8260051b8a01525b5b5060018a01995083604052888a148061352a57508481145b1561347357808852505050505b5050509392505050565b60007f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b80613572612826565b600701600061357f6139c5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661362c6139c5565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516136719190614669565b60405180910390a35050565b613688848484610e33565b60008373ffffffffffffffffffffffffffffffffffffffff163b146136c9576136b384848484613e49565b6136c8576136c763d1a57ed660e01b61291a565b5b5b50505050565b60006136d9613f78565b90506002816000015403613719576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002816000018190555050565b600080878787878760405160200161373f929190615b64565b6040516020818303038152906040526040516020016137619493929190615c38565b60405160208183030381529060405280519060200120905060008160405160200161378c9190615cf9565b60405160208183030381529060405280519060200120905060006137b08286613fa0565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161493505050509695505050505050565b600061381c6129db565b613824612826565b600001540390507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6138546129e4565b1461386a57613861612826565b60080154810190505b90565b6000613877613f78565b90506001816000018190555050565b61388e614566565b6138b3613899612826565b600401600084815260200190815260200160002054613fcc565b9050919050565b6000806138c5612826565b60040160008481526020019081526020016000205414159050919050565b6060600080546138f290615412565b80601f016020809104026020016040519081016040528092919081815260200182805461391e90615412565b801561396b5780601f106139405761010080835404028352916020019161396b565b820191906000526020600020905b81548152906001019060200180831161394e57829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b6001156139b057600184039350600a81066030018453600a810490508061398e575b50828103602084039350808452505050919050565b600033905090565b60006139d7612826565b60070160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b6000807fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90508091505090565b6000803090506000813b9050600081149250505090565b613ade613a92565b60000160019054906101000a900460ff16613b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b2590615d91565b60405180910390fd5b613b388282614082565b5050565b613b4461414e565b613b4d8161418e565b50565b613b5861414e565b565b613b79733cc6cdda760b79bafa08df41ecfa224f810dceb66001614214565b565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b60007c0100000000000000000000000000000000000000000000000000000000821673ffffffffffffffffffffffffffffffffffffffff8316119050919050565b6000613c398361134b565b9050818015613c7b57508073ffffffffffffffffffffffffffffffffffffffff16613c626139c5565b73ffffffffffffffffffffffffffffffffffffffff1614155b15613ca757613c9181613c8c6139c5565b611f5b565b613ca657613ca563cfb3b94260e01b61291a565b5b5b83613cb0612826565b600601600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550828473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a450505050565b6000806000613d73612826565b600601600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613df7868684614289565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613e6f6139c5565b8786866040518563ffffffff1660e01b8152600401613e919493929190615dfb565b6020604051808303816000875af1925050508015613ecd57506040513d601f19601f82011682018060405250810190613eca9190615e5c565b60015b613f25573d8060008114613efd576040519150601f19603f3d011682016040523d82523d6000602084013e613f02565b606091505b506000815103613f1d57613f1c63d1a57ed660e01b61291a565b5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60007f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00905090565b600080600080613fb08686614292565b925092509250613fc082826142ee565b82935050505092915050565b613fd4614566565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b61408a613a92565b60000160019054906101000a900460ff166140da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016140d190615d91565b60405180910390fd5b816140e3612826565b60020190816140f291906156c0565b50806140fc612826565b600301908161410b91906156c0565b506141146129db565b61411c612826565b6000018190555061412b6129db565b6141336129e4565b101561414a5761414963fed8210f60e01b61291a565b5b5050565b614156614452565b61418c576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61419661414e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036142085760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016141ff919061488a565b60405180910390fd5b6142118161329b565b50565b637d3e3dbe8260601b60601c925081614240578261423857634420e4869050614240565b63a0af290390505b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af161427f578060005160e01c0361427e57600080fd5b5b6000602452505050565b60009392505050565b600080600060418451036142d75760008060006020870151925060408701519150606087015160001a90506142c988828585614472565b9550955095505050506142e7565b60006002855160001b9250925092505b9250925092565b6000600381111561430257614301615e89565b5b82600381111561431557614314615e89565b5b031561444e576001600381111561432f5761432e615e89565b5b82600381111561434257614341615e89565b5b03614379576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600381111561438d5761438c615e89565b5b8260038111156143a05761439f615e89565b5b036143e5578060001c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016143dc9190614a4b565b60405180910390fd5b6003808111156143f8576143f7615e89565b5b82600381111561440b5761440a615e89565b5b0361444d57806040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004016144449190615ec7565b60405180910390fd5b5b5050565b600061445c613a6a565b60000160089054906101000a900460ff16905090565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c11156144b257600060038592509250925061455c565b6000600188888888604051600081526020016040526040516144d79493929190615efe565b6020604051602081039080840390855afa1580156144f9573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361454d57600060016000801b9350935093505061455c565b8060008060001b935093509350505b9450945094915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6145fe816145c9565b811461460957600080fd5b50565b60008135905061461b816145f5565b92915050565b600060208284031215614637576146366145bf565b5b60006146458482850161460c565b91505092915050565b60008115159050919050565b6146638161464e565b82525050565b600060208201905061467e600083018461465a565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006146af82614684565b9050919050565b6146bf816146a4565b81146146ca57600080fd5b50565b6000813590506146dc816146b6565b92915050565b60006bffffffffffffffffffffffff82169050919050565b614703816146e2565b811461470e57600080fd5b50565b600081359050614720816146fa565b92915050565b6000806040838503121561473d5761473c6145bf565b5b600061474b858286016146cd565b925050602061475c85828601614711565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156147a0578082015181840152602081019050614785565b60008484015250505050565b6000601f19601f8301169050919050565b60006147c882614766565b6147d28185614771565b93506147e2818560208601614782565b6147eb816147ac565b840191505092915050565b6000602082019050818103600083015261481081846147bd565b905092915050565b6000819050919050565b61482b81614818565b811461483657600080fd5b50565b60008135905061484881614822565b92915050565b600060208284031215614864576148636145bf565b5b600061487284828501614839565b91505092915050565b614884816146a4565b82525050565b600060208201905061489f600083018461487b565b92915050565b600080604083850312156148bc576148bb6145bf565b5b60006148ca858286016146cd565b92505060206148db85828601614839565b9150509250929050565b600080604083850312156148fc576148fb6145bf565b5b600061490a85828601614839565b925050602061491b85828601614839565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f84011261494a57614949614925565b5b8235905067ffffffffffffffff8111156149675761496661492a565b5b6020830191508360018202830111156149835761498261492f565b5b9250929050565b6000806000806000608086880312156149a6576149a56145bf565b5b60006149b4888289016146cd565b95505060206149c5888289016146cd565b94505060406149d688828901614839565b935050606086013567ffffffffffffffff8111156149f7576149f66145c4565b5b614a0388828901614934565b92509250509295509295909350565b614a1b816145c9565b82525050565b6000602082019050614a366000830184614a12565b92915050565b614a4581614818565b82525050565b6000602082019050614a606000830184614a3c565b92915050565b600080600060608486031215614a7f57614a7e6145bf565b5b6000614a8d868287016146cd565b9350506020614a9e868287016146cd565b9250506040614aaf86828701614839565b9150509250925092565b6000604082019050614ace600083018561487b565b614adb6020830184614a3c565b9392505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b614b1f826147ac565b810181811067ffffffffffffffff82111715614b3e57614b3d614ae7565b5b80604052505050565b6000614b516145b5565b9050614b5d8282614b16565b919050565b600067ffffffffffffffff821115614b7d57614b7c614ae7565b5b614b86826147ac565b9050602081019050919050565b82818337600083830152505050565b6000614bb5614bb084614b62565b614b47565b905082815260208101848484011115614bd157614bd0614ae2565b5b614bdc848285614b93565b509392505050565b600082601f830112614bf957614bf8614925565b5b8135614c09848260208601614ba2565b91505092915050565b600060208284031215614c2857614c276145bf565b5b600082013567ffffffffffffffff811115614c4657614c456145c4565b5b614c5284828501614be4565b91505092915050565b600060208284031215614c7157614c706145bf565b5b6000614c7f848285016146cd565b91505092915050565b60008083601f840112614c9e57614c9d614925565b5b8235905067ffffffffffffffff811115614cbb57614cba61492a565b5b602083019150836020820283011115614cd757614cd661492f565b5b9250929050565b60008060208385031215614cf557614cf46145bf565b5b600083013567ffffffffffffffff811115614d1357614d126145c4565b5b614d1f85828601614c88565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b614d60816146a4565b82525050565b600067ffffffffffffffff82169050919050565b614d8381614d66565b82525050565b614d928161464e565b82525050565b600062ffffff82169050919050565b614db081614d98565b82525050565b608082016000820151614dcc6000850182614d57565b506020820151614ddf6020850182614d7a565b506040820151614df26040850182614d89565b506060820151614e056060850182614da7565b50505050565b6000614e178383614db6565b60808301905092915050565b6000602082019050919050565b6000614e3b82614d2b565b614e458185614d36565b9350614e5083614d47565b8060005b83811015614e81578151614e688882614e0b565b9750614e7383614e23565b925050600181019050614e54565b5085935050505092915050565b60006020820190508181036000830152614ea88184614e30565b905092915050565b60008083601f840112614ec657614ec5614925565b5b8235905067ffffffffffffffff811115614ee357614ee261492a565b5b602083019150836020820283011115614eff57614efe61492f565b5b9250929050565b60008060008060408587031215614f2057614f1f6145bf565b5b600085013567ffffffffffffffff811115614f3e57614f3d6145c4565b5b614f4a87828801614eb0565b9450945050602085013567ffffffffffffffff811115614f6d57614f6c6145c4565b5b614f7987828801614c88565b925092505092959194509250565b614f908161464e565b8114614f9b57600080fd5b50565b600081359050614fad81614f87565b92915050565b600060208284031215614fc957614fc86145bf565b5b6000614fd784828501614f9e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61501581614818565b82525050565b6000615027838361500c565b60208301905092915050565b6000602082019050919050565b600061504b82614fe0565b6150558185614feb565b935061506083614ffc565b8060005b83811015615091578151615078888261501b565b975061508383615033565b925050600181019050615064565b5085935050505092915050565b600060208201905081810360008301526150b88184615040565b905092915050565b6000806000606084860312156150d9576150d86145bf565b5b60006150e7868287016146cd565b93505060206150f886828701614839565b925050604061510986828701614839565b9150509250925092565b6000806040838503121561512a576151296145bf565b5b6000615138858286016146cd565b925050602061514985828601614f9e565b9150509250929050565b600067ffffffffffffffff82111561516e5761516d614ae7565b5b615177826147ac565b9050602081019050919050565b600061519761519284615153565b614b47565b9050828152602081018484840111156151b3576151b2614ae2565b5b6151be848285614b93565b509392505050565b600082601f8301126151db576151da614925565b5b81356151eb848260208601615184565b91505092915050565b6000806000806080858703121561520e5761520d6145bf565b5b600061521c878288016146cd565b945050602061522d878288016146cd565b935050604061523e87828801614839565b925050606085013567ffffffffffffffff81111561525f5761525e6145c4565b5b61526b878288016151c6565b91505092959194509250565b600080600080600080600060a0888a031215615296576152956145bf565b5b60006152a48a828b016146cd565b97505060206152b58a828b01614839565b96505060406152c68a828b01614839565b955050606088013567ffffffffffffffff8111156152e7576152e66145c4565b5b6152f38a828b01614eb0565b9450945050608088013567ffffffffffffffff811115615316576153156145c4565b5b6153228a828b01614934565b925092505092959891949750929550565b6080820160008201516153496000850182614d57565b50602082015161535c6020850182614d7a565b50604082015161536f6040850182614d89565b5060608201516153826060850182614da7565b50505050565b600060808201905061539d6000830184615333565b92915050565b600080604083850312156153ba576153b96145bf565b5b60006153c8858286016146cd565b92505060206153d9858286016146cd565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061542a57607f821691505b60208210810361543d5761543c6153e3565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061547d82614818565b915061548883614818565b925082820261549681614818565b915082820484148315176154ad576154ac615443565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006154ee82614818565b91506154f983614818565b925082615509576155086154b4565b5b828204905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026155767fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82615539565b6155808683615539565b95508019841693508086168417925050509392505050565b6000819050919050565b60006155bd6155b86155b384614818565b615598565b614818565b9050919050565b6000819050919050565b6155d7836155a2565b6155eb6155e3826155c4565b848454615546565b825550505050565b600090565b6156006155f3565b61560b8184846155ce565b505050565b5b8181101561562f576156246000826155f8565b600181019050615611565b5050565b601f8211156156745761564581615514565b61564e84615529565b8101602085101561565d578190505b61567161566985615529565b830182615610565b50505b505050565b600082821c905092915050565b600061569760001984600802615679565b1980831691505092915050565b60006156b08383615686565b9150826002028217905092915050565b6156c982614766565b67ffffffffffffffff8111156156e2576156e1614ae7565b5b6156ec8254615412565b6156f7828285615633565b600060209050601f83116001811461572a5760008415615718578287015190505b61572285826156a4565b86555061578a565b601f19841661573886615514565b60005b828110156157605784890151825560018201915060208501945060208101905061573b565b8683101561577d5784890151615779601f891682615686565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006060820190506157d6600083018661487b565b6157e3602083018561487b565b6157f06040830184614a3c565b949350505050565b600061580382614818565b915061580e83614818565b925082820190508082111561582657615825615443565b5b92915050565b600061583782614818565b915061584283614818565b925082820390508181111561585a57615859615443565b5b92915050565b600082825260208201905092915050565b6000819050919050565b60006158878383614d57565b60208301905092915050565b60006158a260208401846146cd565b905092915050565b6000602082019050919050565b60006158c38385615860565b93506158ce82615871565b8060005b85811015615907576158e48284615893565b6158ee888261587b565b97506158f9836158aa565b9250506001810190506158d2565b5085925050509392505050565b600060a0820190506159296000830189614a3c565b6159366020830188614a3c565b81810360408301526159498186886158b7565b90506159586060830185614a3c565b6159656080830184614a3c565b979650505050505050565b600081905092915050565b600061598682614766565b6159908185615970565b93506159a0818560208601614782565b80840191505092915050565b60006159b8828561597b565b91506159c4828461597b565b91508190509392505050565b60006040820190506159e56000830185614a3c565b6159f26020830184614a3c565b9392505050565b7f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460008201527f20697320616c726561647920696e697469616c697a6564000000000000000000602082015250565b6000615a55603783614771565b9150615a60826159f9565b604082019050919050565b60006020820190508181036000830152615a8481615a48565b9050919050565b6000819050919050565b6000615ab0615aab615aa684615a8b565b615598565b614d66565b9050919050565b615ac081615a95565b82525050565b6000602082019050615adb6000830184615ab7565b92915050565b6000615afc615af7615af2846146e2565b615598565b614818565b9050919050565b615b0c81615ae1565b82525050565b6000604082019050615b276000830185615b03565b615b346020830184614a3c565b9392505050565b6000615b4682614818565b915060008203615b5957615b58615443565b5b600182039050919050565b60006020820190508181036000830152615b7f8184866158b7565b90509392505050565b60008160601b9050919050565b6000615ba082615b88565b9050919050565b6000615bb282615b95565b9050919050565b615bca615bc5826146a4565b615ba7565b82525050565b6000819050919050565b615beb615be682614818565b615bd0565b82525050565b600081519050919050565b600081905092915050565b6000615c1282615bf1565b615c1c8185615bfc565b9350615c2c818560208601614782565b80840191505092915050565b6000615c448287615bb9565b601482019150615c548286615bda565b602082019150615c648285615bda565b602082019150615c748284615c07565b915081905095945050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000615cb8601c83615970565b9150615cc382615c82565b601c82019050919050565b6000819050919050565b6000819050919050565b615cf3615cee82615cce565b615cd8565b82525050565b6000615d0482615cab565b9150615d108284615ce2565b60208201915081905092915050565b7f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460008201527f206973206e6f7420696e697469616c697a696e67000000000000000000000000602082015250565b6000615d7b603483614771565b9150615d8682615d1f565b604082019050919050565b60006020820190508181036000830152615daa81615d6e565b9050919050565b600082825260208201905092915050565b6000615dcd82615bf1565b615dd78185615db1565b9350615de7818560208601614782565b615df0816147ac565b840191505092915050565b6000608082019050615e10600083018761487b565b615e1d602083018661487b565b615e2a6040830185614a3c565b8181036060830152615e3c8184615dc2565b905095945050505050565b600081519050615e56816145f5565b92915050565b600060208284031215615e7257615e716145bf565b5b6000615e8084828501615e47565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b615ec181615cce565b82525050565b6000602082019050615edc6000830184615eb8565b92915050565b600060ff82169050919050565b615ef881615ee2565b82525050565b6000608082019050615f136000830187615eb8565b615f206020830186615eef565b615f2d6040830185615eb8565b615f3a6060830184615eb8565b9594505050505056fea26469706673582212202aca4af1546121fd4c4dfce1b209a3b5dbbfa75db88cac6534f2265fe9decb6364736f6c63430008180033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.