Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 19 from a total of 19 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 | ||||
Mint | 15481870 | 839 days ago | IN | 0 ETH | 0.00051574 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ERC721CommunityImplementation
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; /** * @title LICENSE REQUIREMENT * @dev This contract is licensed under the MIT license. * @dev You're not allowed to remove DEVELOPER() and DEVELOPER_ADDRESS() from contract */ import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./interfaces/INFTExtension.sol"; import "./interfaces/IERC721Community.sol"; import "./utils/OpenseaProxy.sol"; // Want to launch your own collection? // Check out https://buildship.xyz // ,:loxO0KXXc // ,cdOKKKOxol:lKWl // ;oOXKko:, ;KNc // 'ox0X0d: cNK, // ',' ;xXX0x: dWk // ,cdO0KKKKKXKo, ,0Nl // ;oOXKko:,;kWMNl dWO' // ,o0XKd:' oNMMK: cXX: // 'ckNNk: ;KMN0c cXXl // 'OWMMWKOdl;' cl; oXXc // ;cclldxOKXKkl, ;kNO; // ;cdk0kl' ;clxXXo // ':oxo' c0WMMMMK; // :l: lNMWXxOWWo // '; :xdc' :XWd // , cXK; // ':, xXl // ;: ' o0c // ;c;,,,,' lx; // ''' cc // ,' contract ERC721CommunityImplementation is ERC721AUpgradeable, ReentrancyGuardUpgradeable, OwnableUpgradeable, IERC721CommunityImplementation, IERC721Community // implements IERC2981 { using Address for address; using SafeERC20 for IERC20; using Counters for Counters.Counter; Counters.Counter private _tokenIndexCounter; // token index counter uint256 internal constant SALE_STARTS_AT_INFINITY = 2**256 - 1; uint256 internal constant DEVELOPER_FEE = 500; // of 10,000 = 5% uint256 internal constant MAX_PER_MINT_LIMIT = 50; // based on ERC721A limitations address internal constant OPENSEA_CONDUIT = 0x1E0049783F008A0085193E00003D00cd54003c71; uint256 public startTimestamp = SALE_STARTS_AT_INFINITY; uint256 public reserved; uint256 public maxSupply; uint256 public maxPerMint; uint256 public maxPerWallet; uint256 public price; uint256 public royaltyFee; address public royaltyReceiver; address public payoutReceiver; address public uriExtension; bool public isPayoutChangeLocked; bool private isOpenSeaProxyActive; bool private startAtOne; /** * @dev Additional data for each token that needs to be stored and accessed on-chain */ mapping(uint256 => bytes32) public data; /** * @dev Storing how many tokens each address has minted in public sale */ mapping(address => uint256) public mintedBy; /** * @dev List of connected extensions */ INFTExtension[] public extensions; string public PROVENANCE_HASH = ""; string private CONTRACT_URI = ""; string private BASE_URI; string private URI_POSTFIX = ""; event ExtensionAdded(address indexed extensionAddress); event ExtensionRevoked(address indexed extensionAddress); event ExtensionURIAdded(address indexed extensionAddress); function initialize( string memory _name, string memory _symbol, uint256 _maxSupply, uint256 _nReserved, bool _startAtOne, string memory _uri, MintConfig memory _config ) public initializerERC721A initializer { reserved = _nReserved; maxSupply = _maxSupply; // should be set before calling ERC721A_init ! startAtOne = _startAtOne; BASE_URI = _uri; // defaults startTimestamp = SALE_STARTS_AT_INFINITY; maxPerMint = MAX_PER_MINT_LIMIT; isOpenSeaProxyActive = true; __ERC721A_init(_name, _symbol); __ReentrancyGuard_init(); __Ownable_init(); _configure( _config.publicPrice, _config.maxTokensPerMint, _config.maxTokensPerWallet, _config.royaltyFee, _config.payoutReceiver, _config.shouldLockPayoutReceiver, _config.shouldStartSale, _config.shouldUseJsonExtension ); } function _configure( uint256 publicPrice, uint256 maxTokensPerMint, uint256 maxTokensPerWallet, uint256 _royaltyFee, address _payoutReceiver, bool shouldLockPayoutReceiver, bool shouldStartSale, bool shouldUseJsonExtension ) internal { if (publicPrice != 0) { price = publicPrice; } if (maxTokensPerMint > 0) { maxPerMint = maxTokensPerMint; } if (maxTokensPerWallet > 0) { maxPerWallet = maxTokensPerWallet; } if (_royaltyFee > 0) { royaltyFee = _royaltyFee; } if (_payoutReceiver != address(0)) { payoutReceiver = _payoutReceiver; } if (shouldLockPayoutReceiver) { isPayoutChangeLocked = true; } if (shouldStartSale) { // start sale right now startTimestamp = block.timestamp; } if (shouldUseJsonExtension) { URI_POSTFIX = ".json"; } } // This constructor ensures that this contract can only be used as a master copy // Marking constructor as initializer makes sure that real initializer cannot be called // Thus, as the owner of the contract is 0x0, no one can do anything with the contract // on the other hand, it's impossible to call this function in proxy, // so the real initializer is the only initializer /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function _baseURI() internal view override returns (string memory) { return BASE_URI; } function _startTokenId() internal view virtual override returns (uint256) { return startAtOne ? 1 : 0; } function contractURI() public view returns (string memory uri) { uri = bytes(CONTRACT_URI).length > 0 ? CONTRACT_URI : _baseURI(); } function tokenURI(uint256 tokenId) public view override returns (string memory) { if (uriExtension != address(0)) { string memory uri = INFTURIExtension(uriExtension).tokenURI( tokenId ); if (bytes(uri).length > 0) { return uri; } } if (bytes(URI_POSTFIX).length > 0) { return string(abi.encodePacked(super.tokenURI(tokenId), URI_POSTFIX)); } else { return super.tokenURI(tokenId); } } function startTokenId() public view returns (uint256) { return _startTokenId(); } // ----- Admin functions ----- function setBaseURI(string calldata uri) public onlyOwner { BASE_URI = uri; } // Contract-level metadata for Opensea function setContractURI(string calldata uri) public onlyOwner { CONTRACT_URI = uri; } function setPostfixURI(string memory postfix) public onlyOwner { URI_POSTFIX = postfix; } function setPrice(uint256 _price) public onlyOwner { price = _price; } function reduceMaxSupply(uint256 _maxSupply) public whenSaleNotStarted onlyOwner { require( _totalMinted() + reserved <= _maxSupply, "Max supply is too low, already minted more (+ reserved)" ); require( _maxSupply < maxSupply, "Cannot set higher than the current maxSupply" ); maxSupply = _maxSupply; } // Lock changing withdraw address function lockPayoutReceiver() public onlyOwner { isPayoutChangeLocked = true; } function isExtensionAdded(address _extension) public view returns (bool) { for (uint256 index = 0; index < extensions.length; index++) { if (address(extensions[index]) == _extension) { return true; } } return false; } function extensionsLength() public view returns (uint256) { return extensions.length; } // Extensions are allowed to mint function addExtension(address _extension) public onlyOwner { require(_extension != address(this), "Cannot add self as extension"); require(!isExtensionAdded(_extension), "Extension already added"); extensions.push(INFTExtension(_extension)); emit ExtensionAdded(_extension); } function revokeExtension(address _extension) public onlyOwner { uint256 index = 0; for (; index < extensions.length; index++) { if (extensions[index] == INFTExtension(_extension)) { break; } } extensions[index] = extensions[extensions.length - 1]; extensions.pop(); emit ExtensionRevoked(_extension); } function setExtensionTokenURI(address extension) public onlyOwner { require(extension != address(this), "Cannot add self as extension"); require( extension == address(0x0) || ERC165Checker.supportsInterface( extension, type(INFTURIExtension).interfaceId ), "Not conforms to extension" ); uriExtension = extension; emit ExtensionURIAdded(extension); } // function to disable gasless listings for security in case // opensea ever shuts down or is compromised // from CryptoCoven https://etherscan.io/address/0x5180db8f5c931aae63c74266b211f580155ecac8#code function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive) public onlyOwner { isOpenSeaProxyActive = _isOpenSeaProxyActive; } // ---- Minting ---- function _mintConsecutive( uint256 nTokens, address to, bytes32 extraData ) internal { require( _totalMinted() + nTokens + reserved <= maxSupply, "Not enough Tokens left." ); uint256 nextTokenId = _nextTokenId(); _safeMint(to, nTokens, ""); if (extraData.length > 0) { for (uint256 i; i < nTokens; i++) { uint256 tokenId = nextTokenId + i; data[tokenId] = extraData; } } } // ---- Mint control ---- modifier whenSaleStarted() { require(saleStarted(), "Sale not started"); _; } modifier whenSaleNotStarted() { require(!saleStarted(), "Sale should not be started"); _; } modifier whenNotPayoutChangeLocked() { require(!isPayoutChangeLocked, "Payout change is locked"); _; } modifier onlyExtension() { require( isExtensionAdded(msg.sender), "Extension should be added to contract before minting" ); _; } // ---- Mint public ---- // Contract can sell tokens function mint(uint256 nTokens) external payable nonReentrant whenSaleStarted { // setting it to 0 means no limit if (maxPerWallet > 0) { require( mintedBy[msg.sender] + nTokens <= maxPerWallet, "You cannot mint more than maxPerWallet tokens for one address!" ); // only store minted amounts after limit is enabled to save gas mintedBy[msg.sender] += nTokens; } require( nTokens <= maxPerMint, "You cannot mint more than MAX_TOKENS_PER_MINT tokens at once!" ); require(nTokens * price <= msg.value, "Inconsistent amount sent!"); _mintConsecutive(nTokens, msg.sender, 0x0); } // Owner can claim free tokens function claim(uint256 nTokens, address to) external nonReentrant onlyOwner { require(nTokens <= reserved, "That would exceed the max reserved."); reserved = reserved - nTokens; _mintConsecutive(nTokens, to, 0x0); } // ---- Mint via extension function mintExternal( uint256 nTokens, address to, bytes32 extraData ) external payable onlyExtension nonReentrant { _mintConsecutive(nTokens, to, extraData); } // ---- Mint configuration function updateMaxPerMint(uint256 _maxPerMint) public onlyOwner nonReentrant { require(_maxPerMint <= MAX_PER_MINT_LIMIT, "Too many tokens per mint"); maxPerMint = _maxPerMint; } // set to 0 to save gas, mintedBy is not used function updateMaxPerWallet(uint256 _maxPerWallet) public onlyOwner nonReentrant { maxPerWallet = _maxPerWallet; } // ---- Sale control ---- function updateStartTimestamp(uint256 _startTimestamp) public onlyOwner { startTimestamp = _startTimestamp; } function startSale() public onlyOwner { startTimestamp = block.timestamp; } function stopSale() public onlyOwner { startTimestamp = SALE_STARTS_AT_INFINITY; } function saleStarted() public view returns (bool) { return block.timestamp >= startTimestamp; } // ---- Offchain Info ---- // This should be set before sales open. function setProvenanceHash(string memory provenanceHash) public onlyOwner { PROVENANCE_HASH = provenanceHash; } function setRoyaltyFee(uint256 _royaltyFee) public onlyOwner { royaltyFee = _royaltyFee; } function setRoyaltyReceiver(address _receiver) public onlyOwner { royaltyReceiver = _receiver; } function setPayoutReceiver(address _receiver) public onlyOwner whenNotPayoutChangeLocked { payoutReceiver = payable(_receiver); } function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { receiver = getRoyaltyReceiver(); royaltyAmount = (salePrice * royaltyFee) / 10000; } function getPayoutReceiver() public view returns (address payable receiver) { receiver = payoutReceiver != address(0x0) ? payable(payoutReceiver) : payable(owner()); } function getRoyaltyReceiver() public view returns (address payable receiver) { receiver = royaltyReceiver != address(0x0) ? payable(royaltyReceiver) : getPayoutReceiver(); } // ---- Allow royalty deposits from Opensea ----- receive() external payable {} // ---- Withdraw ----- modifier onlyBuildship() { require( payable(msg.sender) == DEVELOPER_ADDRESS(), "Caller is not Buildship" ); _; } function _withdraw() private { uint256 balance = address(this).balance; uint256 amount = (balance * (10000 - DEVELOPER_FEE)) / 10000; address payable receiver = getPayoutReceiver(); address payable dev = DEVELOPER_ADDRESS(); Address.sendValue(receiver, amount); Address.sendValue(dev, balance - amount); } function withdraw() public virtual onlyOwner { _withdraw(); } function forceWithdrawBuildship() public virtual onlyBuildship { _withdraw(); } function withdrawToken(IERC20 token) public virtual onlyOwner { uint256 balance = token.balanceOf(address(this)); uint256 amount = (balance * (10000 - DEVELOPER_FEE)) / 10000; address payable receiver = getPayoutReceiver(); address payable dev = DEVELOPER_ADDRESS(); token.safeTransfer(receiver, amount); token.safeTransfer(dev, balance - amount); } function DEVELOPER() public pure returns (string memory _url) { _url = "https://buildship.xyz"; } function DEVELOPER_ADDRESS() public pure returns (address payable _dev) { _dev = payable(0x704C043CeB93bD6cBE570C6A2708c3E1C0310587); } // -------- ERC721 overrides -------- function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return interfaceId == type(IERC2981).interfaceId || interfaceId == type(IERC721Community).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings. * Taken from CryptoCoven: https://etherscan.io/address/0x5180db8f5c931aae63c74266b211f580155ecac8#code */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { if (isOpenSeaProxyActive && operator == OPENSEA_CONDUIT) { return true; } return super.isApprovedForAll(owner, operator); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.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()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable { using ERC721AStorage for ERC721AStorage.Layout; // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // CONSTRUCTOR // ============================================================= function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A { __ERC721A_init_unchained(name_, symbol_); } function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A { ERC721AStorage.layout()._name = name_; ERC721AStorage.layout()._symbol = symbol_; ERC721AStorage.layout()._currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return ERC721AStorage.layout()._currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return ERC721AStorage.layout()._currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return ERC721AStorage.layout()._burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = ERC721AStorage.layout()._packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); ERC721AStorage.layout()._packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return ERC721AStorage.layout()._name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return ERC721AStorage.layout()._symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(ERC721AStorage.layout()._packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (ERC721AStorage.layout()._packedOwnerships[index] == 0) { ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < ERC721AStorage.layout()._currentIndex) { uint256 packed = ERC721AStorage.layout()._packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = ERC721AStorage.layout()._packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } ERC721AStorage.layout()._tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return 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 { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); ERC721AStorage.layout()._operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return ERC721AStorage.layout()._operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < ERC721AStorage.layout()._currentIndex && // If within bounds, ERC721AStorage.layout()._packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. 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 virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`. ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public 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 virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (bytes4 retval) { return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); ERC721AStorage.layout()._currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); ERC721AStorage.layout()._currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = ERC721AStorage.layout()._currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (ERC721AStorage.layout()._currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. ERC721AStorage.layout()._packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { ERC721AStorage.layout()._burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = ERC721AStorage.layout()._packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); ERC721AStorage.layout()._packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../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. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../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; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface, */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return _supportsERC165Interface(account, type(IERC165).interfaceId) && !_supportsERC165Interface(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && _supportsERC165Interface(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in _interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!_supportsERC165Interface(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) { bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams); if (result.length < 32) return false; return success && abi.decode(result, (bool)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface INFTExtension is IERC165 {} interface INFTURIExtension is INFTExtension { function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** @dev config includes values have setters and can be changed later */ struct MintConfig { uint256 publicPrice; uint256 maxTokensPerMint; uint256 maxTokensPerWallet; uint256 royaltyFee; address payoutReceiver; bool shouldLockPayoutReceiver; bool shouldStartSale; bool shouldUseJsonExtension; } interface IERC721Community { function DEVELOPER() external pure returns (string memory _url); function DEVELOPER_ADDRESS() external pure returns (address payable _dev); // ------ View functions ------ function saleStarted() external view returns (bool); function isExtensionAdded(address extension) external view returns (bool); /** Extra information stored for each tokenId. Optional, provided on mint */ function data(uint256 tokenId) external view returns (bytes32); // ------ Mint functions ------ /** Mint from NFTExtension contract. Optionally provide data parameter. */ function mintExternal( uint256 tokenId, address to, bytes32 data ) external payable; // ------ Admin functions ------ function addExtension(address extension) external; function revokeExtension(address extension) external; function withdraw() external; // ------ View functions ------ /** Recommended royalty for tokenId sale. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); // ------ Admin functions ------ function setRoyaltyReceiver(address receiver) external; function setRoyaltyFee(uint256 fee) external; } interface IERC721CommunityImplementation { function initialize( string memory _name, string memory _symbol, uint256 _maxSupply, uint256 _nReserved, bool _startAtOne, string memory uri, MintConfig memory config ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; // These contract definitions are used to create a reference to the OpenSea // ProxyRegistry contract by using the registry's address (see isApprovedForAll). interface OwnableDelegateProxy { } interface ProxyRegistry { function proxies(address) external view returns (OwnableDelegateProxy); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.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(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @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; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ERC721AStorage { // Reference type for token approval. struct TokenApprovalRef { address value; } struct Layout { // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 _currentIndex; // The number of tokens burned. uint256 _burnCounter; // Token name string _name; // Token symbol string _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) _operatorApprovals; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT 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 // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../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; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(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. * * `initializer` is equivalent to `reinitializer(1)`, so 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. * * 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. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // 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, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 10000 }, "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":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extensionAddress","type":"address"}],"name":"ExtensionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extensionAddress","type":"address"}],"name":"ExtensionRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extensionAddress","type":"address"}],"name":"ExtensionURIAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEVELOPER","outputs":[{"internalType":"string","name":"_url","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"DEVELOPER_ADDRESS","outputs":[{"internalType":"address payable","name":"_dev","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_extension","type":"address"}],"name":"addExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nTokens","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"data","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"extensions","outputs":[{"internalType":"contract INFTExtension","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extensionsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forceWithdrawBuildship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPayoutReceiver","outputs":[{"internalType":"address payable","name":"receiver","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoyaltyReceiver","outputs":[{"internalType":"address payable","name":"receiver","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_nReserved","type":"uint256"},{"internalType":"bool","name":"_startAtOne","type":"bool"},{"internalType":"string","name":"_uri","type":"string"},{"components":[{"internalType":"uint256","name":"publicPrice","type":"uint256"},{"internalType":"uint256","name":"maxTokensPerMint","type":"uint256"},{"internalType":"uint256","name":"maxTokensPerWallet","type":"uint256"},{"internalType":"uint256","name":"royaltyFee","type":"uint256"},{"internalType":"address","name":"payoutReceiver","type":"address"},{"internalType":"bool","name":"shouldLockPayoutReceiver","type":"bool"},{"internalType":"bool","name":"shouldStartSale","type":"bool"},{"internalType":"bool","name":"shouldUseJsonExtension","type":"bool"}],"internalType":"struct MintConfig","name":"_config","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_extension","type":"address"}],"name":"isExtensionAdded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPayoutChangeLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPayoutReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nTokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nTokens","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"extraData","type":"bytes32"}],"name":"mintExternal","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"reduceMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_extension","type":"address"}],"name":"revokeExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"setExtensionTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOpenSeaProxyActive","type":"bool"}],"name":"setIsOpenSeaProxyActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setPayoutReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"postfix","type":"string"}],"name":"setPostfixURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royaltyFee","type":"uint256"}],"name":"setRoyaltyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stopSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerMint","type":"uint256"}],"name":"updateMaxPerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"updateMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"name":"updateStartTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uriExtension","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60001960985560a0604081905260006080819052620000219160a59162000208565b50604080516020810191829052600090819052620000429160a69162000208565b50604080516020810191829052600090819052620000639160a89162000208565b503480156200007157600080fd5b506000620000806001620000e7565b9050801562000099576000805461ff0019166101001790555b8015620000e0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50620002eb565b60008054610100900460ff161562000180578160ff1660011480156200012057506200011e30620001f960201b620032331760201c565b155b620001785760405162461bcd60e51b815260206004820152602e60248201526000805160206200554183398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b506000919050565b60005460ff808416911610620001df5760405162461bcd60e51b815260206004820152602e60248201526000805160206200554183398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016200016f565b506000805460ff191660ff92909216919091179055600190565b6001600160a01b03163b151590565b8280546200021690620002ae565b90600052602060002090601f0160209004810192826200023a576000855562000285565b82601f106200025557805160ff191683800117855562000285565b8280016001018555821562000285579182015b828111156200028557825182559160200191906001019062000268565b506200029392915062000297565b5090565b5b8082111562000293576000815560010162000298565b600181811c90821680620002c357607f821691505b60208210811415620002e557634e487b7160e01b600052602260045260246000fd5b50919050565b61524680620002fb6000396000f3fe6080604052600436106104335760003560e01c80638dc251e311610228578063c39c5a3511610128578063e6798baa116100bb578063f0ba84401161008a578063fe60d12c1161006f578063fe60d12c14610c23578063fecfda4914610c39578063ff1b655614610c5957600080fd5b8063f0ba844014610bd6578063f2fde38b14610c0357600080fd5b8063e6798baa14610b76578063e6fd48bc14610b8b578063e8a3d48514610ba1578063e985e9c514610bb657600080fd5b8063ddd5e1b2116100f7578063ddd5e1b214610b01578063e36b0b3714610b21578063e43082f714610b36578063e67151ae14610b5657600080fd5b8063c39c5a3514610a8b578063c87b56dd14610aab578063d5abeb0114610acb578063db85d59c14610ae157600080fd5b8063a0712d68116101bb578063a5bd52351161018a578063b66a0e5d1161016f578063b66a0e5d14610a40578063b88d4fde14610a55578063b8997a9714610a7557600080fd5b8063a5bd523514610a0b578063a769310a14610a2057600080fd5b8063a0712d6814610986578063a22cb46514610999578063a474935c146109b9578063a4f6628d146109eb57600080fd5b80639c9e7c96116101f75780639c9e7c961461091b5780639d26c210146109305780639fbc871314610950578063a035b1fe1461097057600080fd5b80638dc251e3146108a657806391b7f5ed146108c6578063938e3d7b146108e657806395d89b411461090657600080fd5b806342842e0e116103335780636352211e116102c6578063715018a6116102955780638589a1a01161027a5780638589a1a01461085357806389476069146108685780638da5cb5b1461088857600080fd5b8063715018a61461081e578063735328021461083357600080fd5b80636352211e146107a95780636b853314146107c95780636e878ffb146107e957806370a08231146107fe57600080fd5b8063507e094f11610302578063507e094f1461073b57806352ee46961461075157806355f804b3146107715780635c474f9e1461079157600080fd5b806342842e0e146106cb578063453c2310146106eb578063454e66c8146107015780634690521b1461072857600080fd5b806318160ddd116103c65780632a55205a116103955780633ccfd60b1161037a5780633ccfd60b146106695780633cef28d21461067e5780633e4086e5146106ab57600080fd5b80632a55205a146105e45780633c934ab31461062357600080fd5b806318160ddd1461056f57806320b7b8df1461058457806323b872dd146105a45780632a30e4c2146105c457600080fd5b8063081812fc11610402578063081812fc146104d7578063095ea7b31461050f578063109695231461052f578063170ff3e11461054f57600080fd5b806301ffc9a71461043f5780630563aae51461047457806306fdde03146104935780630768c618146104b557600080fd5b3661043a57005b600080fd5b34801561044b57600080fd5b5061045f61045a366004614887565b610c6e565b60405190151581526020015b60405180910390f35b34801561048057600080fd5b5060a4545b60405190815260200161046b565b34801561049f57600080fd5b506104a8610d16565b60405161046b91906148fc565b3480156104c157600080fd5b506104d56104d03660046149f5565b610dca565b005b3480156104e357600080fd5b506104f76104f2366004614a2a565b610e40565b6040516001600160a01b03909116815260200161046b565b34801561051b57600080fd5b506104d561052a366004614a58565b610ebc565b34801561053b57600080fd5b506104d561054a3660046149f5565b610fac565b34801561055b57600080fd5b506104d561056a366004614a84565b611019565b34801561057b57600080fd5b506104856111b2565b34801561059057600080fd5b5060a0546104f7906001600160a01b031681565b3480156105b057600080fd5b506104d56105bf366004614aa1565b611207565b3480156105d057600080fd5b506104d56105df366004614a84565b6114d0565b3480156105f057600080fd5b506106046105ff366004614ae2565b6115cf565b604080516001600160a01b03909316835260208301919091520161046b565b34801561062f57600080fd5b5060408051808201909152601581527f68747470733a2f2f6275696c64736869702e78797a000000000000000000000060208201526104a8565b34801561067557600080fd5b506104d5611600565b34801561068a57600080fd5b50610485610699366004614a84565b60a36020526000908152604090205481565b3480156106b757600080fd5b506104d56106c6366004614a2a565b611664565b3480156106d757600080fd5b506104d56106e6366004614aa1565b6116c3565b3480156106f757600080fd5b50610485609c5481565b34801561070d57600080fd5b5073704c043ceb93bd6cbe570c6a2708c3e1c03105876104f7565b6104d5610736366004614b04565b6116e3565b34801561074757600080fd5b50610485609b5481565b34801561075d57600080fd5b5060a1546104f7906001600160a01b031681565b34801561077d57600080fd5b506104d561078c366004614b2b565b6117ca565b34801561079d57600080fd5b5060985442101561045f565b3480156107b557600080fd5b506104f76107c4366004614a2a565b611830565b3480156107d557600080fd5b506104d56107e4366004614a84565b61183b565b3480156107f557600080fd5b506104f76119d7565b34801561080a57600080fd5b50610485610819366004614a84565b611a0f565b34801561082a57600080fd5b506104d5611a96565b34801561083f57600080fd5b506104d561084e366004614a2a565b611afa565b34801561085f57600080fd5b506104d5611cab565b34801561087457600080fd5b506104d5610883366004614a84565b611d46565b34801561089457600080fd5b506065546001600160a01b03166104f7565b3480156108b257600080fd5b506104d56108c1366004614a84565b611eb7565b3480156108d257600080fd5b506104d56108e1366004614a2a565b611f4b565b3480156108f257600080fd5b506104d5610901366004614b2b565b611faa565b34801561091257600080fd5b506104a8612010565b34801561092757600080fd5b506104d5612041565b34801561093c57600080fd5b506104d561094b366004614bb6565b6120a4565b34801561095c57600080fd5b50609f546104f7906001600160a01b031681565b34801561097c57600080fd5b50610485609d5481565b6104d5610994366004614a2a565b6123e5565b3480156109a557600080fd5b506104d56109b4366004614d33565b612636565b3480156109c557600080fd5b5060a15461045f9074010000000000000000000000000000000000000000900460ff1681565b3480156109f757600080fd5b5061045f610a06366004614a84565b612722565b348015610a1757600080fd5b506104f761278c565b348015610a2c57600080fd5b506104d5610a3b366004614a84565b6127b7565b348015610a4c57600080fd5b506104d561296a565b348015610a6157600080fd5b506104d5610a70366004614d6c565b6129ca565b348015610a8157600080fd5b50610485609e5481565b348015610a9757600080fd5b506104d5610aa6366004614a2a565b612a2d565b348015610ab757600080fd5b506104a8610ac6366004614a2a565b612b39565b348015610ad757600080fd5b50610485609a5481565b348015610aed57600080fd5b506104f7610afc366004614a2a565b612c50565b348015610b0d57600080fd5b506104d5610b1c366004614dec565b612c7a565b348015610b2d57600080fd5b506104d5612dc9565b348015610b4257600080fd5b506104d5610b51366004614e11565b612e2b565b348015610b6257600080fd5b506104d5610b71366004614a2a565b612ed0565b348015610b8257600080fd5b50610485612f2f565b348015610b9757600080fd5b5061048560985481565b348015610bad57600080fd5b506104a8612f39565b348015610bc257600080fd5b5061045f610bd1366004614e2e565b612f66565b348015610be257600080fd5b50610485610bf1366004614a2a565b60a26020526000908152604090205481565b348015610c0f57600080fd5b506104d5610c1e366004614a84565b61300d565b348015610c2f57600080fd5b5061048560995481565b348015610c4557600080fd5b506104d5610c54366004614a2a565b6130ef565b348015610c6557600080fd5b506104a86131a5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610d0157507fffffffff0000000000000000000000000000000000000000000000000000000082167f2238348f00000000000000000000000000000000000000000000000000000000145b80610d105750610d1082613242565b92915050565b60607f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c406002018054610d4790614e5c565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7390614e5c565b8015610dc05780601f10610d9557610100808354040283529160200191610dc0565b820191906000526020600020905b815481529060010190602001808311610da357829003601f168201915b5050505050905090565b6065546001600160a01b03163314610e295760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8051610e3c9060a890602084019061472e565b5050565b6000610e4b82613323565b610e81576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610ec782611830565b9050336001600160a01b03821614610f1957610ee38133612f66565b610f19576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6065546001600160a01b031633146110065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b8051610e3c9060a590602084019061472e565b6065546001600160a01b031633146110735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6001600160a01b0381163014156110cc5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610e20565b6110d581612722565b156111225760405162461bcd60e51b815260206004820152601760248201527f457874656e73696f6e20616c72656164792061646465640000000000000000006044820152606401610e20565b60a4805460018101825560009182527fe434dc35da084cf8d7e8186688ea2dacb53db7003d427af3abf351bd9d0a4e8d0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915560405190917f99c6112dbaef85e57ac8ca86dd23e3c785162b58a6e810e5d5e7455b568d66b191a250565b60006111bc6133b5565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40540303919050565b6000611212826133ee565b9050836001600160a01b0316816001600160a01b03161461125f576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604090208054338082146001600160a01b038816909114176112e4576112ae8633612f66565b6112e4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516611324576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561132f57600082555b6001600160a01b0386811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4560205260408082208054600019019055918716808252919020805460010190554260a01b177c02000000000000000000000000000000000000000000000000000000001760008581527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260409020557c02000000000000000000000000000000000000000000000000000000008316611487576001840160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054611485577f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405481146114855760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6065546001600160a01b0316331461152a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60a15474010000000000000000000000000000000000000000900460ff16156115955760405162461bcd60e51b815260206004820152601760248201527f5061796f7574206368616e6765206973206c6f636b65640000000000000000006044820152606401610e20565b60a080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000806115da61278c565b9150612710609e54846115ed9190614edf565b6115f79190614efe565b90509250929050565b6065546001600160a01b0316331461165a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116626134ec565b565b6065546001600160a01b031633146116be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609e55565b6116de838383604051806020016040528060008152506129ca565b505050565b6116ec33612722565b61175e5760405162461bcd60e51b815260206004820152603460248201527f457874656e73696f6e2073686f756c6420626520616464656420746f20636f6e60448201527f7472616374206265666f7265206d696e74696e670000000000000000000000006064820152608401610e20565b600260015414156117b15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b60026001556117c1838383613552565b50506001805550565b6065546001600160a01b031633146118245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116de60a783836147b2565b6000610d10826133ee565b6065546001600160a01b031633146118955760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6001600160a01b0381163014156118ee5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610e20565b6001600160a01b03811615806119295750611929817fc87b56dd00000000000000000000000000000000000000000000000000000000613644565b6119755760405162461bcd60e51b815260206004820152601960248201527f4e6f7420636f6e666f726d7320746f20657874656e73696f6e000000000000006044820152606401610e20565b60a180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f92597a601f19fe4d50f14ea76d7ba45d21bad7992f7e1709c605642b190de09290600090a250565b60a0546000906001600160a01b03166119ff57506065546001600160a01b031690565b905090565b5060a0546001600160a01b031690565b60006001600160a01b038216611a51576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45602052604090205467ffffffffffffffff1690565b6065546001600160a01b03163314611af05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116626000613660565b6098544210611b4b5760405162461bcd60e51b815260206004820152601a60248201527f53616c652073686f756c64206e6f7420626520737461727465640000000000006044820152606401610e20565b6065546001600160a01b03163314611ba55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b80609954611bb16136ca565b611bbb9190614f39565b1115611c2f5760405162461bcd60e51b815260206004820152603760248201527f4d617820737570706c7920697320746f6f206c6f772c20616c7265616479206d60448201527f696e746564206d6f726520282b207265736572766564290000000000000000006064820152608401610e20565b609a548110611ca65760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f742073657420686967686572207468616e2074686520637572726560448201527f6e74206d6178537570706c7900000000000000000000000000000000000000006064820152608401610e20565b609a55565b6065546001600160a01b03163314611d055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60a180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6065546001600160a01b03163314611da05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015611dfb57600080fd5b505afa158015611e0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e339190614f51565b90506000612710611e466101f482614f6a565b611e509084614edf565b611e5a9190614efe565b90506000611e666119d7565b905073704c043ceb93bd6cbe570c6a2708c3e1c0310587611e916001600160a01b03861683856136fc565b611eb081611e9f8587614f6a565b6001600160a01b03881691906136fc565b5050505050565b6065546001600160a01b03163314611f115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6065546001600160a01b03163314611fa55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609d55565b6065546001600160a01b031633146120045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116de60a683836147b2565b60607f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c406003018054610d4790614e5c565b3373704c043ceb93bd6cbe570c6a2708c3e1c03105871461165a5760405162461bcd60e51b815260206004820152601760248201527f43616c6c6572206973206e6f74204275696c64736869700000000000000000006044820152606401610e20565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166120fd577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f5460ff1615612101565b303b155b6121735760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610e20565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff161580156121f0577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b60006121fc600161377c565b9050801561223157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6099869055609a87905560a180547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff167601000000000000000000000000000000000000000000008715150217905583516122939060a790602087019061472e565b506000196098556032609b5560a180547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556122e989896138ce565b6122f1613974565b6122f96139f9565b612329836000015184602001518560400151866060015187608001518860a001518960c001518a60e00151613a7e565b801561238c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5080156123db577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050505050505050565b600260015414156124385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b600260015560985442101561248f5760405162461bcd60e51b815260206004820152601060248201527f53616c65206e6f742073746172746564000000000000000000000000000000006044820152606401610e20565b609c541561254e57609c5433600090815260a360205260409020546124b5908390614f39565b11156125295760405162461bcd60e51b815260206004820152603e60248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e206d617850657260448201527f57616c6c657420746f6b656e7320666f72206f6e6520616464726573732100006064820152608401610e20565b33600090815260a3602052604081208054839290612548908490614f39565b90915550505b609b548111156125c65760405162461bcd60e51b815260206004820152603d60248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e204d41585f544f60448201527f4b454e535f5045525f4d494e5420746f6b656e73206174206f6e6365210000006064820152608401610e20565b34609d54826125d59190614edf565b11156126235760405162461bcd60e51b815260206004820152601960248201527f496e636f6e73697374656e7420616d6f756e742073656e7421000000000000006044820152606401610e20565b61262f81336000613552565b5060018055565b6001600160a01b038216331415612679576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805b60a45481101561278357826001600160a01b031660a4828154811061274d5761274d614f81565b6000918252602090912001546001600160a01b031614156127715750600192915050565b8061277b81614fb0565b915050612726565b50600092915050565b609f546000906001600160a01b03166127a7576119fa6119d7565b50609f546001600160a01b031690565b6065546001600160a01b031633146128115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60005b60a45481101561286d57816001600160a01b031660a4828154811061283b5761283b614f81565b6000918252602090912001546001600160a01b0316141561285b5761286d565b8061286581614fb0565b915050612814565b60a4805461287d90600190614f6a565b8154811061288d5761288d614f81565b60009182526020909120015460a480546001600160a01b0390921691839081106128b9576128b9614f81565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a48054806128f8576128f8614fcb565b600082815260208120820160001990810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690559091019091556040516001600160a01b038416917fe056b30f86b962fc88925cb7559e4364707cab11d2c52e090e6c0db62eb9113591a25050565b6065546001600160a01b031633146129c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b42609855565b6129d5848484611207565b6001600160a01b0383163b15612a27576129f184848484613b97565b612a27576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6065546001600160a01b03163314612a875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60026001541415612ada5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b60026001556032811115612b305760405162461bcd60e51b815260206004820152601860248201527f546f6f206d616e7920746f6b656e7320706572206d696e7400000000000000006044820152606401610e20565b609b5560018055565b60a1546060906001600160a01b031615612bf95760a1546040517fc87b56dd000000000000000000000000000000000000000000000000000000008152600481018490526000916001600160a01b03169063c87b56dd9060240160006040518083038186803b158015612bab57600080fd5b505afa158015612bbf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612be79190810190614ffa565b805190915015612bf75792915050565b505b600060a88054612c0890614e5c565b90501115612c4257612c1982613cf2565b60a8604051602001612c2c929190615071565b6040516020818303038152906040529050919050565b610d1082613cf2565b919050565b60a48181548110612c6057600080fd5b6000918252602090912001546001600160a01b0316905081565b60026001541415612ccd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b60026001556065546001600160a01b03163314612d2c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609954821115612da45760405162461bcd60e51b815260206004820152602360248201527f5468617420776f756c642065786365656420746865206d61782072657365727660448201527f65642e00000000000000000000000000000000000000000000000000000000006064820152608401610e20565b81609954612db29190614f6a565b609955612dc182826000613552565b505060018055565b6065546001600160a01b03163314612e235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b600019609855565b6065546001600160a01b03163314612e855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60a180549115157501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6065546001600160a01b03163314612f2a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609855565b60006119fa6133b5565b6060600060a68054612f4a90614e5c565b905011612f59576119fa613d8f565b60a68054610d4790614e5c565b60a1546000907501000000000000000000000000000000000000000000900460ff168015612fb057506001600160a01b038216731e0049783f008a0085193e00003d00cd54003c71145b15612fbd57506001610d10565b6001600160a01b0380841660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083209386168352929052205460ff165b9392505050565b6065546001600160a01b031633146130675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6001600160a01b0381166130e35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e20565b6130ec81613660565b50565b6065546001600160a01b031633146131495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6002600154141561319c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b609c5560018055565b60a580546131b290614e5c565b80601f01602080910402602001604051908101604052809291908181526020018280546131de90614e5c565b801561322b5780601f106132005761010080835404028352916020019161322b565b820191906000526020600020905b81548152906001019060200180831161320e57829003601f168201915b505050505081565b6001600160a01b03163b151590565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806132d557507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b80610d105750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60008161332e6133b5565b1115801561335c57507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405482105b8015610d1057505060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b60a154600090760100000000000000000000000000000000000000000000900460ff166133e35760006133e6565b60015b60ff16905090565b600081806133fa6133b5565b116134ba577f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40548110156134ba5760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260409020547c010000000000000000000000000000000000000000000000000000000081166134b8575b8061300657506000190160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604090205461347b565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4760006127106134fe6101f482614f6a565b6135089084614edf565b6135129190614efe565b9050600061351e6119d7565b905073704c043ceb93bd6cbe570c6a2708c3e1c031058761353f8284613d9e565b612a278161354d8587614f6a565b613d9e565b609a54609954846135616136ca565b61356b9190614f39565b6135759190614f39565b11156135c35760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656e6f75676820546f6b656e73206c6566742e0000000000000000006044820152606401610e20565b60006135ed7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405490565b9050613609838560405180602001604052806000815250613eb7565b60005b84811015611eb05760006136208284614f39565b600090815260a260205260409020849055508061363c81614fb0565b91505061360c565b600061364f83613f74565b801561300657506130068383613fd8565b606580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006136d46133b5565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405403919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526116de908490614107565b60008054610100900460ff1615613819578160ff16600114801561379f5750303b155b6138115760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610e20565b506000919050565b60005460ff8084169116106138965760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610e20565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055600190565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff1661396a5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610e20565b610e3c82826141ec565b600054610100900460ff166139f15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b61166261431c565b600054610100900460ff16613a765760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b61166261439f565b8715613a8a57609d8890555b8615613a9657609b8790555b8515613aa257609c8690555b8415613aae57609e8590555b6001600160a01b03841615613af15760a080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386161790555b8215613b375760a180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790555b8115613b4257426098555b80156123db576040805180820190915260058082527f2e6a736f6e0000000000000000000000000000000000000000000000000000006020909201918252613b8c9160a89161472e565b505050505050505050565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290613be5903390899088908890600401615159565b602060405180830381600087803b158015613bff57600080fd5b505af1925050508015613c2f575060408051601f3d908101601f19168201909252613c2c9181019061518b565b60015b613ca3573d808015613c5d576040519150601f19603f3d011682016040523d82523d6000602084013e613c62565b606091505b508051613c9b576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6060613cfd82613323565b613d33576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613d3d613d8f565b9050805160001415613d5e5760405180602001604052806000815250613006565b80613d6884614425565b604051602001613d799291906151a8565b6040516020818303038152906040529392505050565b606060a78054610d4790614e5c565b80471015613dee5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613e3b576040519150601f19603f3d011682016040523d82523d6000602084013e613e40565b606091505b50509050806116de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e20565b613ec18383614474565b6001600160a01b0383163b156116de577f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40548281035b613f0a6000868380600101945086613b97565b613f40576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818110613ef757817f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405414611eb057600080fd5b6000613fa0827f01ffc9a700000000000000000000000000000000000000000000000000000000613fd8565b8015610d105750613fd1827fffffffff00000000000000000000000000000000000000000000000000000000613fd8565b1592915050565b604080517fffffffff00000000000000000000000000000000000000000000000000000000831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000179052905160009190829081906001600160a01b03871690617530906140859086906151d7565b6000604051808303818686fa925050503d80600081146140c1576040519150601f19603f3d011682016040523d82523d6000602084013e6140c6565b606091505b50915091506020815110156140e15760009350505050610d10565b8180156140fd5750808060200190518101906140fd91906151f3565b9695505050505050565b600061415c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661461a9092919063ffffffff16565b8051909150156116de578080602001905181019061417a91906151f3565b6116de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610e20565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166142885760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610e20565b81516142ba907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4290602085019061472e565b5080516142ed907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4390602084019061472e565b506142f66133b5565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40555050565b600054610100900460ff166143995760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b60018055565b600054610100900460ff1661441c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b61166233613660565b604080516080810191829052607f0190826030600a8206018353600a90045b801561446257600183039250600a81066030018353600a9004614444565b50819003601f19909101908152919050565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4054816144cd576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c456020908152604080832080546801000000000000000188020190558483527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146145ba57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101614582565b50816145f2576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405550505050565b6060613cea8484600085856001600160a01b0385163b61467c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e20565b600080866001600160a01b0316858760405161469891906151d7565b60006040518083038185875af1925050503d80600081146146d5576040519150601f19603f3d011682016040523d82523d6000602084013e6146da565b606091505b50915091506146ea8282866146f5565b979650505050505050565b60608315614704575081613006565b8251156147145782518084602001fd5b8160405162461bcd60e51b8152600401610e2091906148fc565b82805461473a90614e5c565b90600052602060002090601f01602090048101928261475c57600085556147a2565b82601f1061477557805160ff19168380011785556147a2565b828001600101855582156147a2579182015b828111156147a2578251825591602001919060010190614787565b506147ae929150614844565b5090565b8280546147be90614e5c565b90600052602060002090601f0160209004810192826147e057600085556147a2565b82601f10614817578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556147a2565b828001600101855582156147a2579182015b828111156147a2578235825591602001919060010190614829565b5b808211156147ae5760008155600101614845565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146130ec57600080fd5b60006020828403121561489957600080fd5b813561300681614859565b60005b838110156148bf5781810151838201526020016148a7565b83811115612a275750506000910152565b600081518084526148e88160208601602086016148a4565b601f01601f19169290920160200192915050565b60208152600061300660208301846148d0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156149675761496761490f565b604052919050565b600067ffffffffffffffff8211156149895761498961490f565b50601f01601f191660200190565b60006149aa6149a58461496f565b61493e565b90508281528383830111156149be57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126149e657600080fd5b61300683833560208501614997565b600060208284031215614a0757600080fd5b813567ffffffffffffffff811115614a1e57600080fd5b613cea848285016149d5565b600060208284031215614a3c57600080fd5b5035919050565b6001600160a01b03811681146130ec57600080fd5b60008060408385031215614a6b57600080fd5b8235614a7681614a43565b946020939093013593505050565b600060208284031215614a9657600080fd5b813561300681614a43565b600080600060608486031215614ab657600080fd5b8335614ac181614a43565b92506020840135614ad181614a43565b929592945050506040919091013590565b60008060408385031215614af557600080fd5b50508035926020909101359150565b600080600060608486031215614b1957600080fd5b833592506020840135614ad181614a43565b60008060208385031215614b3e57600080fd5b823567ffffffffffffffff80821115614b5657600080fd5b818501915085601f830112614b6a57600080fd5b813581811115614b7957600080fd5b866020828501011115614b8b57600080fd5b60209290920196919550909350505050565b80151581146130ec57600080fd5b8035612c4b81614b9d565b60008060008060008060008789036101c0811215614bd357600080fd5b883567ffffffffffffffff80821115614beb57600080fd5b614bf78c838d016149d5565b995060208b0135915080821115614c0d57600080fd5b614c198c838d016149d5565b985060408b0135975060608b0135965060808b01359150614c3982614b9d565b90945060a08a01359080821115614c4f57600080fd5b614c5b8c838d016149d5565b94506101009150817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4084011215614c9157600080fd5b60405192508183018381108282111715614cad57614cad61490f565b80604052505060c08a0135825260e08a01356020830152808a01356040830152506101208901356060820152610140890135614ce881614a43565b6080820152614cfa6101608a01614bab565b60a0820152614d0c6101808a01614bab565b60c0820152614d1e6101a08a01614bab565b60e08201528091505092959891949750929550565b60008060408385031215614d4657600080fd5b8235614d5181614a43565b91506020830135614d6181614b9d565b809150509250929050565b60008060008060808587031215614d8257600080fd5b8435614d8d81614a43565b93506020850135614d9d81614a43565b925060408501359150606085013567ffffffffffffffff811115614dc057600080fd5b8501601f81018713614dd157600080fd5b614de087823560208401614997565b91505092959194509250565b60008060408385031215614dff57600080fd5b823591506020830135614d6181614a43565b600060208284031215614e2357600080fd5b813561300681614b9d565b60008060408385031215614e4157600080fd5b8235614e4c81614a43565b91506020830135614d6181614a43565b600181811c90821680614e7057607f821691505b60208210811415614eaa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000816000190483118215151615614ef957614ef9614eb0565b500290565b600082614f34577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008219821115614f4c57614f4c614eb0565b500190565b600060208284031215614f6357600080fd5b5051919050565b600082821015614f7c57614f7c614eb0565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000600019821415614fc457614fc4614eb0565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006020828403121561500c57600080fd5b815167ffffffffffffffff81111561502357600080fd5b8201601f8101841361503457600080fd5b80516150426149a58261496f565b81815285602083850101111561505757600080fd5b6150688260208301602086016148a4565b95945050505050565b60008351602061508482858389016148a4565b845491840191600090600181811c90808316806150a257607f831692505b8583108114156150d9577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b8080156150ed576001811461511c57615149565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00851688528388019550615149565b60008b81526020902060005b858110156151415781548a820152908401908801615128565b505083880195505b50939a9950505050505050505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526140fd60808301846148d0565b60006020828403121561519d57600080fd5b815161300681614859565b600083516151ba8184602088016148a4565b8351908301906151ce8183602088016148a4565b01949350505050565b600082516151e98184602087016148a4565b9190910192915050565b60006020828403121561520557600080fd5b815161300681614b9d56fea26469706673582212209cdc2d4ac442b28c16f0b79ba373c3ca79112e2b12deeca38d617f0eea2e8af764736f6c63430008090033496e697469616c697a61626c653a20636f6e747261637420697320616c726561
Deployed Bytecode
0x6080604052600436106104335760003560e01c80638dc251e311610228578063c39c5a3511610128578063e6798baa116100bb578063f0ba84401161008a578063fe60d12c1161006f578063fe60d12c14610c23578063fecfda4914610c39578063ff1b655614610c5957600080fd5b8063f0ba844014610bd6578063f2fde38b14610c0357600080fd5b8063e6798baa14610b76578063e6fd48bc14610b8b578063e8a3d48514610ba1578063e985e9c514610bb657600080fd5b8063ddd5e1b2116100f7578063ddd5e1b214610b01578063e36b0b3714610b21578063e43082f714610b36578063e67151ae14610b5657600080fd5b8063c39c5a3514610a8b578063c87b56dd14610aab578063d5abeb0114610acb578063db85d59c14610ae157600080fd5b8063a0712d68116101bb578063a5bd52351161018a578063b66a0e5d1161016f578063b66a0e5d14610a40578063b88d4fde14610a55578063b8997a9714610a7557600080fd5b8063a5bd523514610a0b578063a769310a14610a2057600080fd5b8063a0712d6814610986578063a22cb46514610999578063a474935c146109b9578063a4f6628d146109eb57600080fd5b80639c9e7c96116101f75780639c9e7c961461091b5780639d26c210146109305780639fbc871314610950578063a035b1fe1461097057600080fd5b80638dc251e3146108a657806391b7f5ed146108c6578063938e3d7b146108e657806395d89b411461090657600080fd5b806342842e0e116103335780636352211e116102c6578063715018a6116102955780638589a1a01161027a5780638589a1a01461085357806389476069146108685780638da5cb5b1461088857600080fd5b8063715018a61461081e578063735328021461083357600080fd5b80636352211e146107a95780636b853314146107c95780636e878ffb146107e957806370a08231146107fe57600080fd5b8063507e094f11610302578063507e094f1461073b57806352ee46961461075157806355f804b3146107715780635c474f9e1461079157600080fd5b806342842e0e146106cb578063453c2310146106eb578063454e66c8146107015780634690521b1461072857600080fd5b806318160ddd116103c65780632a55205a116103955780633ccfd60b1161037a5780633ccfd60b146106695780633cef28d21461067e5780633e4086e5146106ab57600080fd5b80632a55205a146105e45780633c934ab31461062357600080fd5b806318160ddd1461056f57806320b7b8df1461058457806323b872dd146105a45780632a30e4c2146105c457600080fd5b8063081812fc11610402578063081812fc146104d7578063095ea7b31461050f578063109695231461052f578063170ff3e11461054f57600080fd5b806301ffc9a71461043f5780630563aae51461047457806306fdde03146104935780630768c618146104b557600080fd5b3661043a57005b600080fd5b34801561044b57600080fd5b5061045f61045a366004614887565b610c6e565b60405190151581526020015b60405180910390f35b34801561048057600080fd5b5060a4545b60405190815260200161046b565b34801561049f57600080fd5b506104a8610d16565b60405161046b91906148fc565b3480156104c157600080fd5b506104d56104d03660046149f5565b610dca565b005b3480156104e357600080fd5b506104f76104f2366004614a2a565b610e40565b6040516001600160a01b03909116815260200161046b565b34801561051b57600080fd5b506104d561052a366004614a58565b610ebc565b34801561053b57600080fd5b506104d561054a3660046149f5565b610fac565b34801561055b57600080fd5b506104d561056a366004614a84565b611019565b34801561057b57600080fd5b506104856111b2565b34801561059057600080fd5b5060a0546104f7906001600160a01b031681565b3480156105b057600080fd5b506104d56105bf366004614aa1565b611207565b3480156105d057600080fd5b506104d56105df366004614a84565b6114d0565b3480156105f057600080fd5b506106046105ff366004614ae2565b6115cf565b604080516001600160a01b03909316835260208301919091520161046b565b34801561062f57600080fd5b5060408051808201909152601581527f68747470733a2f2f6275696c64736869702e78797a000000000000000000000060208201526104a8565b34801561067557600080fd5b506104d5611600565b34801561068a57600080fd5b50610485610699366004614a84565b60a36020526000908152604090205481565b3480156106b757600080fd5b506104d56106c6366004614a2a565b611664565b3480156106d757600080fd5b506104d56106e6366004614aa1565b6116c3565b3480156106f757600080fd5b50610485609c5481565b34801561070d57600080fd5b5073704c043ceb93bd6cbe570c6a2708c3e1c03105876104f7565b6104d5610736366004614b04565b6116e3565b34801561074757600080fd5b50610485609b5481565b34801561075d57600080fd5b5060a1546104f7906001600160a01b031681565b34801561077d57600080fd5b506104d561078c366004614b2b565b6117ca565b34801561079d57600080fd5b5060985442101561045f565b3480156107b557600080fd5b506104f76107c4366004614a2a565b611830565b3480156107d557600080fd5b506104d56107e4366004614a84565b61183b565b3480156107f557600080fd5b506104f76119d7565b34801561080a57600080fd5b50610485610819366004614a84565b611a0f565b34801561082a57600080fd5b506104d5611a96565b34801561083f57600080fd5b506104d561084e366004614a2a565b611afa565b34801561085f57600080fd5b506104d5611cab565b34801561087457600080fd5b506104d5610883366004614a84565b611d46565b34801561089457600080fd5b506065546001600160a01b03166104f7565b3480156108b257600080fd5b506104d56108c1366004614a84565b611eb7565b3480156108d257600080fd5b506104d56108e1366004614a2a565b611f4b565b3480156108f257600080fd5b506104d5610901366004614b2b565b611faa565b34801561091257600080fd5b506104a8612010565b34801561092757600080fd5b506104d5612041565b34801561093c57600080fd5b506104d561094b366004614bb6565b6120a4565b34801561095c57600080fd5b50609f546104f7906001600160a01b031681565b34801561097c57600080fd5b50610485609d5481565b6104d5610994366004614a2a565b6123e5565b3480156109a557600080fd5b506104d56109b4366004614d33565b612636565b3480156109c557600080fd5b5060a15461045f9074010000000000000000000000000000000000000000900460ff1681565b3480156109f757600080fd5b5061045f610a06366004614a84565b612722565b348015610a1757600080fd5b506104f761278c565b348015610a2c57600080fd5b506104d5610a3b366004614a84565b6127b7565b348015610a4c57600080fd5b506104d561296a565b348015610a6157600080fd5b506104d5610a70366004614d6c565b6129ca565b348015610a8157600080fd5b50610485609e5481565b348015610a9757600080fd5b506104d5610aa6366004614a2a565b612a2d565b348015610ab757600080fd5b506104a8610ac6366004614a2a565b612b39565b348015610ad757600080fd5b50610485609a5481565b348015610aed57600080fd5b506104f7610afc366004614a2a565b612c50565b348015610b0d57600080fd5b506104d5610b1c366004614dec565b612c7a565b348015610b2d57600080fd5b506104d5612dc9565b348015610b4257600080fd5b506104d5610b51366004614e11565b612e2b565b348015610b6257600080fd5b506104d5610b71366004614a2a565b612ed0565b348015610b8257600080fd5b50610485612f2f565b348015610b9757600080fd5b5061048560985481565b348015610bad57600080fd5b506104a8612f39565b348015610bc257600080fd5b5061045f610bd1366004614e2e565b612f66565b348015610be257600080fd5b50610485610bf1366004614a2a565b60a26020526000908152604090205481565b348015610c0f57600080fd5b506104d5610c1e366004614a84565b61300d565b348015610c2f57600080fd5b5061048560995481565b348015610c4557600080fd5b506104d5610c54366004614a2a565b6130ef565b348015610c6557600080fd5b506104a86131a5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610d0157507fffffffff0000000000000000000000000000000000000000000000000000000082167f2238348f00000000000000000000000000000000000000000000000000000000145b80610d105750610d1082613242565b92915050565b60607f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c406002018054610d4790614e5c565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7390614e5c565b8015610dc05780601f10610d9557610100808354040283529160200191610dc0565b820191906000526020600020905b815481529060010190602001808311610da357829003601f168201915b5050505050905090565b6065546001600160a01b03163314610e295760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8051610e3c9060a890602084019061472e565b5050565b6000610e4b82613323565b610e81576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610ec782611830565b9050336001600160a01b03821614610f1957610ee38133612f66565b610f19576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6065546001600160a01b031633146110065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b8051610e3c9060a590602084019061472e565b6065546001600160a01b031633146110735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6001600160a01b0381163014156110cc5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610e20565b6110d581612722565b156111225760405162461bcd60e51b815260206004820152601760248201527f457874656e73696f6e20616c72656164792061646465640000000000000000006044820152606401610e20565b60a4805460018101825560009182527fe434dc35da084cf8d7e8186688ea2dacb53db7003d427af3abf351bd9d0a4e8d0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915560405190917f99c6112dbaef85e57ac8ca86dd23e3c785162b58a6e810e5d5e7455b568d66b191a250565b60006111bc6133b5565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40540303919050565b6000611212826133ee565b9050836001600160a01b0316816001600160a01b03161461125f576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604090208054338082146001600160a01b038816909114176112e4576112ae8633612f66565b6112e4576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516611324576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561132f57600082555b6001600160a01b0386811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4560205260408082208054600019019055918716808252919020805460010190554260a01b177c02000000000000000000000000000000000000000000000000000000001760008581527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260409020557c02000000000000000000000000000000000000000000000000000000008316611487576001840160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054611485577f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405481146114855760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6065546001600160a01b0316331461152a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60a15474010000000000000000000000000000000000000000900460ff16156115955760405162461bcd60e51b815260206004820152601760248201527f5061796f7574206368616e6765206973206c6f636b65640000000000000000006044820152606401610e20565b60a080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6000806115da61278c565b9150612710609e54846115ed9190614edf565b6115f79190614efe565b90509250929050565b6065546001600160a01b0316331461165a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116626134ec565b565b6065546001600160a01b031633146116be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609e55565b6116de838383604051806020016040528060008152506129ca565b505050565b6116ec33612722565b61175e5760405162461bcd60e51b815260206004820152603460248201527f457874656e73696f6e2073686f756c6420626520616464656420746f20636f6e60448201527f7472616374206265666f7265206d696e74696e670000000000000000000000006064820152608401610e20565b600260015414156117b15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b60026001556117c1838383613552565b50506001805550565b6065546001600160a01b031633146118245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116de60a783836147b2565b6000610d10826133ee565b6065546001600160a01b031633146118955760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6001600160a01b0381163014156118ee5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610e20565b6001600160a01b03811615806119295750611929817fc87b56dd00000000000000000000000000000000000000000000000000000000613644565b6119755760405162461bcd60e51b815260206004820152601960248201527f4e6f7420636f6e666f726d7320746f20657874656e73696f6e000000000000006044820152606401610e20565b60a180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f92597a601f19fe4d50f14ea76d7ba45d21bad7992f7e1709c605642b190de09290600090a250565b60a0546000906001600160a01b03166119ff57506065546001600160a01b031690565b905090565b5060a0546001600160a01b031690565b60006001600160a01b038216611a51576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45602052604090205467ffffffffffffffff1690565b6065546001600160a01b03163314611af05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116626000613660565b6098544210611b4b5760405162461bcd60e51b815260206004820152601a60248201527f53616c652073686f756c64206e6f7420626520737461727465640000000000006044820152606401610e20565b6065546001600160a01b03163314611ba55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b80609954611bb16136ca565b611bbb9190614f39565b1115611c2f5760405162461bcd60e51b815260206004820152603760248201527f4d617820737570706c7920697320746f6f206c6f772c20616c7265616479206d60448201527f696e746564206d6f726520282b207265736572766564290000000000000000006064820152608401610e20565b609a548110611ca65760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f742073657420686967686572207468616e2074686520637572726560448201527f6e74206d6178537570706c7900000000000000000000000000000000000000006064820152608401610e20565b609a55565b6065546001600160a01b03163314611d055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60a180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6065546001600160a01b03163314611da05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015611dfb57600080fd5b505afa158015611e0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e339190614f51565b90506000612710611e466101f482614f6a565b611e509084614edf565b611e5a9190614efe565b90506000611e666119d7565b905073704c043ceb93bd6cbe570c6a2708c3e1c0310587611e916001600160a01b03861683856136fc565b611eb081611e9f8587614f6a565b6001600160a01b03881691906136fc565b5050505050565b6065546001600160a01b03163314611f115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6065546001600160a01b03163314611fa55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609d55565b6065546001600160a01b031633146120045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6116de60a683836147b2565b60607f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c406003018054610d4790614e5c565b3373704c043ceb93bd6cbe570c6a2708c3e1c03105871461165a5760405162461bcd60e51b815260206004820152601760248201527f43616c6c6572206973206e6f74204275696c64736869700000000000000000006044820152606401610e20565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166120fd577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f5460ff1615612101565b303b155b6121735760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610e20565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff161580156121f0577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b60006121fc600161377c565b9050801561223157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6099869055609a87905560a180547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff167601000000000000000000000000000000000000000000008715150217905583516122939060a790602087019061472e565b506000196098556032609b5560a180547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556122e989896138ce565b6122f1613974565b6122f96139f9565b612329836000015184602001518560400151866060015187608001518860a001518960c001518a60e00151613a7e565b801561238c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5080156123db577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050505050505050565b600260015414156124385760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b600260015560985442101561248f5760405162461bcd60e51b815260206004820152601060248201527f53616c65206e6f742073746172746564000000000000000000000000000000006044820152606401610e20565b609c541561254e57609c5433600090815260a360205260409020546124b5908390614f39565b11156125295760405162461bcd60e51b815260206004820152603e60248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e206d617850657260448201527f57616c6c657420746f6b656e7320666f72206f6e6520616464726573732100006064820152608401610e20565b33600090815260a3602052604081208054839290612548908490614f39565b90915550505b609b548111156125c65760405162461bcd60e51b815260206004820152603d60248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e204d41585f544f60448201527f4b454e535f5045525f4d494e5420746f6b656e73206174206f6e6365210000006064820152608401610e20565b34609d54826125d59190614edf565b11156126235760405162461bcd60e51b815260206004820152601960248201527f496e636f6e73697374656e7420616d6f756e742073656e7421000000000000006044820152606401610e20565b61262f81336000613552565b5060018055565b6001600160a01b038216331415612679576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000805b60a45481101561278357826001600160a01b031660a4828154811061274d5761274d614f81565b6000918252602090912001546001600160a01b031614156127715750600192915050565b8061277b81614fb0565b915050612726565b50600092915050565b609f546000906001600160a01b03166127a7576119fa6119d7565b50609f546001600160a01b031690565b6065546001600160a01b031633146128115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60005b60a45481101561286d57816001600160a01b031660a4828154811061283b5761283b614f81565b6000918252602090912001546001600160a01b0316141561285b5761286d565b8061286581614fb0565b915050612814565b60a4805461287d90600190614f6a565b8154811061288d5761288d614f81565b60009182526020909120015460a480546001600160a01b0390921691839081106128b9576128b9614f81565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a48054806128f8576128f8614fcb565b600082815260208120820160001990810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690559091019091556040516001600160a01b038416917fe056b30f86b962fc88925cb7559e4364707cab11d2c52e090e6c0db62eb9113591a25050565b6065546001600160a01b031633146129c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b42609855565b6129d5848484611207565b6001600160a01b0383163b15612a27576129f184848484613b97565b612a27576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6065546001600160a01b03163314612a875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60026001541415612ada5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b60026001556032811115612b305760405162461bcd60e51b815260206004820152601860248201527f546f6f206d616e7920746f6b656e7320706572206d696e7400000000000000006044820152606401610e20565b609b5560018055565b60a1546060906001600160a01b031615612bf95760a1546040517fc87b56dd000000000000000000000000000000000000000000000000000000008152600481018490526000916001600160a01b03169063c87b56dd9060240160006040518083038186803b158015612bab57600080fd5b505afa158015612bbf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612be79190810190614ffa565b805190915015612bf75792915050565b505b600060a88054612c0890614e5c565b90501115612c4257612c1982613cf2565b60a8604051602001612c2c929190615071565b6040516020818303038152906040529050919050565b610d1082613cf2565b919050565b60a48181548110612c6057600080fd5b6000918252602090912001546001600160a01b0316905081565b60026001541415612ccd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b60026001556065546001600160a01b03163314612d2c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609954821115612da45760405162461bcd60e51b815260206004820152602360248201527f5468617420776f756c642065786365656420746865206d61782072657365727660448201527f65642e00000000000000000000000000000000000000000000000000000000006064820152608401610e20565b81609954612db29190614f6a565b609955612dc182826000613552565b505060018055565b6065546001600160a01b03163314612e235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b600019609855565b6065546001600160a01b03163314612e855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b60a180549115157501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6065546001600160a01b03163314612f2a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b609855565b60006119fa6133b5565b6060600060a68054612f4a90614e5c565b905011612f59576119fa613d8f565b60a68054610d4790614e5c565b60a1546000907501000000000000000000000000000000000000000000900460ff168015612fb057506001600160a01b038216731e0049783f008a0085193e00003d00cd54003c71145b15612fbd57506001610d10565b6001600160a01b0380841660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083209386168352929052205460ff165b9392505050565b6065546001600160a01b031633146130675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6001600160a01b0381166130e35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e20565b6130ec81613660565b50565b6065546001600160a01b031633146131495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e20565b6002600154141561319c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e20565b609c5560018055565b60a580546131b290614e5c565b80601f01602080910402602001604051908101604052809291908181526020018280546131de90614e5c565b801561322b5780601f106132005761010080835404028352916020019161322b565b820191906000526020600020905b81548152906001019060200180831161320e57829003601f168201915b505050505081565b6001600160a01b03163b151590565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806132d557507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b80610d105750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60008161332e6133b5565b1115801561335c57507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405482105b8015610d1057505060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b60a154600090760100000000000000000000000000000000000000000000900460ff166133e35760006133e6565b60015b60ff16905090565b600081806133fa6133b5565b116134ba577f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40548110156134ba5760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260409020547c010000000000000000000000000000000000000000000000000000000081166134b8575b8061300657506000190160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604090205461347b565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4760006127106134fe6101f482614f6a565b6135089084614edf565b6135129190614efe565b9050600061351e6119d7565b905073704c043ceb93bd6cbe570c6a2708c3e1c031058761353f8284613d9e565b612a278161354d8587614f6a565b613d9e565b609a54609954846135616136ca565b61356b9190614f39565b6135759190614f39565b11156135c35760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656e6f75676820546f6b656e73206c6566742e0000000000000000006044820152606401610e20565b60006135ed7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405490565b9050613609838560405180602001604052806000815250613eb7565b60005b84811015611eb05760006136208284614f39565b600090815260a260205260409020849055508061363c81614fb0565b91505061360c565b600061364f83613f74565b801561300657506130068383613fd8565b606580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006136d46133b5565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405403919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526116de908490614107565b60008054610100900460ff1615613819578160ff16600114801561379f5750303b155b6138115760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610e20565b506000919050565b60005460ff8084169116106138965760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610e20565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055600190565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff1661396a5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610e20565b610e3c82826141ec565b600054610100900460ff166139f15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b61166261431c565b600054610100900460ff16613a765760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b61166261439f565b8715613a8a57609d8890555b8615613a9657609b8790555b8515613aa257609c8690555b8415613aae57609e8590555b6001600160a01b03841615613af15760a080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386161790555b8215613b375760a180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790555b8115613b4257426098555b80156123db576040805180820190915260058082527f2e6a736f6e0000000000000000000000000000000000000000000000000000006020909201918252613b8c9160a89161472e565b505050505050505050565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290613be5903390899088908890600401615159565b602060405180830381600087803b158015613bff57600080fd5b505af1925050508015613c2f575060408051601f3d908101601f19168201909252613c2c9181019061518b565b60015b613ca3573d808015613c5d576040519150601f19603f3d011682016040523d82523d6000602084013e613c62565b606091505b508051613c9b576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6060613cfd82613323565b613d33576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613d3d613d8f565b9050805160001415613d5e5760405180602001604052806000815250613006565b80613d6884614425565b604051602001613d799291906151a8565b6040516020818303038152906040529392505050565b606060a78054610d4790614e5c565b80471015613dee5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e20565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613e3b576040519150601f19603f3d011682016040523d82523d6000602084013e613e40565b606091505b50509050806116de5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e20565b613ec18383614474565b6001600160a01b0383163b156116de577f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40548281035b613f0a6000868380600101945086613b97565b613f40576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818110613ef757817f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405414611eb057600080fd5b6000613fa0827f01ffc9a700000000000000000000000000000000000000000000000000000000613fd8565b8015610d105750613fd1827fffffffff00000000000000000000000000000000000000000000000000000000613fd8565b1592915050565b604080517fffffffff00000000000000000000000000000000000000000000000000000000831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000179052905160009190829081906001600160a01b03871690617530906140859086906151d7565b6000604051808303818686fa925050503d80600081146140c1576040519150601f19603f3d011682016040523d82523d6000602084013e6140c6565b606091505b50915091506020815110156140e15760009350505050610d10565b8180156140fd5750808060200190518101906140fd91906151f3565b9695505050505050565b600061415c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661461a9092919063ffffffff16565b8051909150156116de578080602001905181019061417a91906151f3565b6116de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610e20565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166142885760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610e20565b81516142ba907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4290602085019061472e565b5080516142ed907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4390602084019061472e565b506142f66133b5565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40555050565b600054610100900460ff166143995760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b60018055565b600054610100900460ff1661441c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610e20565b61166233613660565b604080516080810191829052607f0190826030600a8206018353600a90045b801561446257600183039250600a81066030018353600a9004614444565b50819003601f19909101908152919050565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4054816144cd576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c456020908152604080832080546801000000000000000188020190558483527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146145ba57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101614582565b50816145f2576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c405550505050565b6060613cea8484600085856001600160a01b0385163b61467c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e20565b600080866001600160a01b0316858760405161469891906151d7565b60006040518083038185875af1925050503d80600081146146d5576040519150601f19603f3d011682016040523d82523d6000602084013e6146da565b606091505b50915091506146ea8282866146f5565b979650505050505050565b60608315614704575081613006565b8251156147145782518084602001fd5b8160405162461bcd60e51b8152600401610e2091906148fc565b82805461473a90614e5c565b90600052602060002090601f01602090048101928261475c57600085556147a2565b82601f1061477557805160ff19168380011785556147a2565b828001600101855582156147a2579182015b828111156147a2578251825591602001919060010190614787565b506147ae929150614844565b5090565b8280546147be90614e5c565b90600052602060002090601f0160209004810192826147e057600085556147a2565b82601f10614817578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008235161785556147a2565b828001600101855582156147a2579182015b828111156147a2578235825591602001919060010190614829565b5b808211156147ae5760008155600101614845565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146130ec57600080fd5b60006020828403121561489957600080fd5b813561300681614859565b60005b838110156148bf5781810151838201526020016148a7565b83811115612a275750506000910152565b600081518084526148e88160208601602086016148a4565b601f01601f19169290920160200192915050565b60208152600061300660208301846148d0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156149675761496761490f565b604052919050565b600067ffffffffffffffff8211156149895761498961490f565b50601f01601f191660200190565b60006149aa6149a58461496f565b61493e565b90508281528383830111156149be57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126149e657600080fd5b61300683833560208501614997565b600060208284031215614a0757600080fd5b813567ffffffffffffffff811115614a1e57600080fd5b613cea848285016149d5565b600060208284031215614a3c57600080fd5b5035919050565b6001600160a01b03811681146130ec57600080fd5b60008060408385031215614a6b57600080fd5b8235614a7681614a43565b946020939093013593505050565b600060208284031215614a9657600080fd5b813561300681614a43565b600080600060608486031215614ab657600080fd5b8335614ac181614a43565b92506020840135614ad181614a43565b929592945050506040919091013590565b60008060408385031215614af557600080fd5b50508035926020909101359150565b600080600060608486031215614b1957600080fd5b833592506020840135614ad181614a43565b60008060208385031215614b3e57600080fd5b823567ffffffffffffffff80821115614b5657600080fd5b818501915085601f830112614b6a57600080fd5b813581811115614b7957600080fd5b866020828501011115614b8b57600080fd5b60209290920196919550909350505050565b80151581146130ec57600080fd5b8035612c4b81614b9d565b60008060008060008060008789036101c0811215614bd357600080fd5b883567ffffffffffffffff80821115614beb57600080fd5b614bf78c838d016149d5565b995060208b0135915080821115614c0d57600080fd5b614c198c838d016149d5565b985060408b0135975060608b0135965060808b01359150614c3982614b9d565b90945060a08a01359080821115614c4f57600080fd5b614c5b8c838d016149d5565b94506101009150817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4084011215614c9157600080fd5b60405192508183018381108282111715614cad57614cad61490f565b80604052505060c08a0135825260e08a01356020830152808a01356040830152506101208901356060820152610140890135614ce881614a43565b6080820152614cfa6101608a01614bab565b60a0820152614d0c6101808a01614bab565b60c0820152614d1e6101a08a01614bab565b60e08201528091505092959891949750929550565b60008060408385031215614d4657600080fd5b8235614d5181614a43565b91506020830135614d6181614b9d565b809150509250929050565b60008060008060808587031215614d8257600080fd5b8435614d8d81614a43565b93506020850135614d9d81614a43565b925060408501359150606085013567ffffffffffffffff811115614dc057600080fd5b8501601f81018713614dd157600080fd5b614de087823560208401614997565b91505092959194509250565b60008060408385031215614dff57600080fd5b823591506020830135614d6181614a43565b600060208284031215614e2357600080fd5b813561300681614b9d565b60008060408385031215614e4157600080fd5b8235614e4c81614a43565b91506020830135614d6181614a43565b600181811c90821680614e7057607f821691505b60208210811415614eaa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000816000190483118215151615614ef957614ef9614eb0565b500290565b600082614f34577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008219821115614f4c57614f4c614eb0565b500190565b600060208284031215614f6357600080fd5b5051919050565b600082821015614f7c57614f7c614eb0565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000600019821415614fc457614fc4614eb0565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60006020828403121561500c57600080fd5b815167ffffffffffffffff81111561502357600080fd5b8201601f8101841361503457600080fd5b80516150426149a58261496f565b81815285602083850101111561505757600080fd5b6150688260208301602086016148a4565b95945050505050565b60008351602061508482858389016148a4565b845491840191600090600181811c90808316806150a257607f831692505b8583108114156150d9577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b8080156150ed576001811461511c57615149565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00851688528388019550615149565b60008b81526020902060005b858110156151415781548a820152908401908801615128565b505083880195505b50939a9950505050505050505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526140fd60808301846148d0565b60006020828403121561519d57600080fd5b815161300681614859565b600083516151ba8184602088016148a4565b8351908301906151ce8183602088016148a4565b01949350505050565b600082516151e98184602087016148a4565b9190910192915050565b60006020828403121561520557600080fd5b815161300681614b9d56fea26469706673582212209cdc2d4ac442b28c16f0b79ba373c3ca79112e2b12deeca38d617f0eea2e8af764736f6c63430008090033
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.