Overview
TokenID
45874
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
AbstractMadnessBrackets
Compiler Version
v0.8.28+commit.7893614a
ZkSolc Version
v1.5.11
Optimization Enabled:
Yes with Mode 3
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.28; import {IERC721A, ERC721A} from "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "solady/src/auth/Ownable.sol"; import "solady/src/utils/ReentrancyGuard.sol"; import "solady/src/utils/ext/zksync/SafeTransferLib.sol"; import "solady/src/utils/ext/zksync/SignatureCheckerLib.sol"; import "solady/src/utils/LibString.sol"; import "solady/src/utils/Base64.sol"; import "solady/src/tokens/ERC2981.sol"; /** * @title Abstract Madness Brackets * @author @bearish_af */ contract AbstractMadnessBrackets is ERC721AQueryable, Ownable, ReentrancyGuard, ERC2981 { using LibString for uint256; using LibString for string; using Base64 for bytes; event PoolCreated(uint256 indexed poolId, string name, address indexed poolOwner); event PoolConfigUpdated(uint256 indexed poolId); event PoolOwnerUpdated(uint256 indexed poolId, address newOwner); event PoolPrivateListUpdated(uint256 indexed poolId, address[] addrs); event BracketMinted(uint256 indexed poolId, uint256 indexed tokenId, address indexed minter); event BracketEdited(uint256 indexed tokenId, uint256 part1, uint256 part2, uint256 tiebreaker); event GlobalResultBracketSet(uint256 part1, uint256 part2, uint256 tiebreaker); event DistributionSetAndFinalized(uint256 indexed poolId, address indexed caller); event BracketInvalidated(uint256 indexed tokenId); event PoolRefunded(uint256 indexed poolId, uint256 countRefunded); error NotOwnerNorPoolOwner(); error PoolDoesNotExist(); error PoolIsFull(); error SingleEntryRestricted(); error NotInPrivateList(); error IncorrectFee(); error TokenEditingClosed(); error InvalidGameType(); error InvalidDistributionType(); error NonexistentToken(); error FeeBasisTooHigh(); error MaxEntriesOutOfRange(); error InvalidPoolConfig(); error AlreadyDistributed(); error TiebreakerOutOfRange(); error InvalidSignature(); error BracketAlreadyValid(); struct Bracket { uint256 part1; uint256 part2AndTiebreak; } struct Pool { string name; string description; string imageURI; string bannerURI; address tokenAddress; uint256 entryFee; bool singleEntry; bool isTop; bool isSkilled; uint16 feeBasis; address feeWallet; uint256 totalCollected; bool finalized; uint256 maxEntries; address poolOwner; uint256[] entries; address[] privateList; } struct DistributionData { address[] addrs; uint256[] amts; bool distributed; } uint256 public nextPoolId; mapping(uint256 => Pool) public pools; mapping(uint256 => DistributionData) public distributions; mapping(uint256 => Bracket) public tokenIdToBracket; mapping(uint256 => uint256) public tokenIdToPool; mapping(uint256 => mapping(address => bool)) public poolUserEntered; string public baseImageURI = "ipfs://bafybeieb226yw33a3cqe2pveh5wzo6nuuwvk5q5q4ilsvhudvw75alcwoq/"; string public baseAnimationUrl = "https://madness.bearish.af/api/bracket/"; Bracket public resultBracket; uint256 public constant EDIT_DEADLINE = 1742487300; address public trustedBackend; constructor() ERC721A("AbstractMadnessBrackets", "ABSMAD") { _initializeOwner(_msgSenderERC721A()); Pool storage globalPool = pools[0]; globalPool.name = "Global Pool"; globalPool.description = "All minted brackets for global tracking"; globalPool.isTop = false; globalPool.isSkilled = true; globalPool.feeBasis = 0; globalPool.feeWallet = address(this); globalPool.maxEntries = 65535; globalPool.poolOwner = _msgSenderERC721A(); nextPoolId = 1; _setDefaultRoyalty(_msgSenderERC721A(), 300); } function _startTokenId() internal pure override returns (uint256) { return 1; } modifier validPool(uint256 poolId) { if (poolId >= nextPoolId) revert PoolDoesNotExist(); _; } modifier onlyOwnerOrPoolOwner(uint256 poolId) { Pool storage p = pools[poolId]; if (_msgSenderERC721A() != owner() && _msgSenderERC721A() != p.poolOwner) revert NotOwnerNorPoolOwner(); _; } function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) { if (!_exists(tokenId)) revert NonexistentToken(); Bracket memory br = tokenIdToBracket[tokenId]; (uint256 part2, uint256 tie) = _unpackPart2Tiebreak(br.part2AndTiebreak); uint256 score = computeFibonacciScore(tokenId); bool isFinal = (block.timestamp > EDIT_DEADLINE); bytes memory json = abi.encodePacked( "{", '"name":"Bracket #', _toString(tokenId), '",', '"description":"Abstract Madness Powered By BEARISH",', '"image":"', baseImageURI, '",', '"animation_url":"', baseAnimationUrl, _toString(tokenId), '",', '"attributes":[', '{"trait_type":"Part 1","value":"', _toString(br.part1), '"},', '{"trait_type":"Part 2","value":"', _toString(part2), '"},', '{"trait_type":"Tiebreaker","value":"', _toString(tie), '"},', '{"trait_type":"isFinal","value":"', (isFinal ? "true" : "false"), '"},', '{"trait_type":"Points","value":"', _toString(score), '"}', "]", "}" ); return string(abi.encodePacked("data:application/json;base64,", Base64.encode(json))); } function createPool( string calldata _name, string calldata _description, string calldata _imageURI, string calldata _bannerURI, address _tokenAddress, uint256 _entryFee, bool _isSingleEntry, bool _isTop, bool _isSkilled, uint16 _feeBasis, address _feeWallet, uint256 _maxEntries ) external returns (uint256 poolId) { poolId = _createPoolInternal( _msgSenderERC721A(), _name, _description, _imageURI, _bannerURI, _tokenAddress, _entryFee, _isSingleEntry, _isTop, _isSkilled, _feeBasis, _feeWallet, _maxEntries ); } function mintBracketByTrustedSigner( uint256 poolId, uint256 part1, uint256 part2, uint256 tiebreaker, bytes calldata signature ) external payable validPool(poolId) nonReentrant { if (poolId == 0) revert InvalidPoolConfig(); if (tiebreaker > 999) revert TiebreakerOutOfRange(); bytes32 messageHash = keccak256(abi.encodePacked(address(this), _msgSenderERC721A(), poolId, part1, part2, tiebreaker)); bytes32 ethHash = SignatureCheckerLib.toEthSignedMessageHash(messageHash); bool isValidSig = SignatureCheckerLib.isValidSignatureNow(trustedBackend, ethHash, signature); if (!isValidSig) revert InvalidSignature(); _executeMintBracket(poolId, part1, part2, tiebreaker, _msgSenderERC721A(), false); } function mintBracket( uint256 poolId, uint256 part1, uint256 part2, uint256 tiebreaker ) external payable validPool(poolId) nonReentrant { if (poolId == 0) revert InvalidPoolConfig(); if (tiebreaker > 999) revert TiebreakerOutOfRange(); _executeMintBracket(poolId, part1, part2, tiebreaker, _msgSenderERC721A(), true); } function _executeMintBracket( uint256 poolId, uint256 part1, uint256 part2, uint256 tiebreaker, address bracketOwner, bool needsPayment ) internal { Pool storage p = pools[poolId]; if (p.finalized) revert AlreadyDistributed(); if (p.privateList.length > 0 && !_isInPrivateList(p.privateList, bracketOwner)) revert NotInPrivateList(); if (p.singleEntry && poolUserEntered[poolId][bracketOwner]) revert SingleEntryRestricted(); if (p.entries.length + 1 > p.maxEntries) revert PoolIsFull(); if (needsPayment) { _payEntryFee(p, 1); } if (p.singleEntry) { poolUserEntered[poolId][bracketOwner] = true; } _mintBracketInternal(poolId, part1, part2, tiebreaker, bracketOwner); } function _mintBracketInternal( uint256 poolId, uint256 part1, uint256 part2, uint256 tiebreaker, address bracketOwner ) internal { Pool storage p = pools[poolId]; uint256 mintedTokenId = _nextTokenId(); _mint(bracketOwner, 1); tokenIdToBracket[mintedTokenId] = Bracket(part1, _packPart2Tiebreak(part2, tiebreaker)); tokenIdToPool[mintedTokenId] = poolId; p.entries.push(mintedTokenId); pools[0].entries.push(mintedTokenId); emit BracketMinted(poolId, mintedTokenId, bracketOwner); } function _createPoolInternal( address poolOwnerAddr, string calldata _name, string calldata _description, string calldata _imageURI, string calldata _bannerURI, address _tokenAddress, uint256 _entryFee, bool _isSingleEntry, bool _isTop, bool _isSkilled, uint16 _feeBasis, address _feeWallet, uint256 _maxEntries ) internal returns (uint256 poolId) { if (_feeBasis > 2500) revert FeeBasisTooHigh(); if (_maxEntries < 5 || _maxEntries > 65535) revert MaxEntriesOutOfRange(); poolId = nextPoolId++; Pool storage p = pools[poolId]; p.name = _name; p.description = _description; p.imageURI = _imageURI; p.bannerURI = _bannerURI; p.tokenAddress = _tokenAddress; p.entryFee = _entryFee; p.singleEntry = _isSingleEntry; p.isTop = _isTop; p.isSkilled = _isSkilled; p.feeBasis = _feeBasis; p.feeWallet = _feeWallet; p.maxEntries = _maxEntries; p.poolOwner = poolOwnerAddr; emit PoolCreated(poolId, _name, poolOwnerAddr); } function updatePoolConfig( uint256 poolId, string calldata _name, string calldata _description, string calldata _imageURI, string calldata _bannerURI, address _tokenAddress, uint256 _entryFee, bool _isSingleEntry, bool _isTop, bool _isSkilled, uint16 _feeBasis, address _feeWallet, uint256 _maxEntries ) external validPool(poolId) onlyOwnerOrPoolOwner(poolId) { if (_feeBasis > 2500) revert FeeBasisTooHigh(); if (_maxEntries < 5 || _maxEntries > 65535) revert MaxEntriesOutOfRange(); Pool storage p = pools[poolId]; p.name = _name; p.description = _description; p.imageURI = _imageURI; p.bannerURI = _bannerURI; p.tokenAddress = _tokenAddress; p.entryFee = _entryFee; p.singleEntry = _isSingleEntry; p.isTop = _isTop; p.isSkilled = _isSkilled; p.feeBasis = _feeBasis; p.feeWallet = _feeWallet; p.maxEntries = _maxEntries; emit PoolConfigUpdated(poolId); } function setPoolOwner(uint256 poolId, address newOwner) external validPool(poolId) onlyOwnerOrPoolOwner(poolId) { pools[poolId].poolOwner = newOwner; emit PoolOwnerUpdated(poolId, newOwner); } function setPrivateList(uint256 poolId, address[] calldata addrs) external validPool(poolId) onlyOwnerOrPoolOwner(poolId) { if (addrs.length > 128) revert InvalidPoolConfig(); Pool storage p = pools[poolId]; delete p.privateList; for (uint256 i; i < addrs.length; ++i) { p.privateList.push(addrs[i]); } emit PoolPrivateListUpdated(poolId, addrs); } function editBracket( uint256 tokenId, uint256 newPart1, uint256 newPart2, uint256 newTiebreaker ) external nonReentrant { if (!_exists(tokenId)) revert NonexistentToken(); if (ownerOf(tokenId) != _msgSenderERC721A()) revert NotOwnerNorPoolOwner(); if (block.timestamp > EDIT_DEADLINE) revert TokenEditingClosed(); if (newTiebreaker > 999) revert TiebreakerOutOfRange(); uint256 poolId = tokenIdToPool[tokenId]; Pool storage p = pools[poolId]; tokenIdToBracket[tokenId] = Bracket(newPart1, _packPart2Tiebreak(newPart2, newTiebreaker)); emit BracketEdited(tokenId, newPart1, newPart2, newTiebreaker); } function invalidateBracket(uint256 tokenId) external onlyOwner { if (!_exists(tokenId)) revert NonexistentToken(); Bracket storage br = tokenIdToBracket[tokenId]; (uint256 part2, ) = _unpackPart2Tiebreak(br.part2AndTiebreak); if (!_isBracketLegal(br.part1, part2)) { br.part1 = 0; br.part2AndTiebreak = 0; emit BracketInvalidated(tokenId); } else { revert BracketAlreadyValid(); } } function setGlobalResultBracket( uint256 part1, uint256 part2, uint256 tiebreaker ) external onlyOwner { if (tiebreaker > 999) revert TiebreakerOutOfRange(); resultBracket = Bracket(part1, _packPart2Tiebreak(part2, tiebreaker)); emit GlobalResultBracketSet(part1, part2, tiebreaker); } function computeFibonacciScore(uint256 tokenId) public view returns (uint256 score) { if (!_exists(tokenId)) revert NonexistentToken(); Bracket memory user = tokenIdToBracket[tokenId]; Bracket memory fin = resultBracket; (uint256 userPart2, ) = _unpackPart2Tiebreak(user.part2AndTiebreak); (uint256 finPart2, ) = _unpackPart2Tiebreak(fin.part2AndTiebreak); for (uint256 i; i < 63; ++i) { uint256 upick = _getPick(user.part1, userPart2, i); uint256 fpick = _getPick(fin.part1, finPart2, i); if (upick > 0 && fpick > 0 && upick == fpick) { if (i < 32) score += 1; else if (i < 48) score += 2; else if (i < 56) score += 3; else if (i < 60) score += 5; else if (i < 62) score += 8; else score += 13; } } } function setDistributionAndFinalize( uint256 poolId, address[] calldata addrs, uint256[] calldata amts ) external validPool(poolId) onlyOwnerOrPoolOwner(poolId) { if (addrs.length != amts.length) revert InvalidPoolConfig(); DistributionData storage dist = distributions[poolId]; Pool storage p = pools[poolId]; if (p.finalized || dist.distributed) revert AlreadyDistributed(); dist.addrs = addrs; dist.amts = amts; dist.distributed = true; p.finalized = true; emit DistributionSetAndFinalized(poolId, _msgSenderERC721A()); } function adminRefundPool(uint256 poolId) external validPool(poolId) onlyOwnerOrPoolOwner(poolId) nonReentrant { Pool storage p = pools[poolId]; if (p.finalized) revert AlreadyDistributed(); uint256 len = p.entries.length; uint256 fee = p.entryFee; if (fee > 0 && len > 0) { for (uint256 i = 0; i < len; i++) { uint256 tokenId = p.entries[i]; address bracketOwner = ownerOf(tokenId); if (p.tokenAddress == address(0)) { SafeTransferLib.safeTransferETH(bracketOwner, fee); } else { SafeTransferLib.safeTransfer(p.tokenAddress, bracketOwner, fee); } } } p.finalized = true; emit PoolRefunded(poolId, len); } function getPoolDetails(uint256 poolId) external view returns (string memory name, string memory description, string memory imageURI, string memory bannerURI, address tokenAddress, uint256 entryFee, bool singleEntry, bool isTop, bool isSkilled, uint16 feeBasis, address feeWallet, uint256 maxEntries) { Pool storage p = pools[poolId]; return (p.name, p.description, p.imageURI, p.bannerURI, p.tokenAddress, p.entryFee, p.singleEntry, p.isTop, p.isSkilled, p.feeBasis, p.feeWallet, p.maxEntries); } function getPoolPrice(uint256 poolId) external view returns (uint256) { return pools[poolId].entryFee; } function getPoolOwner(uint256 poolId) external view returns (address) { return pools[poolId].poolOwner; } function getPoolEntries(uint256 poolId) external view returns (uint256[] memory) { return pools[poolId].entries; } function getPoolPrivateList(uint256 poolId) external view returns (address[] memory) { return pools[poolId].privateList; } function getDistribution(uint256 poolId) external view returns (address[] memory addrs, uint256[] memory amts, bool distributed) { DistributionData storage d = distributions[poolId]; return (d.addrs, d.amts, d.distributed); } function emergencyWithdrawETH(uint256 amount) external onlyOwner { SafeTransferLib.safeTransferETH(_msgSenderERC721A(), amount); } function emergencyWithdrawERC20(address token, uint256 amount) external onlyOwner { SafeTransferLib.safeTransfer(token, _msgSenderERC721A(), amount); } function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } function setTrustedBackend(address newTrusted) external onlyOwner { trustedBackend = newTrusted; } function setMaxEntries(uint256 poolId, uint16 newMaxEntries) external validPool(poolId) onlyOwnerOrPoolOwner(poolId) { pools[poolId].maxEntries = newMaxEntries; } function _isBracketLegal(uint256 part1, uint256 part2) private pure returns (bool) { for (uint256 i; i < 42; ++i) { uint256 pick = (part1 >> (i * 6)) & 0x3F; if (pick < 1 || pick > 64) return false; } for (uint256 j; j < 21; ++j) { uint256 pick = (part2 >> (j * 6)) & 0x3F; if (pick < 1 || pick > 64) return false; } return true; } function _isInPrivateList(address[] storage list, address user) internal view returns (bool) { for (uint256 i; i < list.length; ++i) { if (list[i] == user) return true; } return false; } function _payEntryFee(Pool storage p, uint256 quantity) internal { uint256 totalCost = p.entryFee * quantity; if (p.tokenAddress == address(0)) { if (msg.value != totalCost) revert IncorrectFee(); if (totalCost > 0) { p.totalCollected += totalCost; } } else { if (msg.value != 0) revert IncorrectFee(); if (totalCost > 0) { SafeTransferLib.safeTransferFrom(p.tokenAddress, _msgSenderERC721A(), address(this), totalCost); p.totalCollected += totalCost; } } } function _packPart2Tiebreak(uint256 part2, uint256 tiebreak) internal pure returns (uint256) { return part2 | (tiebreak << 126); } function _unpackPart2Tiebreak(uint256 packed) internal pure returns (uint256 part2, uint256 tiebreak) { part2 = packed & ((1 << 126) - 1); tiebreak = (packed >> 126) & 0x3FF; } function _getPick(uint256 _part1, uint256 _part2, uint256 i) internal pure returns (uint256) { if (i < 42) { return (_part1 >> (i * 6)) & 0x3F; } else { return (_part2 >> ((i - 42) * 6)) & 0x3F; } } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC721A, ERC2981) returns (bool) { return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } function batchMintBrackets(uint256 poolId, uint256 quantity) external payable validPool(poolId) nonReentrant { Pool storage p = pools[poolId]; if (p.finalized) revert AlreadyDistributed(); if (p.isSkilled) revert InvalidGameType(); if (p.singleEntry && quantity > 1) revert SingleEntryRestricted(); if (p.entries.length + quantity > p.maxEntries) revert PoolIsFull(); if (p.privateList.length > 0 && !_isInPrivateList(p.privateList, _msgSenderERC721A())) revert NotInPrivateList(); _payEntryFee(p, quantity); for (uint256 i; i < quantity; ++i) { _mintBracketInternal(poolId, 0, 0, 0, _msgSenderERC721A()); } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * The `_sequentialUpTo()` function can be overriden to enable spot mints * (i.e. non-consecutive mints) for `tokenId`s greater than `_sequentialUpTo()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // The amount of tokens minted above `_sequentialUpTo()`. // We call these spot mints (i.e. non-sequential mints). uint256 private _spotMinted; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); if (_sequentialUpTo() < _startTokenId()) _revert(SequentialUpToTooSmall.selector); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID for sequential mints. * * Override this function to change the starting token ID for sequential mints. * * Note: The value returned must never change after any tokens have been minted. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the maximum token ID (inclusive) for sequential mints. * * Override this function to return a value less than 2**256 - 1, * but greater than `_startTokenId()`, to enable spot (non-sequential) mints. * * Note: The value returned must never change after any tokens have been minted. */ function _sequentialUpTo() internal view virtual returns (uint256) { return type(uint256).max; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256 result) { // Counter underflow is impossible as `_burnCounter` cannot be incremented // more than `_currentIndex + _spotMinted - _startTokenId()` times. unchecked { // With spot minting, the intermediate `result` can be temporarily negative, // and the computation must be unchecked. result = _currentIndex - _burnCounter - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256 result) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { result = _currentIndex - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } /** * @dev Returns the total number of tokens that are spot-minted. */ function _totalSpotMinted() internal view virtual returns (uint256) { return _spotMinted; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) _revert(BalanceQueryForZeroAddress.selector); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Returns whether the ownership slot at `index` is initialized. * An uninitialized slot does not necessarily mean that the slot has no owner. */ function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) { return _packedOwnerships[index] != 0; } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * @dev Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; if (tokenId > _sequentialUpTo()) { if (_packedOwnershipExists(packed)) return packed; _revert(OwnerQueryForNonexistentToken.selector); } // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; if (packed & _BITMASK_BURNED == 0) return packed; // Otherwise, the token is burned, and we must revert. // This handles the case of batch burned tokens, where only the burned bit // of the starting slot is set, and remaining slots are left uninitialized. _revert(OwnerQueryForNonexistentToken.selector); } } // Otherwise, the data exists and we can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. // If the token is not burned, return `packed`. Otherwise, revert. if (packed & _BITMASK_BURNED == 0) return packed; } _revert(OwnerQueryForNonexistentToken.selector); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool result) { if (_startTokenId() <= tokenId) { if (tokenId > _sequentialUpTo()) return _packedOwnershipExists(_packedOwnerships[tokenId]); if (tokenId < _currentIndex) { uint256 packed; while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId; result = packed & _BITMASK_BURNED == 0; } } } /** * @dev Returns whether `packed` represents a token that exists. */ function _packedOwnershipExists(uint256 packed) private pure returns (bool result) { assembly { // The following is equivalent to `owner != address(0) && burned == false`. // Symbolically tested. result := gt(and(packed, _BITMASK_ADDRESS), and(packed, _BITMASK_BURNED)) } } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { _revert(TransferToNonERC721ReceiverImplementer.selector); } assembly { revert(add(32, reason), mload(reason)) } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) _revert(MintZeroQuantity.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; if (end - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); do { assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) _revert(MintToZeroAddress.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); if (startTokenId + quantity - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } while (index < end); // This prevents reentrancy to `_safeMint`. // It does not prevent reentrancy to `_safeMintSpot`. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } /** * @dev Mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * Emits a {Transfer} event for each mint. */ function _mintSpot(address to, uint256 tokenId) internal virtual { if (tokenId <= _sequentialUpTo()) _revert(SpotMintTokenIdTooSmall.selector); uint256 prevOwnershipPacked = _packedOwnerships[tokenId]; if (_packedOwnershipExists(prevOwnershipPacked)) _revert(TokenAlreadyExists.selector); _beforeTokenTransfers(address(0), to, tokenId, 1); // Overflows are incredibly unrealistic. // The `numberMinted` for `to` is incremented by 1, and has a max limit of 2**64 - 1. // `_spotMinted` is incremented by 1, and has a max limit of 2**256 - 1. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `true` (as `quantity == 1`). _packedOwnerships[tokenId] = _packOwnershipData( to, _nextInitializedFlag(1) | _nextExtraData(address(0), to, prevOwnershipPacked) ); // Updates: // - `balance += 1`. // - `numberMinted += 1`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += (1 << _BITPOS_NUMBER_MINTED) | 1; // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } ++_spotMinted; } _afterTokenTransfers(address(0), to, tokenId, 1); } /** * @dev Safely mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * See {_mintSpot}. * * Emits a {Transfer} event. */ function _safeMintSpot( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mintSpot(to, tokenId); unchecked { if (to.code.length != 0) { uint256 currentSpotMinted = _spotMinted; if (!_checkContractOnERC721Received(address(0), to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } // This prevents reentrancy to `_safeMintSpot`. // It does not prevent reentrancy to `_safeMint`. if (_spotMinted != currentSpotMinted) revert(); } } } /** * @dev Equivalent to `_safeMintSpot(to, tokenId, '')`. */ function _safeMintSpot(address to, uint256 tokenId) internal virtual { _safeMintSpot(to, tokenId, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as `_burnCounter` cannot be exceed `_currentIndex + _spotMinted` times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory ownership) { unchecked { if (tokenId >= _startTokenId()) { if (tokenId > _sequentialUpTo()) return _ownershipAt(tokenId); if (tokenId < _nextTokenId()) { // If the `tokenId` is within bounds, // scan backwards for the initialized ownership slot. while (!_ownershipIsInitialized(tokenId)) --tokenId; return _ownershipAt(tokenId); } } } } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { TokenOwnership[] memory ownerships; uint256 i = tokenIds.length; assembly { // Grab the free memory pointer. ownerships := mload(0x40) // Store the length. mstore(ownerships, i) // Allocate one word for the length, // `tokenIds.length` words for the pointers. i := shl(5, i) // Multiply `i` by 32. mstore(0x40, add(add(ownerships, 0x20), i)) } while (i != 0) { uint256 tokenId; assembly { i := sub(i, 0x20) tokenId := calldataload(add(tokenIds.offset, i)) } TokenOwnership memory ownership = explicitOwnershipOf(tokenId); assembly { // Store the pointer of `ownership` in the `ownerships` array. mstore(add(add(ownerships, 0x20), i), ownership) } } return ownerships; } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { return _tokensOfOwnerIn(owner, start, stop); } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { // If spot mints are enabled, full-range scan is disabled. if (_sequentialUpTo() != type(uint256).max) _revert(NotCompatibleWithSpotMints.selector); uint256 start = _startTokenId(); uint256 stop = _nextTokenId(); uint256[] memory tokenIds; if (start != stop) tokenIds = _tokensOfOwnerIn(owner, start, stop); return tokenIds; } /** * @dev Helper function for returning an array of token IDs owned by `owner`. * * Note that this function is optimized for smaller bytecode size over runtime gas, * since it is meant to be called off-chain. */ function _tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) private view returns (uint256[] memory tokenIds) { unchecked { if (start >= stop) _revert(InvalidQueryRange.selector); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) start = _startTokenId(); uint256 nextTokenId = _nextTokenId(); // If spot mints are enabled, scan all the way until the specified `stop`. uint256 stopLimit = _sequentialUpTo() != type(uint256).max ? stop : nextTokenId; // Set `stop = min(stop, stopLimit)`. if (stop >= stopLimit) stop = stopLimit; // Number of tokens to scan. uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength` to zero if the range contains no tokens. if (start >= stop) tokenIdsMaxLength = 0; // If there are one or more tokens to scan. if (tokenIdsMaxLength != 0) { // Set `tokenIdsMaxLength = min(balanceOf(owner), tokenIdsMaxLength)`. if (stop - start <= tokenIdsMaxLength) tokenIdsMaxLength = stop - start; uint256 m; // Start of available memory. assembly { // Grab the free memory pointer. tokenIds := mload(0x40) // Allocate one word for the length, and `tokenIdsMaxLength` words // for the data. `shl(5, x)` is equivalent to `mul(32, x)`. m := add(tokenIds, shl(5, add(tokenIdsMaxLength, 1))) mstore(0x40, m) } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), // initialize `currOwnershipAddr`. // `ownership.address` will not be zero, // as `start` is clamped to the valid token ID range. if (!ownership.burned) currOwnershipAddr = ownership.addr; uint256 tokenIdsIdx; // Use a do-while, which is slightly more efficient for this case, // as the array will at least contain one element. do { if (_sequentialUpTo() != type(uint256).max) { // Skip the remaining unused sequential slots. if (start == nextTokenId) start = _sequentialUpTo() + 1; // Reset `currOwnershipAddr`, as each spot-minted token is a batch of one. if (start > _sequentialUpTo()) currOwnershipAddr = address(0); } ownership = _ownershipAt(start); // This implicitly allocates memory. assembly { switch mload(add(ownership, 0x40)) // if `ownership.burned == false`. case 0 { // if `ownership.addr != address(0)`. // The `addr` already has it's upper 96 bits clearned, // since it is written to memory with regular Solidity. if mload(ownership) { currOwnershipAddr := mload(ownership) } // if `currOwnershipAddr == owner`. // The `shl(96, x)` is to make the comparison agnostic to any // dirty upper 96 bits in `owner`. if iszero(shl(96, xor(currOwnershipAddr, owner))) { tokenIdsIdx := add(tokenIdsIdx, 1) mstore(add(tokenIds, shl(5, tokenIdsIdx)), start) } } // Otherwise, reset `currOwnershipAddr`. // This handles the case of batch burned tokens // (burned bit of first slot set, remaining slots left uninitialized). default { currOwnershipAddr := 0 } start := add(start, 1) // Free temporary memory implicitly allocated for ownership // to avoid quadratic memory expansion costs. mstore(0x40, m) } } while (!(start == stop || tokenIdsIdx == tokenIdsMaxLength)); // Store the length of the array. assembly { mstore(tokenIds, tokenIdsIdx) } } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {LibBytes} from "./LibBytes.sol"; /// @notice Library for converting numbers into strings and other string operations. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibString.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol) /// /// @dev Note: /// For performance and bytecode compactness, most of the string operations are restricted to /// byte strings (7-bit ASCII), except where otherwise specified. /// Usage of byte string operations on charsets with runes spanning two or more bytes /// can lead to undefined behavior. library LibString { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STRUCTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Goated string storage struct that totally MOGs, no cap, fr. /// Uses less gas and bytecode than Solidity's native string storage. It's meta af. /// Packs length with the first 31 bytes if <255 bytes, so it’s mad tight. struct StringStorage { bytes32 _spacer; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The length of the output is too small to contain all the hex digits. error HexLengthInsufficient(); /// @dev The length of the string is more than 32 bytes. error TooBigForSmallString(); /// @dev The input string must be a 7-bit ASCII. error StringNot7BitASCII(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The constant returned when the `search` is not found in the string. uint256 internal constant NOT_FOUND = type(uint256).max; /// @dev Lookup for '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'. uint128 internal constant ALPHANUMERIC_7_BIT_ASCII = 0x7fffffe07fffffe03ff000000000000; /// @dev Lookup for 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'. uint128 internal constant LETTERS_7_BIT_ASCII = 0x7fffffe07fffffe0000000000000000; /// @dev Lookup for 'abcdefghijklmnopqrstuvwxyz'. uint128 internal constant LOWERCASE_7_BIT_ASCII = 0x7fffffe000000000000000000000000; /// @dev Lookup for 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. uint128 internal constant UPPERCASE_7_BIT_ASCII = 0x7fffffe0000000000000000; /// @dev Lookup for '0123456789'. uint128 internal constant DIGITS_7_BIT_ASCII = 0x3ff000000000000; /// @dev Lookup for '0123456789abcdefABCDEF'. uint128 internal constant HEXDIGITS_7_BIT_ASCII = 0x7e0000007e03ff000000000000; /// @dev Lookup for '01234567'. uint128 internal constant OCTDIGITS_7_BIT_ASCII = 0xff000000000000; /// @dev Lookup for '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c'. uint128 internal constant PRINTABLE_7_BIT_ASCII = 0x7fffffffffffffffffffffff00003e00; /// @dev Lookup for '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'. uint128 internal constant PUNCTUATION_7_BIT_ASCII = 0x78000001f8000001fc00fffe00000000; /// @dev Lookup for ' \t\n\r\x0b\x0c'. uint128 internal constant WHITESPACE_7_BIT_ASCII = 0x100003e00; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STRING STORAGE OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Sets the value of the string storage `$` to `s`. function set(StringStorage storage $, string memory s) internal { LibBytes.set(bytesStorage($), bytes(s)); } /// @dev Sets the value of the string storage `$` to `s`. function setCalldata(StringStorage storage $, string calldata s) internal { LibBytes.setCalldata(bytesStorage($), bytes(s)); } /// @dev Sets the value of the string storage `$` to the empty string. function clear(StringStorage storage $) internal { delete $._spacer; } /// @dev Returns whether the value stored is `$` is the empty string "". function isEmpty(StringStorage storage $) internal view returns (bool) { return uint256($._spacer) & 0xff == uint256(0); } /// @dev Returns the length of the value stored in `$`. function length(StringStorage storage $) internal view returns (uint256) { return LibBytes.length(bytesStorage($)); } /// @dev Returns the value stored in `$`. function get(StringStorage storage $) internal view returns (string memory) { return string(LibBytes.get(bytesStorage($))); } /// @dev Helper to cast `$` to a `BytesStorage`. function bytesStorage(StringStorage storage $) internal pure returns (LibBytes.BytesStorage storage casted) { /// @solidity memory-safe-assembly assembly { casted.slot := $.slot } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* DECIMAL OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the base 10 decimal representation of `value`. function toString(uint256 value) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. result := add(mload(0x40), 0x80) mstore(0x40, add(result, 0x20)) // Allocate memory. mstore(result, 0) // Zeroize the slot after the string. let end := result // Cache the end of the memory to calculate the length later. let w := not(0) // Tsk. // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for { let temp := value } 1 {} { result := add(result, w) // `sub(result, 1)`. // Store the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(result, add(48, mod(temp, 10))) temp := div(temp, 10) // Keep dividing `temp` until zero. if iszero(temp) { break } } let n := sub(end, result) result := sub(result, 0x20) // Move the pointer 32 bytes back to make room for the length. mstore(result, n) // Store the length. } } /// @dev Returns the base 10 decimal representation of `value`. function toString(int256 value) internal pure returns (string memory result) { if (value >= 0) return toString(uint256(value)); unchecked { result = toString(~uint256(value) + 1); } /// @solidity memory-safe-assembly assembly { // We still have some spare memory space on the left, // as we have allocated 3 words (96 bytes) for up to 78 digits. let n := mload(result) // Load the string length. mstore(result, 0x2d) // Store the '-' character. result := sub(result, 1) // Move back the string pointer by a byte. mstore(result, add(n, 1)) // Update the string length. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* HEXADECIMAL OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the hexadecimal representation of `value`, /// left-padded to an input length of `byteCount` bytes. /// The output is prefixed with "0x" encoded using 2 hexadecimal digits per byte, /// giving a total length of `byteCount * 2 + 2` bytes. /// Reverts if `byteCount` is too small for the output to contain all the digits. function toHexString(uint256 value, uint256 byteCount) internal pure returns (string memory result) { result = toHexStringNoPrefix(value, byteCount); /// @solidity memory-safe-assembly assembly { let n := add(mload(result), 2) // Compute the length. mstore(result, 0x3078) // Store the "0x" prefix. result := sub(result, 2) // Move the pointer. mstore(result, n) // Store the length. } } /// @dev Returns the hexadecimal representation of `value`, /// left-padded to an input length of `byteCount` bytes. /// The output is not prefixed with "0x" and is encoded using 2 hexadecimal digits per byte, /// giving a total length of `byteCount * 2` bytes. /// Reverts if `byteCount` is too small for the output to contain all the digits. function toHexStringNoPrefix(uint256 value, uint256 byteCount) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { // We need 0x20 bytes for the trailing zeros padding, `byteCount * 2` bytes // for the digits, 0x02 bytes for the prefix, and 0x20 bytes for the length. // We add 0x20 to the total and round down to a multiple of 0x20. // (0x20 + 0x20 + 0x02 + 0x20) = 0x62. result := add(mload(0x40), and(add(shl(1, byteCount), 0x42), not(0x1f))) mstore(0x40, add(result, 0x20)) // Allocate memory. mstore(result, 0) // Zeroize the slot after the string. let end := result // Cache the end to calculate the length later. // Store "0123456789abcdef" in scratch space. mstore(0x0f, 0x30313233343536373839616263646566) let start := sub(result, add(byteCount, byteCount)) let w := not(1) // Tsk. let temp := value // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for {} 1 {} { result := add(result, w) // `sub(result, 2)`. mstore8(add(result, 1), mload(and(temp, 15))) mstore8(result, mload(and(shr(4, temp), 15))) temp := shr(8, temp) if iszero(xor(result, start)) { break } } if temp { mstore(0x00, 0x2194895a) // `HexLengthInsufficient()`. revert(0x1c, 0x04) } let n := sub(end, result) result := sub(result, 0x20) mstore(result, n) // Store the length. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x" and encoded using 2 hexadecimal digits per byte. /// As address are 20 bytes long, the output will left-padded to have /// a length of `20 * 2 + 2` bytes. function toHexString(uint256 value) internal pure returns (string memory result) { result = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let n := add(mload(result), 2) // Compute the length. mstore(result, 0x3078) // Store the "0x" prefix. result := sub(result, 2) // Move the pointer. mstore(result, n) // Store the length. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x". /// The output excludes leading "0" from the `toHexString` output. /// `0x00: "0x0", 0x01: "0x1", 0x12: "0x12", 0x123: "0x123"`. function toMinimalHexString(uint256 value) internal pure returns (string memory result) { result = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let o := eq(byte(0, mload(add(result, 0x20))), 0x30) // Whether leading zero is present. let n := add(mload(result), 2) // Compute the length. mstore(add(result, o), 0x3078) // Store the "0x" prefix, accounting for leading zero. result := sub(add(result, o), 2) // Move the pointer, accounting for leading zero. mstore(result, sub(n, o)) // Store the length, accounting for leading zero. } } /// @dev Returns the hexadecimal representation of `value`. /// The output excludes leading "0" from the `toHexStringNoPrefix` output. /// `0x00: "0", 0x01: "1", 0x12: "12", 0x123: "123"`. function toMinimalHexStringNoPrefix(uint256 value) internal pure returns (string memory result) { result = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let o := eq(byte(0, mload(add(result, 0x20))), 0x30) // Whether leading zero is present. let n := mload(result) // Get the length. result := add(result, o) // Move the pointer, accounting for leading zero. mstore(result, sub(n, o)) // Store the length, accounting for leading zero. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is encoded using 2 hexadecimal digits per byte. /// As address are 20 bytes long, the output will left-padded to have /// a length of `20 * 2` bytes. function toHexStringNoPrefix(uint256 value) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { // We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length, // 0x02 bytes for the prefix, and 0x40 bytes for the digits. // The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x40) is 0xa0. result := add(mload(0x40), 0x80) mstore(0x40, add(result, 0x20)) // Allocate memory. mstore(result, 0) // Zeroize the slot after the string. let end := result // Cache the end to calculate the length later. mstore(0x0f, 0x30313233343536373839616263646566) // Store the "0123456789abcdef" lookup. let w := not(1) // Tsk. // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for { let temp := value } 1 {} { result := add(result, w) // `sub(result, 2)`. mstore8(add(result, 1), mload(and(temp, 15))) mstore8(result, mload(and(shr(4, temp), 15))) temp := shr(8, temp) if iszero(temp) { break } } let n := sub(end, result) result := sub(result, 0x20) mstore(result, n) // Store the length. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x", encoded using 2 hexadecimal digits per byte, /// and the alphabets are capitalized conditionally according to /// https://eips.ethereum.org/EIPS/eip-55 function toHexStringChecksummed(address value) internal pure returns (string memory result) { result = toHexString(value); /// @solidity memory-safe-assembly assembly { let mask := shl(6, div(not(0), 255)) // `0b010000000100000000 ...` let o := add(result, 0x22) let hashed := and(keccak256(o, 40), mul(34, mask)) // `0b10001000 ... ` let t := shl(240, 136) // `0b10001000 << 240` for { let i := 0 } 1 {} { mstore(add(i, i), mul(t, byte(i, hashed))) i := add(i, 1) if eq(i, 20) { break } } mstore(o, xor(mload(o), shr(1, and(mload(0x00), and(mload(o), mask))))) o := add(o, 0x20) mstore(o, xor(mload(o), shr(1, and(mload(0x20), and(mload(o), mask))))) } } /// @dev Returns the hexadecimal representation of `value`. /// The output is prefixed with "0x" and encoded using 2 hexadecimal digits per byte. function toHexString(address value) internal pure returns (string memory result) { result = toHexStringNoPrefix(value); /// @solidity memory-safe-assembly assembly { let n := add(mload(result), 2) // Compute the length. mstore(result, 0x3078) // Store the "0x" prefix. result := sub(result, 2) // Move the pointer. mstore(result, n) // Store the length. } } /// @dev Returns the hexadecimal representation of `value`. /// The output is encoded using 2 hexadecimal digits per byte. function toHexStringNoPrefix(address value) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) // Allocate memory. // We need 0x20 bytes for the trailing zeros padding, 0x20 bytes for the length, // 0x02 bytes for the prefix, and 0x28 bytes for the digits. // The next multiple of 0x20 above (0x20 + 0x20 + 0x02 + 0x28) is 0x80. mstore(0x40, add(result, 0x80)) mstore(0x0f, 0x30313233343536373839616263646566) // Store the "0123456789abcdef" lookup. result := add(result, 2) mstore(result, 40) // Store the length. let o := add(result, 0x20) mstore(add(o, 40), 0) // Zeroize the slot after the string. value := shl(96, value) // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. for { let i := 0 } 1 {} { let p := add(o, add(i, i)) let temp := byte(i, value) mstore8(add(p, 1), mload(and(temp, 15))) mstore8(p, mload(shr(4, temp))) i := add(i, 1) if eq(i, 20) { break } } } } /// @dev Returns the hex encoded string from the raw bytes. /// The output is encoded using 2 hexadecimal digits per byte. function toHexString(bytes memory raw) internal pure returns (string memory result) { result = toHexStringNoPrefix(raw); /// @solidity memory-safe-assembly assembly { let n := add(mload(result), 2) // Compute the length. mstore(result, 0x3078) // Store the "0x" prefix. result := sub(result, 2) // Move the pointer. mstore(result, n) // Store the length. } } /// @dev Returns the hex encoded string from the raw bytes. /// The output is encoded using 2 hexadecimal digits per byte. function toHexStringNoPrefix(bytes memory raw) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let n := mload(raw) result := add(mload(0x40), 2) // Skip 2 bytes for the optional prefix. mstore(result, add(n, n)) // Store the length of the output. mstore(0x0f, 0x30313233343536373839616263646566) // Store the "0123456789abcdef" lookup. let o := add(result, 0x20) let end := add(raw, n) for {} iszero(eq(raw, end)) {} { raw := add(raw, 1) mstore8(add(o, 1), mload(and(mload(raw), 15))) mstore8(o, mload(and(shr(4, mload(raw)), 15))) o := add(o, 2) } mstore(o, 0) // Zeroize the slot after the string. mstore(0x40, add(o, 0x20)) // Allocate memory. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* RUNE STRING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the number of UTF characters in the string. function runeCount(string memory s) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { if mload(s) { mstore(0x00, div(not(0), 255)) mstore(0x20, 0x0202020202020202020202020202020202020202020202020303030304040506) let o := add(s, 0x20) let end := add(o, mload(s)) for { result := 1 } 1 { result := add(result, 1) } { o := add(o, byte(0, mload(shr(250, mload(o))))) if iszero(lt(o, end)) { break } } } } } /// @dev Returns if this string is a 7-bit ASCII string. /// (i.e. all characters codes are in [0..127]) function is7BitASCII(string memory s) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { result := 1 let mask := shl(7, div(not(0), 255)) let n := mload(s) if n { let o := add(s, 0x20) let end := add(o, n) let last := mload(end) mstore(end, 0) for {} 1 {} { if and(mask, mload(o)) { result := 0 break } o := add(o, 0x20) if iszero(lt(o, end)) { break } } mstore(end, last) } } } /// @dev Returns if this string is a 7-bit ASCII string, /// AND all characters are in the `allowed` lookup. /// Note: If `s` is empty, returns true regardless of `allowed`. function is7BitASCII(string memory s, uint128 allowed) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { result := 1 if mload(s) { let allowed_ := shr(128, shl(128, allowed)) let o := add(s, 0x20) for { let end := add(o, mload(s)) } 1 {} { result := and(result, shr(byte(0, mload(o)), allowed_)) o := add(o, 1) if iszero(and(result, lt(o, end))) { break } } } } } /// @dev Converts the bytes in the 7-bit ASCII string `s` to /// an allowed lookup for use in `is7BitASCII(s, allowed)`. /// To save runtime gas, you can cache the result in an immutable variable. function to7BitASCIIAllowedLookup(string memory s) internal pure returns (uint128 result) { /// @solidity memory-safe-assembly assembly { if mload(s) { let o := add(s, 0x20) for { let end := add(o, mload(s)) } 1 {} { result := or(result, shl(byte(0, mload(o)), 1)) o := add(o, 1) if iszero(lt(o, end)) { break } } if shr(128, result) { mstore(0x00, 0xc9807e0d) // `StringNot7BitASCII()`. revert(0x1c, 0x04) } } } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* BYTE STRING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // For performance and bytecode compactness, byte string operations are restricted // to 7-bit ASCII strings. All offsets are byte offsets, not UTF character offsets. // Usage of byte string operations on charsets with runes spanning two or more bytes // can lead to undefined behavior. /// @dev Returns `subject` all occurrences of `needle` replaced with `replacement`. function replace(string memory subject, string memory needle, string memory replacement) internal pure returns (string memory) { return string(LibBytes.replace(bytes(subject), bytes(needle), bytes(replacement))); } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from left to right, starting from `from`. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function indexOf(string memory subject, string memory needle, uint256 from) internal pure returns (uint256) { return LibBytes.indexOf(bytes(subject), bytes(needle), from); } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from left to right. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function indexOf(string memory subject, string memory needle) internal pure returns (uint256) { return LibBytes.indexOf(bytes(subject), bytes(needle), 0); } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from right to left, starting from `from`. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function lastIndexOf(string memory subject, string memory needle, uint256 from) internal pure returns (uint256) { return LibBytes.lastIndexOf(bytes(subject), bytes(needle), from); } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from right to left. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function lastIndexOf(string memory subject, string memory needle) internal pure returns (uint256) { return LibBytes.lastIndexOf(bytes(subject), bytes(needle), type(uint256).max); } /// @dev Returns true if `needle` is found in `subject`, false otherwise. function contains(string memory subject, string memory needle) internal pure returns (bool) { return LibBytes.contains(bytes(subject), bytes(needle)); } /// @dev Returns whether `subject` starts with `needle`. function startsWith(string memory subject, string memory needle) internal pure returns (bool) { return LibBytes.startsWith(bytes(subject), bytes(needle)); } /// @dev Returns whether `subject` ends with `needle`. function endsWith(string memory subject, string memory needle) internal pure returns (bool) { return LibBytes.endsWith(bytes(subject), bytes(needle)); } /// @dev Returns `subject` repeated `times`. function repeat(string memory subject, uint256 times) internal pure returns (string memory) { return string(LibBytes.repeat(bytes(subject), times)); } /// @dev Returns a copy of `subject` sliced from `start` to `end` (exclusive). /// `start` and `end` are byte offsets. function slice(string memory subject, uint256 start, uint256 end) internal pure returns (string memory) { return string(LibBytes.slice(bytes(subject), start, end)); } /// @dev Returns a copy of `subject` sliced from `start` to the end of the string. /// `start` is a byte offset. function slice(string memory subject, uint256 start) internal pure returns (string memory) { return string(LibBytes.slice(bytes(subject), start, type(uint256).max)); } /// @dev Returns all the indices of `needle` in `subject`. /// The indices are byte offsets. function indicesOf(string memory subject, string memory needle) internal pure returns (uint256[] memory) { return LibBytes.indicesOf(bytes(subject), bytes(needle)); } /// @dev Returns a arrays of strings based on the `delimiter` inside of the `subject` string. function split(string memory subject, string memory delimiter) internal pure returns (string[] memory result) { bytes[] memory a = LibBytes.split(bytes(subject), bytes(delimiter)); /// @solidity memory-safe-assembly assembly { result := a } } /// @dev Returns a concatenated string of `a` and `b`. /// Cheaper than `string.concat()` and does not de-align the free memory pointer. function concat(string memory a, string memory b) internal pure returns (string memory) { return string(LibBytes.concat(bytes(a), bytes(b))); } /// @dev Returns a copy of the string in either lowercase or UPPERCASE. /// WARNING! This function is only compatible with 7-bit ASCII strings. function toCase(string memory subject, bool toUpper) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let n := mload(subject) if n { result := mload(0x40) let o := add(result, 0x20) let d := sub(subject, result) let flags := shl(add(70, shl(5, toUpper)), 0x3ffffff) for { let end := add(o, n) } 1 {} { let b := byte(0, mload(add(d, o))) mstore8(o, xor(and(shr(b, flags), 0x20), b)) o := add(o, 1) if eq(o, end) { break } } mstore(result, n) // Store the length. mstore(o, 0) // Zeroize the slot after the string. mstore(0x40, add(o, 0x20)) // Allocate memory. } } } /// @dev Returns a string from a small bytes32 string. /// `s` must be null-terminated, or behavior will be undefined. function fromSmallString(bytes32 s) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) let n := 0 for {} byte(n, s) { n := add(n, 1) } {} // Scan for '\0'. mstore(result, n) // Store the length. let o := add(result, 0x20) mstore(o, s) // Store the bytes of the string. mstore(add(o, n), 0) // Zeroize the slot after the string. mstore(0x40, add(result, 0x40)) // Allocate memory. } } /// @dev Returns the small string, with all bytes after the first null byte zeroized. function normalizeSmallString(bytes32 s) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { for {} byte(result, s) { result := add(result, 1) } {} // Scan for '\0'. mstore(0x00, s) mstore(result, 0x00) result := mload(0x00) } } /// @dev Returns the string as a normalized null-terminated small string. function toSmallString(string memory s) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { result := mload(s) if iszero(lt(result, 33)) { mstore(0x00, 0xec92f9a3) // `TooBigForSmallString()`. revert(0x1c, 0x04) } result := shl(shl(3, sub(32, result)), mload(add(s, result))) } } /// @dev Returns a lowercased copy of the string. /// WARNING! This function is only compatible with 7-bit ASCII strings. function lower(string memory subject) internal pure returns (string memory result) { result = toCase(subject, false); } /// @dev Returns an UPPERCASED copy of the string. /// WARNING! This function is only compatible with 7-bit ASCII strings. function upper(string memory subject) internal pure returns (string memory result) { result = toCase(subject, true); } /// @dev Escapes the string to be used within HTML tags. function escapeHTML(string memory s) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) let end := add(s, mload(s)) let o := add(result, 0x20) // Store the bytes of the packed offsets and strides into the scratch space. // `packed = (stride << 5) | offset`. Max offset is 20. Max stride is 6. mstore(0x1f, 0x900094) mstore(0x08, 0xc0000000a6ab) // Store ""&'<>" into the scratch space. mstore(0x00, shl(64, 0x2671756f743b26616d703b262333393b266c743b2667743b)) for {} iszero(eq(s, end)) {} { s := add(s, 1) let c := and(mload(s), 0xff) // Not in `["\"","'","&","<",">"]`. if iszero(and(shl(c, 1), 0x500000c400000000)) { mstore8(o, c) o := add(o, 1) continue } let t := shr(248, mload(c)) mstore(o, mload(and(t, 0x1f))) o := add(o, shr(5, t)) } mstore(o, 0) // Zeroize the slot after the string. mstore(result, sub(o, add(result, 0x20))) // Store the length. mstore(0x40, add(o, 0x20)) // Allocate memory. } } /// @dev Escapes the string to be used within double-quotes in a JSON. /// If `addDoubleQuotes` is true, the result will be enclosed in double-quotes. function escapeJSON(string memory s, bool addDoubleQuotes) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) let o := add(result, 0x20) if addDoubleQuotes { mstore8(o, 34) o := add(1, o) } // Store "\\u0000" in scratch space. // Store "0123456789abcdef" in scratch space. // Also, store `{0x08:"b", 0x09:"t", 0x0a:"n", 0x0c:"f", 0x0d:"r"}`. // into the scratch space. mstore(0x15, 0x5c75303030303031323334353637383961626364656662746e006672) // Bitmask for detecting `["\"","\\"]`. let e := or(shl(0x22, 1), shl(0x5c, 1)) for { let end := add(s, mload(s)) } iszero(eq(s, end)) {} { s := add(s, 1) let c := and(mload(s), 0xff) if iszero(lt(c, 0x20)) { if iszero(and(shl(c, 1), e)) { // Not in `["\"","\\"]`. mstore8(o, c) o := add(o, 1) continue } mstore8(o, 0x5c) // "\\". mstore8(add(o, 1), c) o := add(o, 2) continue } if iszero(and(shl(c, 1), 0x3700)) { // Not in `["\b","\t","\n","\f","\d"]`. mstore8(0x1d, mload(shr(4, c))) // Hex value. mstore8(0x1e, mload(and(c, 15))) // Hex value. mstore(o, mload(0x19)) // "\\u00XX". o := add(o, 6) continue } mstore8(o, 0x5c) // "\\". mstore8(add(o, 1), mload(add(c, 8))) o := add(o, 2) } if addDoubleQuotes { mstore8(o, 34) o := add(1, o) } mstore(o, 0) // Zeroize the slot after the string. mstore(result, sub(o, add(result, 0x20))) // Store the length. mstore(0x40, add(o, 0x20)) // Allocate memory. } } /// @dev Escapes the string to be used within double-quotes in a JSON. function escapeJSON(string memory s) internal pure returns (string memory result) { result = escapeJSON(s, false); } /// @dev Encodes `s` so that it can be safely used in a URI, /// just like `encodeURIComponent` in JavaScript. /// See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent /// See: https://datatracker.ietf.org/doc/html/rfc2396 /// See: https://datatracker.ietf.org/doc/html/rfc3986 function encodeURIComponent(string memory s) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) // Store "0123456789ABCDEF" in scratch space. // Uppercased to be consistent with JavaScript's implementation. mstore(0x0f, 0x30313233343536373839414243444546) let o := add(result, 0x20) for { let end := add(s, mload(s)) } iszero(eq(s, end)) {} { s := add(s, 1) let c := and(mload(s), 0xff) // If not in `[0-9A-Z-a-z-_.!~*'()]`. if iszero(and(1, shr(c, 0x47fffffe87fffffe03ff678200000000))) { mstore8(o, 0x25) // '%'. mstore8(add(o, 1), mload(and(shr(4, c), 15))) mstore8(add(o, 2), mload(and(c, 15))) o := add(o, 3) continue } mstore8(o, c) o := add(o, 1) } mstore(result, sub(o, add(result, 0x20))) // Store the length. mstore(o, 0) // Zeroize the slot after the string. mstore(0x40, add(o, 0x20)) // Allocate memory. } } /// @dev Returns whether `a` equals `b`. function eq(string memory a, string memory b) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { result := eq(keccak256(add(a, 0x20), mload(a)), keccak256(add(b, 0x20), mload(b))) } } /// @dev Returns whether `a` equals `b`, where `b` is a null-terminated small string. function eqs(string memory a, bytes32 b) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { // These should be evaluated on compile time, as far as possible. let m := not(shl(7, div(not(iszero(b)), 255))) // `0x7f7f ...`. let x := not(or(m, or(b, add(m, and(b, m))))) let r := shl(7, iszero(iszero(shr(128, x)))) r := or(r, shl(6, iszero(iszero(shr(64, shr(r, x)))))) r := or(r, shl(5, lt(0xffffffff, shr(r, x)))) r := or(r, shl(4, lt(0xffff, shr(r, x)))) r := or(r, shl(3, lt(0xff, shr(r, x)))) // forgefmt: disable-next-item result := gt(eq(mload(a), add(iszero(x), xor(31, shr(3, r)))), xor(shr(add(8, r), b), shr(add(8, r), mload(add(a, 0x20))))) } } /// @dev Returns 0 if `a == b`, -1 if `a < b`, +1 if `a > b`. /// If `a` == b[:a.length]`, and `a.length < b.length`, returns -1. function cmp(string memory a, string memory b) internal pure returns (int256) { return LibBytes.cmp(bytes(a), bytes(b)); } /// @dev Packs a single string with its length into a single word. /// Returns `bytes32(0)` if the length is zero or greater than 31. function packOne(string memory a) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { // We don't need to zero right pad the string, // since this is our own custom non-standard packing scheme. result := mul( // Load the length and the bytes. mload(add(a, 0x1f)), // `length != 0 && length < 32`. Abuses underflow. // Assumes that the length is valid and within the block gas limit. lt(sub(mload(a), 1), 0x1f) ) } } /// @dev Unpacks a string packed using {packOne}. /// Returns the empty string if `packed` is `bytes32(0)`. /// If `packed` is not an output of {packOne}, the output behavior is undefined. function unpackOne(bytes32 packed) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) // Grab the free memory pointer. mstore(0x40, add(result, 0x40)) // Allocate 2 words (1 for the length, 1 for the bytes). mstore(result, 0) // Zeroize the length slot. mstore(add(result, 0x1f), packed) // Store the length and bytes. mstore(add(add(result, 0x20), mload(result)), 0) // Right pad with zeroes. } } /// @dev Packs two strings with their lengths into a single word. /// Returns `bytes32(0)` if combined length is zero or greater than 30. function packTwo(string memory a, string memory b) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { let aLen := mload(a) // We don't need to zero right pad the strings, // since this is our own custom non-standard packing scheme. result := mul( or( // Load the length and the bytes of `a` and `b`. shl(shl(3, sub(0x1f, aLen)), mload(add(a, aLen))), mload(sub(add(b, 0x1e), aLen))), // `totalLen != 0 && totalLen < 31`. Abuses underflow. // Assumes that the lengths are valid and within the block gas limit. lt(sub(add(aLen, mload(b)), 1), 0x1e) ) } } /// @dev Unpacks strings packed using {packTwo}. /// Returns the empty strings if `packed` is `bytes32(0)`. /// If `packed` is not an output of {packTwo}, the output behavior is undefined. function unpackTwo(bytes32 packed) internal pure returns (string memory resultA, string memory resultB) { /// @solidity memory-safe-assembly assembly { resultA := mload(0x40) // Grab the free memory pointer. resultB := add(resultA, 0x40) // Allocate 2 words for each string (1 for the length, 1 for the byte). Total 4 words. mstore(0x40, add(resultB, 0x40)) // Zeroize the length slots. mstore(resultA, 0) mstore(resultB, 0) // Store the lengths and bytes. mstore(add(resultA, 0x1f), packed) mstore(add(resultB, 0x1f), mload(add(add(resultA, 0x20), mload(resultA)))) // Right pad with zeroes. mstore(add(add(resultA, 0x20), mload(resultA)), 0) mstore(add(add(resultB, 0x20), mload(resultB)), 0) } } /// @dev Directly returns `a` without copying. function directReturn(string memory a) internal pure { assembly { // Assumes that the string does not start from the scratch space. let retStart := sub(a, 0x20) let retUnpaddedSize := add(mload(a), 0x40) // Right pad with zeroes. Just in case the string is produced // by a method that doesn't zero right pad. mstore(add(retStart, retUnpaddedSize), 0) mstore(retStart, 0x20) // Store the return offset. // End the transaction, returning the string. return(retStart, and(not(0x1f), add(0x1f, retUnpaddedSize))) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Reentrancy guard mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ReentrancyGuard.sol) abstract contract ReentrancyGuard { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Unauthorized reentrant call. error Reentrancy(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Equivalent to: `uint72(bytes9(keccak256("_REENTRANCY_GUARD_SLOT")))`. /// 9 bytes is large enough to avoid collisions with lower slots, /// but not too large to result in excessive bytecode bloat. uint256 private constant _REENTRANCY_GUARD_SLOT = 0x929eee149b4bd21268; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* REENTRANCY GUARD */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Guards a function from reentrancy. modifier nonReentrant() virtual { /// @solidity memory-safe-assembly assembly { if eq(sload(_REENTRANCY_GUARD_SLOT), address()) { mstore(0x00, 0xab143c06) // `Reentrancy()`. revert(0x1c, 0x04) } sstore(_REENTRANCY_GUARD_SLOT, address()) } _; /// @solidity memory-safe-assembly assembly { sstore(_REENTRANCY_GUARD_SLOT, codesize()) } } /// @dev Guards a view function from read-only reentrancy. modifier nonReadReentrant() virtual { /// @solidity memory-safe-assembly assembly { if eq(sload(_REENTRANCY_GUARD_SLOT), address()) { mstore(0x00, 0xab143c06) // `Reentrancy()`. revert(0x1c, 0x04) } } _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple single owner authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol) /// /// @dev Note: /// This implementation does NOT auto-initialize the owner to `msg.sender`. /// You MUST call the `_initializeOwner` in the constructor / initializer. /// /// While the ownable portion follows /// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility, /// the nomenclature for the 2-step ownership handover may be unique to this codebase. abstract contract Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The caller is not authorized to call the function. error Unauthorized(); /// @dev The `newOwner` cannot be the zero address. error NewOwnerIsZeroAddress(); /// @dev The `pendingOwner` does not have a valid handover request. error NoHandoverRequest(); /// @dev Cannot double-initialize. error AlreadyInitialized(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This event is intentionally kept the same as OpenZeppelin's Ownable to be /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), /// despite it not being as lightweight as a single argument event. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev An ownership handover to `pendingOwner` has been requested. event OwnershipHandoverRequested(address indexed pendingOwner); /// @dev The ownership handover to `pendingOwner` has been canceled. event OwnershipHandoverCanceled(address indexed pendingOwner); /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`. uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE = 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0; /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE = 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d; /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE = 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The owner slot is given by: /// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`. /// It is intentionally chosen to be a high value /// to avoid collision with lower slots. /// The choice of manual storage layout is to enable compatibility /// with both regular and upgradeable contracts. bytes32 internal constant _OWNER_SLOT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927; /// The ownership handover slot of `newOwner` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED)) /// let handoverSlot := keccak256(0x00, 0x20) /// ``` /// It stores the expiry timestamp of the two-step ownership handover. uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Override to return true to make `_initializeOwner` prevent double-initialization. function _guardInitializeOwner() internal pure virtual returns (bool guard) {} /// @dev Initializes the owner directly without authorization guard. /// This function must be called upon initialization, /// regardless of whether the contract is upgradeable or not. /// This is to enable generalization to both regular and upgradeable contracts, /// and to save gas in case the initial owner is not the caller. /// For performance reasons, this function will not check if there /// is an existing owner. function _initializeOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT if sload(ownerSlot) { mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`. revert(0x1c, 0x04) } // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } else { /// @solidity memory-safe-assembly assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(_OWNER_SLOT, newOwner) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } } /// @dev Sets the owner directly without authorization guard. function _setOwner(address newOwner) internal virtual { if (_guardInitializeOwner()) { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner)))) } } else { /// @solidity memory-safe-assembly assembly { let ownerSlot := _OWNER_SLOT // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, newOwner) } } } /// @dev Throws if the sender is not the owner. function _checkOwner() internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner, revert. if iszero(eq(caller(), sload(_OWNER_SLOT))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /// @dev Returns how long a two-step ownership handover is valid for in seconds. /// Override to return a different value if needed. /// Made internal to conserve bytecode. Wrap it in a public function if needed. function _ownershipHandoverValidFor() internal view virtual returns (uint64) { return 48 * 3600; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to transfer the ownership to `newOwner`. function transferOwnership(address newOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { if iszero(shl(96, newOwner)) { mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`. revert(0x1c, 0x04) } } _setOwner(newOwner); } /// @dev Allows the owner to renounce their ownership. function renounceOwnership() public payable virtual onlyOwner { _setOwner(address(0)); } /// @dev Request a two-step ownership handover to the caller. /// The request will automatically expire in 48 hours (172800 seconds) by default. function requestOwnershipHandover() public payable virtual { unchecked { uint256 expires = block.timestamp + _ownershipHandoverValidFor(); /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to `expires`. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), expires) // Emit the {OwnershipHandoverRequested} event. log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller()) } } } /// @dev Cancels the two-step ownership handover to the caller, if any. function cancelOwnershipHandover() public payable virtual { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), 0) // Emit the {OwnershipHandoverCanceled} event. log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller()) } } /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`. /// Reverts if there is no existing ownership handover requested by `pendingOwner`. function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) let handoverSlot := keccak256(0x0c, 0x20) // If the handover does not exist, or has expired. if gt(timestamp(), sload(handoverSlot)) { mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`. revert(0x1c, 0x04) } // Set the handover slot to 0. sstore(handoverSlot, 0) } _setOwner(pendingOwner); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the owner of the contract. function owner() public view virtual returns (address result) { /// @solidity memory-safe-assembly assembly { result := sload(_OWNER_SLOT) } } /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`. function ownershipHandoverExpiresAt(address pendingOwner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { // Compute the handover slot. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) // Load the handover slot. result := sload(keccak256(0x0c, 0x20)) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by the owner. modifier onlyOwner() virtual { _checkOwner(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Library to encode strings in Base64. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/Base64.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/Base64.sol) /// @author Modified from (https://github.com/Brechtpd/base64/blob/main/base64.sol) by Brecht Devos - <[email protected]>. library Base64 { /// @dev Encodes `data` using the base64 encoding described in RFC 4648. /// See: https://datatracker.ietf.org/doc/html/rfc4648 /// @param fileSafe Whether to replace '+' with '-' and '/' with '_'. /// @param noPadding Whether to strip away the padding. function encode(bytes memory data, bool fileSafe, bool noPadding) internal pure returns (string memory result) { /// @solidity memory-safe-assembly assembly { let dataLength := mload(data) if dataLength { // Multiply by 4/3 rounded up. // The `shl(2, ...)` is equivalent to multiplying by 4. let encodedLength := shl(2, div(add(dataLength, 2), 3)) // Set `result` to point to the start of the free memory. result := mload(0x40) // Store the table into the scratch space. // Offsetted by -1 byte so that the `mload` will load the character. // We will rewrite the free memory pointer at `0x40` later with // the allocated size. // The magic constant 0x0670 will turn "-_" into "+/". mstore(0x1f, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef") mstore(0x3f, xor("ghijklmnopqrstuvwxyz0123456789-_", mul(iszero(fileSafe), 0x0670))) // Skip the first slot, which stores the length. let ptr := add(result, 0x20) let end := add(ptr, encodedLength) let dataEnd := add(add(0x20, data), dataLength) let dataEndValue := mload(dataEnd) // Cache the value at the `dataEnd` slot. mstore(dataEnd, 0x00) // Zeroize the `dataEnd` slot to clear dirty bits. // Run over the input, 3 bytes at a time. for {} 1 {} { data := add(data, 3) // Advance 3 bytes. let input := mload(data) // Write 4 bytes. Optimized for fewer stack operations. mstore8(0, mload(and(shr(18, input), 0x3F))) mstore8(1, mload(and(shr(12, input), 0x3F))) mstore8(2, mload(and(shr(6, input), 0x3F))) mstore8(3, mload(and(input, 0x3F))) mstore(ptr, mload(0x00)) ptr := add(ptr, 4) // Advance 4 bytes. if iszero(lt(ptr, end)) { break } } mstore(dataEnd, dataEndValue) // Restore the cached value at `dataEnd`. mstore(0x40, add(end, 0x20)) // Allocate the memory. // Equivalent to `o = [0, 2, 1][dataLength % 3]`. let o := div(2, mod(dataLength, 3)) // Offset `ptr` and pad with '='. We can simply write over the end. mstore(sub(ptr, o), shl(240, 0x3d3d)) // Set `o` to zero if there is padding. o := mul(iszero(iszero(noPadding)), o) mstore(sub(ptr, o), 0) // Zeroize the slot after the string. mstore(result, sub(encodedLength, o)) // Store the length. } } } /// @dev Encodes `data` using the base64 encoding described in RFC 4648. /// Equivalent to `encode(data, false, false)`. function encode(bytes memory data) internal pure returns (string memory result) { result = encode(data, false, false); } /// @dev Encodes `data` using the base64 encoding described in RFC 4648. /// Equivalent to `encode(data, fileSafe, false)`. function encode(bytes memory data, bool fileSafe) internal pure returns (string memory result) { result = encode(data, fileSafe, false); } /// @dev Decodes base64 encoded `data`. /// /// Supports: /// - RFC 4648 (both standard and file-safe mode). /// - RFC 3501 (63: ','). /// /// Does not support: /// - Line breaks. /// /// Note: For performance reasons, /// this function will NOT revert on invalid `data` inputs. /// Outputs for invalid inputs will simply be undefined behaviour. /// It is the user's responsibility to ensure that the `data` /// is a valid base64 encoded string. function decode(string memory data) internal pure returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { let dataLength := mload(data) if dataLength { let decodedLength := mul(shr(2, dataLength), 3) for {} 1 {} { // If padded. if iszero(and(dataLength, 3)) { let t := xor(mload(add(data, dataLength)), 0x3d3d) // forgefmt: disable-next-item decodedLength := sub( decodedLength, add(iszero(byte(30, t)), iszero(byte(31, t))) ) break } // If non-padded. decodedLength := add(decodedLength, sub(and(dataLength, 3), 1)) break } result := mload(0x40) // Write the length of the bytes. mstore(result, decodedLength) // Skip the first slot, which stores the length. let ptr := add(result, 0x20) let end := add(ptr, decodedLength) // Load the table into the scratch space. // Constants are optimized for smaller bytecode with zero gas overhead. // `m` also doubles as the mask of the upper 6 bits. let m := 0xfc000000fc00686c7074787c8084888c9094989ca0a4a8acb0b4b8bcc0c4c8cc mstore(0x5b, m) mstore(0x3b, 0x04080c1014181c2024282c3034383c4044484c5054585c6064) mstore(0x1a, 0xf8fcf800fcd0d4d8dce0e4e8ecf0f4) for {} 1 {} { // Read 4 bytes. data := add(data, 4) let input := mload(data) // Write 3 bytes. // forgefmt: disable-next-item mstore(ptr, or( and(m, mload(byte(28, input))), shr(6, or( and(m, mload(byte(29, input))), shr(6, or( and(m, mload(byte(30, input))), shr(6, mload(byte(31, input))) )) )) )) ptr := add(ptr, 3) if iszero(lt(ptr, end)) { break } } mstore(0x40, add(end, 0x20)) // Allocate the memory. mstore(end, 0) // Zeroize the slot after the bytes. mstore(0x60, 0) // Restore the zero slot. } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple ERC2981 NFT Royalty Standard implementation. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC2981.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/common/ERC2981.sol) abstract contract ERC2981 { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The royalty fee numerator exceeds the fee denominator. error RoyaltyOverflow(); /// @dev The royalty receiver cannot be the zero address. error RoyaltyReceiverIsZeroAddress(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The default royalty info is given by: /// ``` /// let packed := sload(_ERC2981_MASTER_SLOT_SEED) /// let receiver := shr(96, packed) /// let royaltyFraction := xor(packed, shl(96, receiver)) /// ``` /// /// The per token royalty info is given by. /// ``` /// mstore(0x00, tokenId) /// mstore(0x20, _ERC2981_MASTER_SLOT_SEED) /// let packed := sload(keccak256(0x00, 0x40)) /// let receiver := shr(96, packed) /// let royaltyFraction := xor(packed, shl(96, receiver)) /// ``` uint256 private constant _ERC2981_MASTER_SLOT_SEED = 0xaa4ec00224afccfdb7; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC2981 */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Checks that `_feeDenominator` is non-zero. constructor() { require(_feeDenominator() != 0, "Fee denominator cannot be zero."); } /// @dev Returns the denominator for the royalty amount. /// Defaults to 10000, which represents fees in basis points. /// Override this function to return a custom amount if needed. function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /// @dev Returns true if this contract implements the interface defined by `interfaceId`. /// See: https://eips.ethereum.org/EIPS/eip-165 /// This function call must use less than 30000 gas. function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { let s := shr(224, interfaceId) // ERC165: 0x01ffc9a7, ERC2981: 0x2a55205a. result := or(eq(s, 0x01ffc9a7), eq(s, 0x2a55205a)) } } /// @dev Returns the `receiver` and `royaltyAmount` for `tokenId` sold at `salePrice`. function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address receiver, uint256 royaltyAmount) { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) let packed := sload(keccak256(0x00, 0x40)) receiver := shr(96, packed) if iszero(receiver) { packed := sload(mload(0x20)) receiver := shr(96, packed) } let x := salePrice let y := xor(packed, shl(96, receiver)) // `feeNumerator`. // Overflow check, equivalent to `require(y == 0 || x <= type(uint256).max / y)`. // Out-of-gas revert. Should not be triggered in practice, but included for safety. returndatacopy(returndatasize(), returndatasize(), mul(y, gt(x, div(not(0), y)))) royaltyAmount := div(mul(x, y), feeDenominator) } } /// @dev Sets the default royalty `receiver` and `feeNumerator`. /// /// Requirements: /// - `receiver` must not be the zero address. /// - `feeNumerator` must not be greater than the fee denominator. function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { feeNumerator := shr(160, shl(160, feeNumerator)) if gt(feeNumerator, feeDenominator) { mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`. revert(0x1c, 0x04) } let packed := shl(96, receiver) if iszero(packed) { mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`. revert(0x1c, 0x04) } sstore(_ERC2981_MASTER_SLOT_SEED, or(packed, feeNumerator)) } } /// @dev Sets the default royalty `receiver` and `feeNumerator` to zero. function _deleteDefaultRoyalty() internal virtual { /// @solidity memory-safe-assembly assembly { sstore(_ERC2981_MASTER_SLOT_SEED, 0) } } /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId`. /// /// Requirements: /// - `receiver` must not be the zero address. /// - `feeNumerator` must not be greater than the fee denominator. function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { feeNumerator := shr(160, shl(160, feeNumerator)) if gt(feeNumerator, feeDenominator) { mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`. revert(0x1c, 0x04) } let packed := shl(96, receiver) if iszero(packed) { mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`. revert(0x1c, 0x04) } mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) sstore(keccak256(0x00, 0x40), or(packed, feeNumerator)) } } /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId` to zero. function _resetTokenRoyalty(uint256 tokenId) internal virtual { /// @solidity memory-safe-assembly assembly { mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) sstore(keccak256(0x00, 0x40), 0) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {SingleUseETHVault} from "./SingleUseETHVault.sol"; /// @notice Library for force safe transferring ETH and ERC20s in ZKsync. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ext/zksync/SafeTransferLib.sol) library SafeTransferLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev A single use ETH vault has been created for `to`, with `amount`. event SingleUseETHVaultCreated(address indexed to, uint256 amount, address vault); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ETH transfer has failed. error ETHTransferFailed(); /// @dev The ERC20 `transferFrom` has failed. error TransferFromFailed(); /// @dev The ERC20 `transfer` has failed. error TransferFailed(); /// @dev The ERC20 `approve` has failed. error ApproveFailed(); /// @dev The ERC20 `totalSupply` query has failed. error TotalSupplyQueryFailed(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Suggested gas stipend for contract receiving ETH to perform a few /// storage reads and writes, but low enough to prevent griefing. uint256 internal constant GAS_STIPEND_NO_GRIEF = 1000000; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ETH OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // If the ETH transfer MUST succeed with a reasonable gas budget, use the force variants. // // The regular variants: // - Forwards all remaining gas to the target. // - Reverts if the target reverts. // - Reverts if the current contract has insufficient balance. // // The force variants: // - Forwards with an optional gas stipend // (defaults to `GAS_STIPEND_NO_GRIEF`, which is sufficient for most cases). // - If the target reverts, or if the gas stipend is exhausted, // creates a temporary contract to force send the ETH via `SELFDESTRUCT`. // Future compatible with `SENDALL`: https://eips.ethereum.org/EIPS/eip-4758. // - Reverts if the current contract has insufficient balance. // // The try variants: // - Forwards with a mandatory gas stipend. // - Instead of reverting, returns whether the transfer succeeded. /// @dev Sends `amount` (in wei) ETH to `to`. function safeTransferETH(address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { if iszero(call(gas(), to, amount, 0x00, 0x00, 0x00, 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Sends all the ETH in the current contract to `to`. function safeTransferAllETH(address to) internal { /// @solidity memory-safe-assembly assembly { // Transfer all the ETH and check if it succeeded or not. if iszero(call(gas(), to, selfbalance(), 0x00, 0x00, 0x00, 0x00)) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } } } /// @dev Force sends `amount` (in wei) ETH to `to`, with a `gasStipend`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal returns (address vault) { if (amount == uint256(0)) return address(0); // Early return if `amount` is zero. uint256 selfBalanceBefore = address(this).balance; /// @solidity memory-safe-assembly assembly { if lt(selfBalanceBefore, amount) { mstore(0x00, 0xb12d13eb) // `ETHTransferFailed()`. revert(0x1c, 0x04) } pop(call(gasStipend, to, amount, 0x00, 0x00, 0x00, 0x00)) } if (address(this).balance == selfBalanceBefore) { vault = address(new SingleUseETHVault()); /// @solidity memory-safe-assembly assembly { mstore(0x00, shr(96, shl(96, to))) if iszero(call(gas(), vault, amount, 0x00, 0x20, 0x00, 0x00)) { revert(0x00, 0x00) } } emit SingleUseETHVaultCreated(to, amount, vault); } } /// @dev Force sends all the ETH in the current contract to `to`, with a `gasStipend`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferAllETH(address to, uint256 gasStipend) internal returns (address vault) { vault = forceSafeTransferETH(to, address(this).balance, gasStipend); } /// @dev Force sends `amount` (in wei) ETH to `to`, with `GAS_STIPEND_NO_GRIEF`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferETH(address to, uint256 amount) internal returns (address vault) { vault = forceSafeTransferETH(to, amount, GAS_STIPEND_NO_GRIEF); } /// @dev Force sends all the ETH in the current contract to `to`, with `GAS_STIPEND_NO_GRIEF`. /// If force transfer is used, returns the vault. Else returns `address(0)`. function forceSafeTransferAllETH(address to) internal returns (address vault) { vault = forceSafeTransferETH(to, address(this).balance, GAS_STIPEND_NO_GRIEF); } /// @dev Sends `amount` (in wei) ETH to `to`, with a `gasStipend`. function trySafeTransferETH(address to, uint256 amount, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, amount, 0x00, 0x00, 0x00, 0x00) } } /// @dev Sends all the ETH in the current contract to `to`, with a `gasStipend`. function trySafeTransferAllETH(address to, uint256 gasStipend) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { success := call(gasStipend, to, selfbalance(), 0x00, 0x00, 0x00, 0x00) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC20 OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Sends `amount` of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have at least `amount` approved for /// the current contract to manage. function safeTransferFrom(address token, address from, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x60, amount) // Store the `amount` argument. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x23b872dd000000000000000000000000) // `transferFrom(address,address,uint256)`. let success := call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends `amount` of ERC20 `token` from `from` to `to`. /// /// The `from` account must have at least `amount` approved for the current contract to manage. function trySafeTransferFrom(address token, address from, address to, uint256 amount) internal returns (bool success) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x60, amount) // Store the `amount` argument. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x23b872dd000000000000000000000000) // `transferFrom(address,address,uint256)`. success := call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { success := lt(or(iszero(extcodesize(token)), returndatasize()), success) } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends all of ERC20 `token` from `from` to `to`. /// Reverts upon failure. /// /// The `from` account must have their entire balance approved for the current contract to manage. function safeTransferAllFrom(address token, address from, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) // Cache the free memory pointer. mstore(0x40, to) // Store the `to` argument. mstore(0x2c, shl(96, from)) // Store the `from` argument. mstore(0x0c, 0x70a08231000000000000000000000000) // `balanceOf(address)`. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x60, 0x20) ) ) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } mstore(0x00, 0x23b872dd) // `transferFrom(address,address,uint256)`. amount := mload(0x60) // The `amount` is already at 0x60. We'll need to return it. // Perform the transfer, reverting upon failure. let success := call(gas(), token, 0, 0x1c, 0x64, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x7939f424) // `TransferFromFailed()`. revert(0x1c, 0x04) } } mstore(0x60, 0) // Restore the zero slot to zero. mstore(0x40, m) // Restore the free memory pointer. } } /// @dev Sends `amount` of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransfer(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sends all of ERC20 `token` from the current contract to `to`. /// Reverts upon failure. function safeTransferAll(address token, address to) internal returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x70a08231) // Store the function selector of `balanceOf(address)`. mstore(0x20, address()) // Store the address of the current contract. // Read the balance, reverting upon failure. if iszero( and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x1c, 0x24, 0x34, 0x20) ) ) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } mstore(0x14, to) // Store the `to` argument. amount := mload(0x34) // The `amount` is already at 0x34. We'll need to return it. mstore(0x00, 0xa9059cbb000000000000000000000000) // `transfer(address,uint256)`. // Perform the transfer, reverting upon failure. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x90b8ec18) // `TransferFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// Reverts upon failure. function safeApprove(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Sets `amount` of ERC20 `token` for `to` to manage on behalf of the current contract. /// If the initial attempt to approve fails, attempts to reset the approved amount to zero, /// then retries the approval again (some tokens, e.g. USDT, requires this). /// Reverts upon failure. function safeApproveWithRetry(address token, address to, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { mstore(0x14, to) // Store the `to` argument. mstore(0x34, amount) // Store the `amount` argument. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. // Perform the approval, retrying upon failure. let success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x34, 0) // Store 0 for the `amount`. mstore(0x00, 0x095ea7b3000000000000000000000000) // `approve(address,uint256)`. pop(call(gas(), token, 0, 0x10, 0x44, 0x00, 0x00)) // Reset the approval. mstore(0x34, amount) // Store back the original `amount`. // Retry the approval, reverting upon failure. success := call(gas(), token, 0, 0x10, 0x44, 0x00, 0x20) if iszero(and(eq(mload(0x00), 1), success)) { // Check the `extcodesize` again just in case the token selfdestructs lol. if iszero(lt(or(iszero(extcodesize(token)), returndatasize()), success)) { mstore(0x00, 0x3e3f8f73) // `ApproveFailed()`. revert(0x1c, 0x04) } } } } mstore(0x34, 0) // Restore the part of the free memory pointer that was overwritten. } } /// @dev Returns the amount of ERC20 `token` owned by `account`. /// Returns zero if the `token` does not exist. function balanceOf(address token, address account) internal view returns (uint256 amount) { /// @solidity memory-safe-assembly assembly { mstore(0x14, account) // Store the `account` argument. mstore(0x00, 0x70a08231000000000000000000000000) // `balanceOf(address)`. amount := mul( // The arguments of `mul` are evaluated from right to left. mload(0x20), and( // The arguments of `and` are evaluated from right to left. gt(returndatasize(), 0x1f), // At least 32 bytes returned. staticcall(gas(), token, 0x10, 0x24, 0x20, 0x20) ) ) } } /// @dev Returns the total supply of the `token`. /// Reverts if the token does not exist or does not implement `totalSupply()`. function totalSupply(address token) internal view returns (uint256 result) { /// @solidity memory-safe-assembly assembly { mstore(0x00, 0x18160ddd) // `totalSupply()`. if iszero( and(gt(returndatasize(), 0x1f), staticcall(gas(), token, 0x1c, 0x04, 0x00, 0x20)) ) { mstore(0x00, 0x54cd9435) // `TotalSupplyQueryFailed()`. revert(0x1c, 0x04) } result := mload(0x00) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Signature verification helper that supports both ECDSA signatures from EOAs /// and ERC1271 signatures from smart contract wallets like Argent and Gnosis safe. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ext/zksync/SignatureCheckerLib.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/SignatureChecker.sol) /// /// @dev Note: /// - The signature checking functions use the ecrecover precompile (0x1). /// - Unlike ECDSA signatures, contract signatures are revocable. /// - As of Solady version 0.0.134, all `bytes signature` variants accept both /// regular 65-byte `(r, s, v)` and EIP-2098 `(r, vs)` short form signatures. /// See: https://eips.ethereum.org/EIPS/eip-2098 /// This is for calldata efficiency on smart accounts prevalent on L2s. /// /// WARNING! Do NOT use signatures as unique identifiers: /// - Use a nonce in the digest to prevent replay attacks on the same contract. /// - Use EIP-712 for the digest to prevent replay attacks across different chains and contracts. /// EIP-712 also enables readable signing of typed data for better user safety. /// This implementation does NOT check if a signature is non-malleable. library SignatureCheckerLib { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* SIGNATURE CHECKING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns whether `signature` is valid for `signer` and `hash`. /// If `signer.code.length == 0`, then validate with `ecrecover`, else /// it will validate with ERC1271 on `signer`. function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool isValid) { if (signer == address(0)) return isValid; /// @solidity memory-safe-assembly assembly { function copy(dst_, src_, n_) { for { let i_ := 0 } lt(i_, n_) { i_ := add(0x20, i_) } { mstore(add(dst_, i_), mload(add(src_, i_))) } } let m := mload(0x40) for {} 1 {} { if iszero(extcodesize(signer)) { switch mload(signature) case 64 { let vs := mload(add(signature, 0x40)) mstore(0x20, add(shr(255, vs), 27)) // `v`. mstore(0x60, shr(1, shl(1, vs))) // `s`. } case 65 { mstore(0x20, byte(0, mload(add(signature, 0x60)))) // `v`. mstore(0x60, mload(add(signature, 0x40))) // `s`. } default { break } mstore(0x00, hash) mstore(0x40, mload(add(signature, 0x20))) // `r`. let recovered := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20)) isValid := gt(returndatasize(), shl(96, xor(signer, recovered))) mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. break } let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. // Copy the `signature` over. let n := add(0x20, mload(signature)) copy(add(m, 0x44), signature, n) isValid := staticcall(gas(), signer, m, add(n, 0x44), d, 0x20) isValid := and(eq(mload(d), f), isValid) break } } } /// @dev Returns whether `signature` is valid for `signer` and `hash`. /// If `signer.code.length == 0`, then validate with `ecrecover`, else /// it will validate with ERC1271 on `signer`. function isValidSignatureNowCalldata(address signer, bytes32 hash, bytes calldata signature) internal view returns (bool isValid) { if (signer == address(0)) return isValid; /// @solidity memory-safe-assembly assembly { let m := mload(0x40) for {} 1 {} { if iszero(extcodesize(signer)) { switch signature.length case 64 { let vs := calldataload(add(signature.offset, 0x20)) mstore(0x20, add(shr(255, vs), 27)) // `v`. mstore(0x40, calldataload(signature.offset)) // `r`. mstore(0x60, shr(1, shl(1, vs))) // `s`. } case 65 { mstore(0x20, byte(0, calldataload(add(signature.offset, 0x40)))) // `v`. calldatacopy(0x40, signature.offset, 0x40) // `r`, `s`. } default { break } mstore(0x00, hash) let recovered := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20)) isValid := gt(returndatasize(), shl(96, xor(signer, recovered))) mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. break } let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. mstore(add(m, 0x44), signature.length) // Copy the `signature` over. calldatacopy(add(m, 0x64), signature.offset, signature.length) isValid := staticcall(gas(), signer, m, add(signature.length, 0x64), d, 0x20) isValid := and(eq(mload(d), f), isValid) break } } } /// @dev Returns whether the signature (`r`, `vs`) is valid for `signer` and `hash`. /// If `signer.code.length == 0`, then validate with `ecrecover`, else /// it will validate with ERC1271 on `signer`. function isValidSignatureNow(address signer, bytes32 hash, bytes32 r, bytes32 vs) internal view returns (bool isValid) { if (signer == address(0)) return isValid; /// @solidity memory-safe-assembly assembly { let m := mload(0x40) for {} 1 {} { if iszero(extcodesize(signer)) { mstore(0x00, hash) mstore(0x20, add(shr(255, vs), 27)) // `v`. mstore(0x40, r) // `r`. mstore(0x60, shr(1, shl(1, vs))) // `s`. let recovered := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20)) isValid := gt(returndatasize(), shl(96, xor(signer, recovered))) mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. break } let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. mstore(add(m, 0x44), 65) // Length of the signature. mstore(add(m, 0x64), r) // `r`. mstore(add(m, 0x84), shr(1, shl(1, vs))) // `s`. mstore8(add(m, 0xa4), add(shr(255, vs), 27)) // `v`. isValid := staticcall(gas(), signer, m, 0xa5, d, 0x20) isValid := and(eq(mload(d), f), isValid) break } } } /// @dev Returns whether the signature (`v`, `r`, `s`) is valid for `signer` and `hash`. /// If `signer.code.length == 0`, then validate with `ecrecover`, else /// it will validate with ERC1271 on `signer`. function isValidSignatureNow(address signer, bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal view returns (bool isValid) { if (signer == address(0)) return isValid; /// @solidity memory-safe-assembly assembly { let m := mload(0x40) for {} 1 {} { if iszero(extcodesize(signer)) { mstore(0x00, hash) mstore(0x20, and(v, 0xff)) // `v`. mstore(0x40, r) // `r`. mstore(0x60, s) // `s`. let recovered := mload(staticcall(gas(), 1, 0x00, 0x80, 0x01, 0x20)) isValid := gt(returndatasize(), shl(96, xor(signer, recovered))) mstore(0x60, 0) // Restore the zero slot. mstore(0x40, m) // Restore the free memory pointer. break } let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. mstore(add(m, 0x44), 65) // Length of the signature. mstore(add(m, 0x64), r) // `r`. mstore(add(m, 0x84), s) // `s`. mstore8(add(m, 0xa4), v) // `v`. isValid := staticcall(gas(), signer, m, 0xa5, d, 0x20) isValid := and(eq(mload(d), f), isValid) break } } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC1271 OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // Note: These ERC1271 operations do NOT have an ECDSA fallback. /// @dev Returns whether `signature` is valid for `hash` for an ERC1271 `signer` contract. function isValidERC1271SignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool isValid) { /// @solidity memory-safe-assembly assembly { function copy(dst_, src_, n_) { for { let i_ := 0 } lt(i_, n_) { i_ := add(0x20, i_) } { mstore(add(dst_, i_), mload(add(src_, i_))) } } let m := mload(0x40) let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. // Copy the `signature` over. let n := add(0x20, mload(signature)) copy(add(m, 0x44), signature, n) isValid := staticcall(gas(), signer, m, add(n, 0x44), d, 0x20) isValid := and(eq(mload(d), f), isValid) } } /// @dev Returns whether `signature` is valid for `hash` for an ERC1271 `signer` contract. function isValidERC1271SignatureNowCalldata( address signer, bytes32 hash, bytes calldata signature ) internal view returns (bool isValid) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. mstore(add(m, 0x44), signature.length) // Copy the `signature` over. calldatacopy(add(m, 0x64), signature.offset, signature.length) isValid := staticcall(gas(), signer, m, add(signature.length, 0x64), d, 0x20) isValid := and(eq(mload(d), f), isValid) } } /// @dev Returns whether the signature (`r`, `vs`) is valid for `hash` /// for an ERC1271 `signer` contract. function isValidERC1271SignatureNow(address signer, bytes32 hash, bytes32 r, bytes32 vs) internal view returns (bool isValid) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. mstore(add(m, 0x44), 65) // Length of the signature. mstore(add(m, 0x64), r) // `r`. mstore(add(m, 0x84), shr(1, shl(1, vs))) // `s`. mstore8(add(m, 0xa4), add(shr(255, vs), 27)) // `v`. isValid := staticcall(gas(), signer, m, 0xa5, d, 0x20) isValid := and(eq(mload(d), f), isValid) } } /// @dev Returns whether the signature (`v`, `r`, `s`) is valid for `hash` /// for an ERC1271 `signer` contract. function isValidERC1271SignatureNow(address signer, bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal view returns (bool isValid) { /// @solidity memory-safe-assembly assembly { let m := mload(0x40) let f := shl(224, 0x1626ba7e) mstore(m, f) // `bytes4(keccak256("isValidSignature(bytes32,bytes)"))`. mstore(add(m, 0x04), hash) let d := add(m, 0x24) mstore(d, 0x40) // The offset of the `signature` in the calldata. mstore(add(m, 0x44), 65) // Length of the signature. mstore(add(m, 0x64), r) // `r`. mstore(add(m, 0x84), s) // `s`. mstore8(add(m, 0xa4), v) // `v`. isValid := staticcall(gas(), signer, m, 0xa5, d, 0x20) isValid := and(eq(mload(d), f), isValid) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* HASHING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns an Ethereum Signed Message, created from a `hash`. /// This produces a hash corresponding to the one signed with the /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign) /// JSON-RPC method as part of EIP-191. function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { mstore(0x20, hash) // Store into scratch space for keccak256. mstore(0x00, "\x00\x00\x00\x00\x19Ethereum Signed Message:\n32") // 28 bytes. result := keccak256(0x04, 0x3c) // `32 * 2 - (32 - 28) = 60 = 0x3c`. } } /// @dev Returns an Ethereum Signed Message, created from `s`. /// This produces a hash corresponding to the one signed with the /// [`eth_sign`](https://eth.wiki/json-rpc/API#eth_sign) /// JSON-RPC method as part of EIP-191. /// Note: Supports lengths of `s` up to 999999 bytes. function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { let sLength := mload(s) let o := 0x20 mstore(o, "\x19Ethereum Signed Message:\n") // 26 bytes, zero-right-padded. mstore(0x00, 0x00) // Convert the `s.length` to ASCII decimal representation: `base10(s.length)`. for { let temp := sLength } 1 {} { o := sub(o, 1) mstore8(o, add(48, mod(temp, 10))) temp := div(temp, 10) if iszero(temp) { break } } let n := sub(0x3a, o) // Header length: `26 + 32 - o`. // Throw an out-of-offset error (consumes all gas) if the header exceeds 32 bytes. returndatacopy(returndatasize(), returndatasize(), gt(n, 0x20)) mstore(s, or(mload(0x00), mload(n))) // Temporarily store the header. result := keccak256(add(s, sub(0x20, n)), add(n, sLength)) mstore(s, sLength) // Restore the length. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EMPTY CALLDATA HELPERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns an empty calldata bytes. function emptySignature() internal pure returns (bytes calldata signature) { /// @solidity memory-safe-assembly assembly { signature.length := 0 } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); /** * `_sequentialUpTo()` must be greater than `_startTokenId()`. */ error SequentialUpToTooSmall(); /** * The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`. */ error SequentialMintExceedsLimit(); /** * Spot minting requires a `tokenId` greater than `_sequentialUpTo()`. */ error SpotMintTokenIdTooSmall(); /** * Cannot mint over a token that already exists. */ error TokenAlreadyExists(); /** * The feature is not compatible with spot mints. */ error NotCompatibleWithSpotMints(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Library for byte related operations. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibBytes.sol) library LibBytes { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STRUCTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Goated bytes storage struct that totally MOGs, no cap, fr. /// Uses less gas and bytecode than Solidity's native bytes storage. It's meta af. /// Packs length with the first 31 bytes if <255 bytes, so it’s mad tight. struct BytesStorage { bytes32 _spacer; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The constant returned when the `search` is not found in the bytes. uint256 internal constant NOT_FOUND = type(uint256).max; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* BYTE STORAGE OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Sets the value of the bytes storage `$` to `s`. function set(BytesStorage storage $, bytes memory s) internal { /// @solidity memory-safe-assembly assembly { let n := mload(s) let packed := or(0xff, shl(8, n)) for { let i := 0 } 1 {} { if iszero(gt(n, 0xfe)) { i := 0x1f packed := or(n, shl(8, mload(add(s, i)))) if iszero(gt(n, i)) { break } } let o := add(s, 0x20) mstore(0x00, $.slot) for { let p := keccak256(0x00, 0x20) } 1 {} { sstore(add(p, shr(5, i)), mload(add(o, i))) i := add(i, 0x20) if iszero(lt(i, n)) { break } } break } sstore($.slot, packed) } } /// @dev Sets the value of the bytes storage `$` to `s`. function setCalldata(BytesStorage storage $, bytes calldata s) internal { /// @solidity memory-safe-assembly assembly { let packed := or(0xff, shl(8, s.length)) for { let i := 0 } 1 {} { if iszero(gt(s.length, 0xfe)) { i := 0x1f packed := or(s.length, shl(8, shr(8, calldataload(s.offset)))) if iszero(gt(s.length, i)) { break } } mstore(0x00, $.slot) for { let p := keccak256(0x00, 0x20) } 1 {} { sstore(add(p, shr(5, i)), calldataload(add(s.offset, i))) i := add(i, 0x20) if iszero(lt(i, s.length)) { break } } break } sstore($.slot, packed) } } /// @dev Sets the value of the bytes storage `$` to the empty bytes. function clear(BytesStorage storage $) internal { delete $._spacer; } /// @dev Returns whether the value stored is `$` is the empty bytes "". function isEmpty(BytesStorage storage $) internal view returns (bool) { return uint256($._spacer) & 0xff == uint256(0); } /// @dev Returns the length of the value stored in `$`. function length(BytesStorage storage $) internal view returns (uint256 result) { result = uint256($._spacer); /// @solidity memory-safe-assembly assembly { let n := and(0xff, result) result := or(mul(shr(8, result), eq(0xff, n)), mul(n, iszero(eq(0xff, n)))) } } /// @dev Returns the value stored in `$`. function get(BytesStorage storage $) internal view returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) let o := add(result, 0x20) let packed := sload($.slot) let n := shr(8, packed) for { let i := 0 } 1 {} { if iszero(eq(or(packed, 0xff), packed)) { mstore(o, packed) n := and(0xff, packed) i := 0x1f if iszero(gt(n, i)) { break } } mstore(0x00, $.slot) for { let p := keccak256(0x00, 0x20) } 1 {} { mstore(add(o, i), sload(add(p, shr(5, i)))) i := add(i, 0x20) if iszero(lt(i, n)) { break } } break } mstore(result, n) // Store the length of the memory. mstore(add(o, n), 0) // Zeroize the slot after the bytes. mstore(0x40, add(add(o, n), 0x20)) // Allocate memory. } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* BYTES OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns `subject` all occurrences of `needle` replaced with `replacement`. function replace(bytes memory subject, bytes memory needle, bytes memory replacement) internal pure returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) let needleLen := mload(needle) let replacementLen := mload(replacement) let d := sub(result, subject) // Memory difference. let i := add(subject, 0x20) // Subject bytes pointer. mstore(0x00, add(i, mload(subject))) // End of subject. if iszero(gt(needleLen, mload(subject))) { let subjectSearchEnd := add(sub(mload(0x00), needleLen), 1) let h := 0 // The hash of `needle`. if iszero(lt(needleLen, 0x20)) { h := keccak256(add(needle, 0x20), needleLen) } let s := mload(add(needle, 0x20)) for { let m := shl(3, sub(0x20, and(needleLen, 0x1f))) } 1 {} { let t := mload(i) // Whether the first `needleLen % 32` bytes of `subject` and `needle` matches. if iszero(shr(m, xor(t, s))) { if h { if iszero(eq(keccak256(i, needleLen), h)) { mstore(add(i, d), t) i := add(i, 1) if iszero(lt(i, subjectSearchEnd)) { break } continue } } // Copy the `replacement` one word at a time. for { let j := 0 } 1 {} { mstore(add(add(i, d), j), mload(add(add(replacement, 0x20), j))) j := add(j, 0x20) if iszero(lt(j, replacementLen)) { break } } d := sub(add(d, replacementLen), needleLen) if needleLen { i := add(i, needleLen) if iszero(lt(i, subjectSearchEnd)) { break } continue } } mstore(add(i, d), t) i := add(i, 1) if iszero(lt(i, subjectSearchEnd)) { break } } } let end := mload(0x00) let n := add(sub(d, add(result, 0x20)), end) // Copy the rest of the bytes one word at a time. for {} lt(i, end) { i := add(i, 0x20) } { mstore(add(i, d), mload(i)) } let o := add(i, d) mstore(o, 0) // Zeroize the slot after the bytes. mstore(0x40, add(o, 0x20)) // Allocate memory. mstore(result, n) // Store the length. } } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from left to right, starting from `from`. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function indexOf(bytes memory subject, bytes memory needle, uint256 from) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { result := not(0) // Initialize to `NOT_FOUND`. for { let subjectLen := mload(subject) } 1 {} { if iszero(mload(needle)) { result := from if iszero(gt(from, subjectLen)) { break } result := subjectLen break } let needleLen := mload(needle) let subjectStart := add(subject, 0x20) subject := add(subjectStart, from) let end := add(sub(add(subjectStart, subjectLen), needleLen), 1) let m := shl(3, sub(0x20, and(needleLen, 0x1f))) let s := mload(add(needle, 0x20)) if iszero(and(lt(subject, end), lt(from, subjectLen))) { break } if iszero(lt(needleLen, 0x20)) { for { let h := keccak256(add(needle, 0x20), needleLen) } 1 {} { if iszero(shr(m, xor(mload(subject), s))) { if eq(keccak256(subject, needleLen), h) { result := sub(subject, subjectStart) break } } subject := add(subject, 1) if iszero(lt(subject, end)) { break } } break } for {} 1 {} { if iszero(shr(m, xor(mload(subject), s))) { result := sub(subject, subjectStart) break } subject := add(subject, 1) if iszero(lt(subject, end)) { break } } break } } } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from left to right. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function indexOf(bytes memory subject, bytes memory needle) internal pure returns (uint256) { return indexOf(subject, needle, 0); } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from right to left, starting from `from`. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function lastIndexOf(bytes memory subject, bytes memory needle, uint256 from) internal pure returns (uint256 result) { /// @solidity memory-safe-assembly assembly { for {} 1 {} { result := not(0) // Initialize to `NOT_FOUND`. let needleLen := mload(needle) if gt(needleLen, mload(subject)) { break } let w := result let fromMax := sub(mload(subject), needleLen) if iszero(gt(fromMax, from)) { from := fromMax } let end := add(add(subject, 0x20), w) subject := add(add(subject, 0x20), from) if iszero(gt(subject, end)) { break } // As this function is not too often used, // we shall simply use keccak256 for smaller bytecode size. for { let h := keccak256(add(needle, 0x20), needleLen) } 1 {} { if eq(keccak256(subject, needleLen), h) { result := sub(subject, add(end, 1)) break } subject := add(subject, w) // `sub(subject, 1)`. if iszero(gt(subject, end)) { break } } break } } } /// @dev Returns the byte index of the first location of `needle` in `subject`, /// needleing from right to left. /// Returns `NOT_FOUND` (i.e. `type(uint256).max`) if the `needle` is not found. function lastIndexOf(bytes memory subject, bytes memory needle) internal pure returns (uint256) { return lastIndexOf(subject, needle, type(uint256).max); } /// @dev Returns true if `needle` is found in `subject`, false otherwise. function contains(bytes memory subject, bytes memory needle) internal pure returns (bool) { return indexOf(subject, needle) != NOT_FOUND; } /// @dev Returns whether `subject` starts with `needle`. function startsWith(bytes memory subject, bytes memory needle) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { let n := mload(needle) // Just using keccak256 directly is actually cheaper. let t := eq(keccak256(add(subject, 0x20), n), keccak256(add(needle, 0x20), n)) result := lt(gt(n, mload(subject)), t) } } /// @dev Returns whether `subject` ends with `needle`. function endsWith(bytes memory subject, bytes memory needle) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { let n := mload(needle) let notInRange := gt(n, mload(subject)) // `subject + 0x20 + max(subject.length - needle.length, 0)`. let t := add(add(subject, 0x20), mul(iszero(notInRange), sub(mload(subject), n))) // Just using keccak256 directly is actually cheaper. result := gt(eq(keccak256(t, n), keccak256(add(needle, 0x20), n)), notInRange) } } /// @dev Returns `subject` repeated `times`. function repeat(bytes memory subject, uint256 times) internal pure returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { let l := mload(subject) // Subject length. if iszero(or(iszero(times), iszero(l))) { result := mload(0x40) subject := add(subject, 0x20) let o := add(result, 0x20) for {} 1 {} { // Copy the `subject` one word at a time. for { let j := 0 } 1 {} { mstore(add(o, j), mload(add(subject, j))) j := add(j, 0x20) if iszero(lt(j, l)) { break } } o := add(o, l) times := sub(times, 1) if iszero(times) { break } } mstore(o, 0) // Zeroize the slot after the bytes. mstore(0x40, add(o, 0x20)) // Allocate memory. mstore(result, sub(o, add(result, 0x20))) // Store the length. } } } /// @dev Returns a copy of `subject` sliced from `start` to `end` (exclusive). /// `start` and `end` are byte offsets. function slice(bytes memory subject, uint256 start, uint256 end) internal pure returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { let l := mload(subject) // Subject length. if iszero(gt(l, end)) { end := l } if iszero(gt(l, start)) { start := l } if lt(start, end) { result := mload(0x40) let n := sub(end, start) let i := add(subject, start) let w := not(0x1f) // Copy the `subject` one word at a time, backwards. for { let j := and(add(n, 0x1f), w) } 1 {} { mstore(add(result, j), mload(add(i, j))) j := add(j, w) // `sub(j, 0x20)`. if iszero(j) { break } } let o := add(add(result, 0x20), n) mstore(o, 0) // Zeroize the slot after the bytes. mstore(0x40, add(o, 0x20)) // Allocate memory. mstore(result, n) // Store the length. } } } /// @dev Returns a copy of `subject` sliced from `start` to the end of the bytes. /// `start` is a byte offset. function slice(bytes memory subject, uint256 start) internal pure returns (bytes memory result) { result = slice(subject, start, type(uint256).max); } /// @dev Returns a copy of `subject` sliced from `start` to `end` (exclusive). /// `start` and `end` are byte offsets. Faster than Solidity's native slicing. function sliceCalldata(bytes calldata subject, uint256 start, uint256 end) internal pure returns (bytes calldata result) { /// @solidity memory-safe-assembly assembly { end := xor(end, mul(xor(end, subject.length), lt(subject.length, end))) start := xor(start, mul(xor(start, subject.length), lt(subject.length, start))) result.offset := add(subject.offset, start) result.length := mul(lt(start, end), sub(end, start)) } } /// @dev Returns a copy of `subject` sliced from `start` to the end of the bytes. /// `start` is a byte offset. Faster than Solidity's native slicing. function sliceCalldata(bytes calldata subject, uint256 start) internal pure returns (bytes calldata result) { /// @solidity memory-safe-assembly assembly { start := xor(start, mul(xor(start, subject.length), lt(subject.length, start))) result.offset := add(subject.offset, start) result.length := mul(lt(start, subject.length), sub(subject.length, start)) } } /// @dev Reduces the size of `subject` to `n`. /// If `n` is greater than the size of `subject`, this will be a no-op. function truncate(bytes memory subject, uint256 n) internal pure returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { result := subject mstore(mul(lt(n, mload(result)), result), n) } } /// @dev Returns a copy of `subject`, with the length reduced to `n`. /// If `n` is greater than the size of `subject`, this will be a no-op. function truncatedCalldata(bytes calldata subject, uint256 n) internal pure returns (bytes calldata result) { /// @solidity memory-safe-assembly assembly { result.offset := subject.offset result.length := xor(n, mul(xor(n, subject.length), lt(subject.length, n))) } } /// @dev Returns all the indices of `needle` in `subject`. /// The indices are byte offsets. function indicesOf(bytes memory subject, bytes memory needle) internal pure returns (uint256[] memory result) { /// @solidity memory-safe-assembly assembly { let searchLen := mload(needle) if iszero(gt(searchLen, mload(subject))) { result := mload(0x40) let i := add(subject, 0x20) let o := add(result, 0x20) let subjectSearchEnd := add(sub(add(i, mload(subject)), searchLen), 1) let h := 0 // The hash of `needle`. if iszero(lt(searchLen, 0x20)) { h := keccak256(add(needle, 0x20), searchLen) } let s := mload(add(needle, 0x20)) for { let m := shl(3, sub(0x20, and(searchLen, 0x1f))) } 1 {} { let t := mload(i) // Whether the first `searchLen % 32` bytes of `subject` and `needle` matches. if iszero(shr(m, xor(t, s))) { if h { if iszero(eq(keccak256(i, searchLen), h)) { i := add(i, 1) if iszero(lt(i, subjectSearchEnd)) { break } continue } } mstore(o, sub(i, add(subject, 0x20))) // Append to `result`. o := add(o, 0x20) i := add(i, searchLen) // Advance `i` by `searchLen`. if searchLen { if iszero(lt(i, subjectSearchEnd)) { break } continue } } i := add(i, 1) if iszero(lt(i, subjectSearchEnd)) { break } } mstore(result, shr(5, sub(o, add(result, 0x20)))) // Store the length of `result`. // Allocate memory for result. // We allocate one more word, so this array can be recycled for {split}. mstore(0x40, add(o, 0x20)) } } } /// @dev Returns a arrays of bytess based on the `delimiter` inside of the `subject` bytes. function split(bytes memory subject, bytes memory delimiter) internal pure returns (bytes[] memory result) { uint256[] memory indices = indicesOf(subject, delimiter); /// @solidity memory-safe-assembly assembly { let w := not(0x1f) let indexPtr := add(indices, 0x20) let indicesEnd := add(indexPtr, shl(5, add(mload(indices), 1))) mstore(add(indicesEnd, w), mload(subject)) mstore(indices, add(mload(indices), 1)) for { let prevIndex := 0 } 1 {} { let index := mload(indexPtr) mstore(indexPtr, 0x60) if iszero(eq(index, prevIndex)) { let element := mload(0x40) let l := sub(index, prevIndex) mstore(element, l) // Store the length of the element. // Copy the `subject` one word at a time, backwards. for { let o := and(add(l, 0x1f), w) } 1 {} { mstore(add(element, o), mload(add(add(subject, prevIndex), o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } mstore(add(add(element, 0x20), l), 0) // Zeroize the slot after the bytes. // Allocate memory for the length and the bytes, rounded up to a multiple of 32. mstore(0x40, add(element, and(add(l, 0x3f), w))) mstore(indexPtr, element) // Store the `element` into the array. } prevIndex := add(index, mload(delimiter)) indexPtr := add(indexPtr, 0x20) if iszero(lt(indexPtr, indicesEnd)) { break } } result := indices if iszero(mload(delimiter)) { result := add(indices, 0x20) mstore(result, sub(mload(indices), 2)) } } } /// @dev Returns a concatenated bytes of `a` and `b`. /// Cheaper than `bytes.concat()` and does not de-align the free memory pointer. function concat(bytes memory a, bytes memory b) internal pure returns (bytes memory result) { /// @solidity memory-safe-assembly assembly { result := mload(0x40) let w := not(0x1f) let aLen := mload(a) // Copy `a` one word at a time, backwards. for { let o := and(add(aLen, 0x20), w) } 1 {} { mstore(add(result, o), mload(add(a, o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } let bLen := mload(b) let output := add(result, aLen) // Copy `b` one word at a time, backwards. for { let o := and(add(bLen, 0x20), w) } 1 {} { mstore(add(output, o), mload(add(b, o))) o := add(o, w) // `sub(o, 0x20)`. if iszero(o) { break } } let totalLen := add(aLen, bLen) let last := add(add(result, 0x20), totalLen) mstore(last, 0) // Zeroize the slot after the bytes. mstore(result, totalLen) // Store the length. mstore(0x40, add(last, 0x20)) // Allocate memory. } } /// @dev Returns whether `a` equals `b`. function eq(bytes memory a, bytes memory b) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { result := eq(keccak256(add(a, 0x20), mload(a)), keccak256(add(b, 0x20), mload(b))) } } /// @dev Returns whether `a` equals `b`, where `b` is a null-terminated small bytes. function eqs(bytes memory a, bytes32 b) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { // These should be evaluated on compile time, as far as possible. let m := not(shl(7, div(not(iszero(b)), 255))) // `0x7f7f ...`. let x := not(or(m, or(b, add(m, and(b, m))))) let r := shl(7, iszero(iszero(shr(128, x)))) r := or(r, shl(6, iszero(iszero(shr(64, shr(r, x)))))) r := or(r, shl(5, lt(0xffffffff, shr(r, x)))) r := or(r, shl(4, lt(0xffff, shr(r, x)))) r := or(r, shl(3, lt(0xff, shr(r, x)))) // forgefmt: disable-next-item result := gt(eq(mload(a), add(iszero(x), xor(31, shr(3, r)))), xor(shr(add(8, r), b), shr(add(8, r), mload(add(a, 0x20))))) } } /// @dev Returns 0 if `a == b`, -1 if `a < b`, +1 if `a > b`. /// If `a` == b[:a.length]`, and `a.length < b.length`, returns -1. function cmp(bytes memory a, bytes memory b) internal pure returns (int256 result) { /// @solidity memory-safe-assembly assembly { let aLen := mload(a) let bLen := mload(b) let n := and(xor(aLen, mul(xor(aLen, bLen), lt(bLen, aLen))), not(0x1f)) if n { for { let i := 0x20 } 1 {} { let x := mload(add(a, i)) let y := mload(add(b, i)) if iszero(or(xor(x, y), eq(i, n))) { i := add(i, 0x20) continue } result := sub(gt(x, y), lt(x, y)) break } } // forgefmt: disable-next-item if iszero(result) { let l := 0x201f1e1d1c1b1a191817161514131211100f0e0d0c0b0a090807060504030201 let x := and(mload(add(add(a, 0x20), n)), shl(shl(3, byte(sub(aLen, n), l)), not(0))) let y := and(mload(add(add(b, 0x20), n)), shl(shl(3, byte(sub(bLen, n), l)), not(0))) result := sub(gt(x, y), lt(x, y)) if iszero(result) { result := sub(gt(aLen, bLen), lt(aLen, bLen)) } } } } /// @dev Directly returns `a` without copying. function directReturn(bytes memory a) internal pure { assembly { // Assumes that the bytes does not start from the scratch space. let retStart := sub(a, 0x20) let retUnpaddedSize := add(mload(a), 0x40) // Right pad with zeroes. Just in case the bytes is produced // by a method that doesn't zero right pad. mstore(add(retStart, retUnpaddedSize), 0) mstore(retStart, 0x20) // Store the return offset. // End the transaction, returning the bytes. return(retStart, and(not(0x1f), add(0x1f, retUnpaddedSize))) } } /// @dev Directly returns `a` with minimal copying. function directReturn(bytes[] memory a) internal pure { assembly { let n := mload(a) // `a.length`. let o := add(a, 0x20) // Start of elements in `a`. let u := a // Highest memory slot. let w := not(0x1f) for { let i := 0 } iszero(eq(i, n)) { i := add(i, 1) } { let c := add(o, shl(5, i)) // Location of pointer to `a[i]`. let s := mload(c) // `a[i]`. let l := mload(s) // `a[i].length`. let r := and(l, 0x1f) // `a[i].length % 32`. let z := add(0x20, and(l, w)) // Offset of last word in `a[i]` from `s`. // If `s` comes before `o`, or `s` is not zero right padded. if iszero(lt(lt(s, o), or(iszero(r), iszero(shl(shl(3, r), mload(add(s, z))))))) { let m := mload(0x40) mstore(m, l) // Copy `a[i].length`. for {} 1 {} { mstore(add(m, z), mload(add(s, z))) // Copy `a[i]`, backwards. z := add(z, w) // `sub(z, 0x20)`. if iszero(z) { break } } let e := add(add(m, 0x20), l) mstore(e, 0) // Zeroize the slot after the copied bytes. mstore(0x40, add(e, 0x20)) // Allocate memory. s := m } mstore(c, sub(s, o)) // Convert to calldata offset. let t := add(l, add(s, 0x20)) if iszero(lt(t, u)) { u := t } } let retStart := add(a, w) // Assumes `a` doesn't start from scratch space. mstore(retStart, 0x20) // Store the return offset. return(retStart, add(0x40, sub(u, retStart))) // End the transaction. } } /// @dev Returns the word at `offset`, without any bounds checks. /// To load an address, you can use `address(bytes20(load(a, offset)))`. function load(bytes memory a, uint256 offset) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { result := mload(add(add(a, 0x20), offset)) } } /// @dev Returns the word at `offset`, without any bounds checks. /// To load an address, you can use `address(bytes20(loadCalldata(a, offset)))`. function loadCalldata(bytes calldata a, uint256 offset) internal pure returns (bytes32 result) { /// @solidity memory-safe-assembly assembly { result := calldataload(add(a.offset, offset)) } } /// @dev Returns empty calldata bytes. For silencing the compiler. function emptyCalldata() internal pure returns (bytes calldata result) { /// @solidity memory-safe-assembly assembly { result.length := 0 } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice A single-use vault that allows a designated caller to withdraw all ETH in it. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ext/zksync/SingleUseETHVault.sol) contract SingleUseETHVault { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Unable to withdraw all. error WithdrawAllFailed(); /// @dev Not authorized. error Unauthorized(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* WITHDRAW ALL */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ fallback() external payable virtual { /// @solidity memory-safe-assembly assembly { mstore(0x40, 0) // Optimization trick to remove free memory pointer initialization. let owner := sload(0) // Initialization. if iszero(owner) { sstore(0, calldataload(0x00)) // Store the owner. return(0x00, 0x00) // Early return. } // Authorization check. if iszero(eq(caller(), owner)) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } let to := calldataload(0x00) // If the calldata is less than 32 bytes, zero-left-pad it to 32 bytes. // Then use the rightmost 20 bytes of the word as the `to` address. // This allows for the calldata to be `abi.encode(to)` or `abi.encodePacked(to)`. to := shr(mul(lt(calldatasize(), 0x20), shl(3, sub(0x20, calldatasize()))), to) // If `to` is `address(0)`, set it to `msg.sender`. to := xor(mul(xor(to, caller()), iszero(to)), to) // Transfers the whole balance to `to`. if iszero(call(gas(), to, selfbalance(), 0x00, 0x00, 0x00, 0x00)) { mstore(0x00, 0x651aee10) // `WithdrawAllFailed()`. revert(0x1c, 0x04) } } } }
{ "evmVersion": "paris", "optimizer": { "enabled": true, "mode": "3", "runs": 10000 }, "outputSelection": { "*": { "*": [ "abi" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyDistributed","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BracketAlreadyValid","type":"error"},{"inputs":[],"name":"FeeBasisTooHigh","type":"error"},{"inputs":[],"name":"IncorrectFee","type":"error"},{"inputs":[],"name":"InvalidDistributionType","type":"error"},{"inputs":[],"name":"InvalidGameType","type":"error"},{"inputs":[],"name":"InvalidPoolConfig","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"MaxEntriesOutOfRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"NonexistentToken","type":"error"},{"inputs":[],"name":"NotCompatibleWithSpotMints","type":"error"},{"inputs":[],"name":"NotInPrivateList","type":"error"},{"inputs":[],"name":"NotOwnerNorPoolOwner","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PoolDoesNotExist","type":"error"},{"inputs":[],"name":"PoolIsFull","type":"error"},{"inputs":[],"name":"Reentrancy","type":"error"},{"inputs":[],"name":"RoyaltyOverflow","type":"error"},{"inputs":[],"name":"RoyaltyReceiverIsZeroAddress","type":"error"},{"inputs":[],"name":"SequentialMintExceedsLimit","type":"error"},{"inputs":[],"name":"SequentialUpToTooSmall","type":"error"},{"inputs":[],"name":"SingleEntryRestricted","type":"error"},{"inputs":[],"name":"SpotMintTokenIdTooSmall","type":"error"},{"inputs":[],"name":"TiebreakerOutOfRange","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TokenEditingClosed","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"},{"inputs":[],"name":"Unauthorized","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":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"part1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"part2","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tiebreaker","type":"uint256"}],"name":"BracketEdited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"BracketInvalidated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"minter","type":"address"}],"name":"BracketMinted","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":"uint256","name":"poolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"DistributionSetAndFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"part1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"part2","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tiebreaker","type":"uint256"}],"name":"GlobalResultBracketSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"PoolConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":true,"internalType":"address","name":"poolOwner","type":"address"}],"name":"PoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"PoolOwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"addrs","type":"address[]"}],"name":"PoolPrivateListUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"countRefunded","type":"uint256"}],"name":"PoolRefunded","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":"EDIT_DEADLINE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"adminRefundPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseAnimationUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseImageURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"batchMintBrackets","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"computeFibonacciScore","outputs":[{"internalType":"uint256","name":"score","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_description","type":"string"},{"internalType":"string","name":"_imageURI","type":"string"},{"internalType":"string","name":"_bannerURI","type":"string"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_entryFee","type":"uint256"},{"internalType":"bool","name":"_isSingleEntry","type":"bool"},{"internalType":"bool","name":"_isTop","type":"bool"},{"internalType":"bool","name":"_isSkilled","type":"bool"},{"internalType":"uint16","name":"_feeBasis","type":"uint16"},{"internalType":"address","name":"_feeWallet","type":"address"},{"internalType":"uint256","name":"_maxEntries","type":"uint256"}],"name":"createPool","outputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distributions","outputs":[{"internalType":"bool","name":"distributed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"newPart1","type":"uint256"},{"internalType":"uint256","name":"newPart2","type":"uint256"},{"internalType":"uint256","name":"newTiebreaker","type":"uint256"}],"name":"editBracket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"ownership","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"getDistribution","outputs":[{"internalType":"address[]","name":"addrs","type":"address[]"},{"internalType":"uint256[]","name":"amts","type":"uint256[]"},{"internalType":"bool","name":"distributed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"getPoolDetails","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageURI","type":"string"},{"internalType":"string","name":"bannerURI","type":"string"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"entryFee","type":"uint256"},{"internalType":"bool","name":"singleEntry","type":"bool"},{"internalType":"bool","name":"isTop","type":"bool"},{"internalType":"bool","name":"isSkilled","type":"bool"},{"internalType":"uint16","name":"feeBasis","type":"uint16"},{"internalType":"address","name":"feeWallet","type":"address"},{"internalType":"uint256","name":"maxEntries","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"getPoolEntries","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"getPoolOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"getPoolPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"getPoolPrivateList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"invalidateBracket","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":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"part1","type":"uint256"},{"internalType":"uint256","name":"part2","type":"uint256"},{"internalType":"uint256","name":"tiebreaker","type":"uint256"}],"name":"mintBracket","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"part1","type":"uint256"},{"internalType":"uint256","name":"part2","type":"uint256"},{"internalType":"uint256","name":"tiebreaker","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintBracketByTrustedSigner","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextPoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","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":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"poolUserEntered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pools","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"imageURI","type":"string"},{"internalType":"string","name":"bannerURI","type":"string"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"entryFee","type":"uint256"},{"internalType":"bool","name":"singleEntry","type":"bool"},{"internalType":"bool","name":"isTop","type":"bool"},{"internalType":"bool","name":"isSkilled","type":"bool"},{"internalType":"uint16","name":"feeBasis","type":"uint16"},{"internalType":"address","name":"feeWallet","type":"address"},{"internalType":"uint256","name":"totalCollected","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"},{"internalType":"uint256","name":"maxEntries","type":"uint256"},{"internalType":"address","name":"poolOwner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"resultBracket","outputs":[{"internalType":"uint256","name":"part1","type":"uint256"},{"internalType":"uint256","name":"part2AndTiebreak","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","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":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"address[]","name":"addrs","type":"address[]"},{"internalType":"uint256[]","name":"amts","type":"uint256[]"}],"name":"setDistributionAndFinalize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"part1","type":"uint256"},{"internalType":"uint256","name":"part2","type":"uint256"},{"internalType":"uint256","name":"tiebreaker","type":"uint256"}],"name":"setGlobalResultBracket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint16","name":"newMaxEntries","type":"uint16"}],"name":"setMaxEntries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"setPoolOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"address[]","name":"addrs","type":"address[]"}],"name":"setPrivateList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTrusted","type":"address"}],"name":"setTrustedBackend","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":"","type":"uint256"}],"name":"tokenIdToBracket","outputs":[{"internalType":"uint256","name":"part1","type":"uint256"},{"internalType":"uint256","name":"part2AndTiebreak","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"trustedBackend","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_description","type":"string"},{"internalType":"string","name":"_imageURI","type":"string"},{"internalType":"string","name":"_bannerURI","type":"string"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_entryFee","type":"uint256"},{"internalType":"bool","name":"_isSingleEntry","type":"bool"},{"internalType":"bool","name":"_isTop","type":"bool"},{"internalType":"bool","name":"_isSkilled","type":"bool"},{"internalType":"uint16","name":"_feeBasis","type":"uint16"},{"internalType":"address","name":"_feeWallet","type":"address"},{"internalType":"uint256","name":"_maxEntries","type":"uint256"}],"name":"updatePoolConfig","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
9c4d535b000000000000000000000000000000000000000000000000000000000000000001000a45a9c3f4b0fcc7295bf3842ef62bc047737cc14c6c9a986497bb2f322500000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x000400000000000200150000000000020000006004100270000009200340019700030000003103550002000000010355000009200040019d0000008004000039000000400040043f00000001002001900000002e0000c13d000000040030008c00001e1f0000413d000000000201043b000000e002200270000009460020009c000000ae0000a13d000009470020009c000000cf0000a13d000009480020009c000001850000213d000009540020009c0000022f0000213d0000095a0020009c000005130000213d0000095d0020009c000008f50000613d0000095e0020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b247d231d0000040f000000400200043d001400000002001d247d1ec50000040f0000001401000029000009200010009c00000920010080410000004001100210000009e3011001c70000247e0001042e0000000001000416000000000001004b00001e1f0000c13d0000001701000039000000800010043f0000092101000041000000a00010043f0000010001000039000000400010043f0000000601000039000000c00010043f0000092201000041000000e00010043f0000000201000039000000000201041a000000010320019000000001022002700000007f0220618f0000001f0020008c00000000040000390000000104002039000000000043004b000000a80000c13d000000200020008c0000004f0000413d00000923030000410000001f022000390000000502200270000009240220009a000000000003041b0000000103300039000000000023004b0000004b0000413d0000092502000041000000000021041b0000000303000039000000000103041a000000010010019000000001041002700000007f0440618f0000001f0040008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d000000200040008c000000750000413d001400000004001d000000000030043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000014020000290000001f0220003900000005022002700000000002210019000000000021004b0000000303000039000000750000813d000000000001041b0000000101100039000000000021004b000000710000413d000000e00100043d00000927011001970000000c011001bf000000000013041b0000000101000039000000000010041b0000000f01000039000000000301041a000000010030019000000001023002700000007f0220618f0000001f0020008c00000000040000390000000104002039000000000343013f0000000100300190000000a80000c13d000000200020008c000000920000413d000000610020008c000000920000413d0000001f022000390000000502200270000009280220009a0000092903000041000000000003041b0000000103300039000000000023004b0000008e0000413d0000008702000039000000000021041b0000092a010000410000092b02000041000000000012041b0000092c010000410000092d02000041000000000012041b0000092e010000410000092f02000041000000000012041b0000001003000039000000000103041a000000010010019000000001041002700000007f0440618f0000001f0040008c00000000020000390000000102002039000000000121013f00000001001001900000032e0000613d00000a0c01000041000000000010043f0000002201000039000000040010043f00000a0d010000410000247f00010430000009740020009c000001700000213d0000098a0020009c0000019f0000a13d0000098b0020009c000002790000213d000009910020009c0000056e0000213d000009940020009c00000b280000613d000009950020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000a01000039000000200010043f00000040020000390000000001000019247d24470000040f0000000b01100039247d1f320000040f0000002002000039000000400300043d001400000003001d0000000002230436247d1e890000040f00000d390000013d0000095f0020009c000001920000a13d000009600020009c000002200000213d000009660020009c000003e20000213d000009690020009c000007310000613d0000096a0020009c00001e1f0000c13d000000a40030008c00001e1f0000413d0000006402100370000000000202043b001100000002001d0000004402100370000000000202043b001000000002001d0000002402100370000000000202043b000f00000002001d0000000402100370000000000202043b001200000002001d0000008402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d001300040020003d0000001301100360000000000101043b001400000001001d000009de0010009c00001e1f0000213d0000001401200029000e00240010003d0000000e0030006b00001e1f0000213d0000000901000039000000000101041a000000120010006b00000b240000813d000009e802000041000000000302041a0000000001000410000000000013004b00000b200000613d000000000012041b000000120000006b00000d600000613d0000001102000029000003e70020008c000005290000213d0000006001100210000000a00010043f00000000010004110000006001100210000000b40010043f0000001201000029000000c80010043f0000000f01000029000000e80010043f0000001001000029000001080010043f0000001101000029000001280010043f000000a801000039000000800010043f0000016001000039000000400010043f0000000001000414000009200010009c0000092001008041000000c001100210000009e9011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000200010043f000009ea01000041000000000010043f0000000001000414000009200010009c0000092001008041000000c001100210000009eb011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000014020000290000001f0320003900000a2d033001970000003f0330003900000a2d03300197000000000101043b000b00000001001d000000400400043d0000000001340019000d00000004001d000000000041004b00000000030000390000000103004039000009de0010009c000010cf0000213d0000000100300190000010cf0000c13d0000001303000039000000000303041a000a00000003001d000000400010043f00000014010000290000000d040000290000000001140436000c00000001001d0000000e01000029000000000010007c00001e1f0000213d000000140100002900000a2d021001980000001f0310018f0000000c01200029000000130400002900000020044000390000000204400367000001580000613d000000000504034f0000000c06000029000000005705043c0000000006760436000000000016004b000001540000c13d0000000a05000029001309340050019b000000000003004b000001670000613d000000000224034f0000000303300210000000000401043300000000043401cf000000000434022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000242019f00000000002104350000000c0200002900000014012000290000000000010435000000130000006b000017c90000c13d000009f501000041000000000010043f000009bd010000410000247f00010430000009750020009c000001ca0000a13d000009760020009c000002a60000213d0000097c0020009c000005770000213d0000097f0020009c00000ba90000613d000009800020009c00001e1f0000c13d0000000001000416000000000001004b00001e1f0000c13d0000001201000039000000000101041a0000001102000039000000000202041a000000800020043f000000a00010043f000009c1010000410000247e0001042e000009490020009c000002440000213d0000094f0020009c0000052d0000213d000009520020009c000009120000613d000009530020009c00001e1f0000c13d0000000001000416000000000001004b00001e1f0000c13d000000130100003900000c580000013d0000096b0020009c000002de0000a13d0000096c0020009c000004b20000213d0000096f0020009c000008c10000613d000009700020009c00001e1f0000c13d0000000001000416000000000001004b00001e1f0000c13d000009350100004100000c580000013d000009960020009c000002f80000a13d000009970020009c000005dc0000213d0000099a0020009c00000ccd0000613d0000099b0020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000201043b000000000002004b00000e850000613d000000000100041a000000000021004b00000e850000a13d001300000002001d001400000002001d000000000020043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000e7a0000c13d0000001402000029000000000002004b000000010220008a000001b40000c13d000009820000013d000009810020009c000003170000a13d000009820020009c000005ee0000213d000009850020009c00000cec0000613d000009860020009c00001e1f0000c13d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b001400000002001d0000002401100370000000000101043b001300000001001d000009340010009c00001e1f0000213d0000000901000039000000000101041a0000001402000029000000000012004b00000b240000813d000000000020043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000093502000041000000000202041a00000934032001970000000002000411000000000032004b000001fc0000613d000000000101043b0000000a01100039000000000101041a0000093401100197000000000012004b00000fe40000c13d0000001401000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000000a01100039000000000201041a00000943022001970000001303000029000000000232019f000000000021041b000000400100043d0000000000310435000009200010009c000009200100804100000040011002100000000002000414000009200020009c0000092002008041000000c002200210000000000112019f00000926011001c70000800d02000039000000020300003900000a0604000041000000140500002900000d280000013d000009610020009c000004610000213d000009640020009c000007430000613d000009650020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b247d20b80000040f00000cc60000013d000009550020009c000005380000213d000009580020009c000009260000613d000009590020009c00001e1f0000c13d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000002402100370000000000202043b001400000002001d000009340020009c00001e1f0000213d0000000401100370000000000101043b000000000010043f0000000e01000039000009980000013d0000094a0020009c0000055b0000213d0000094d0020009c000009380000613d0000094e0020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000401100370000000000101043b001400000001001d000009340010009c00001e1f0000213d0000093501000041000000000101041a0000000002000411000000000012004b000009c80000c13d0000099f010000410000000c0010043f0000001401000029000000000010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a3011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b001200000001001d000000000101041a001300000001001d000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f00000001002001900000198e0000613d000000000101043b000000130010006c000010350000a13d000009a601000041000000000010043f000009a2010000410000247f000104300000098c0020009c000005890000213d0000098f0020009c00000c450000613d000009900020009c00001e1f0000c13d0000099f010000410000000c0010043f0000000001000411000000000010043f000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f00000001002001900000198e0000613d000000000101043b001400000001001d0000000001000414000009200010009c0000092001008041000000c001100210000009a3011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000140200002900000a130220009a000000000021041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d02000039000000020300003900000a140400004100000d270000013d000009770020009c000005c30000213d0000097a0020009c00000c4a0000613d0000097b0020009c00001e1f0000c13d000000840030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000006402100370000000000602043b0000004402100370000000000502043b0000002402100370000000000702043b0000000401100370000000000401043b000009e801000041000000000301041a0000000002000410000000000023004b00000b200000613d000000000021041b000000000004004b000010310000613d000000000100041a000000000041004b000010310000a13d001000000007001d001200000006001d001100000005001d001300000004001d001400000004001d000000000040043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000fa20000c13d0000001404000029000000000004004b000000010440008a000002c80000c13d000009820000013d000009710020009c000006240000613d000009720020009c000007120000613d000009730020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000f00000001001d000009340010009c00001e1f0000213d000000000100041a000000000001004b00000d430000613d000e00010010009400000db50000c13d0000006002000039001400000004001d0000000001040019247d1e960000040f00000d390000013d0000099c0020009c000009cc0000613d0000099d0020009c00000a1e0000613d0000099e0020009c00001e1f0000c13d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b000009340020009c00001e1f0000213d0000002401100370000000000101043b00000a110010009c00001e1f0000213d0000093503000041000000000303041a0000000004000411000000000034004b000009c80000c13d00000a1101100197000027110010008c00000f9c0000413d00000a1d01000041000000000010043f000009a2010000410000247f00010430000009870020009c000009e70000613d000009880020009c00000b0d0000613d000009890020009c00001e1f0000c13d0000000001030019247d1ea50000040f001400000001001d001300000002001d001200000003001d000000400100043d001100000001001d0000002002000039247d1ed80000040f00000011040000290000000000040435000000140100002900000013020000290000001203000029247d21600000040f00000000010000190000247e0001042e000000200040008c000003480000413d001400000004001d000000000030043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000201043b00000014010000290000001f01100039000000050110027000000000011200190000000202200039000000000012004b0000001003000039000003480000813d000000000002041b0000000102200039000000000012004b000003440000413d0000004f01000039000000000013041b000000000030043f00000930010000410000093102000041000000000012041b00000932010000410000093302000041000000000012041b000000000100041100000934061001970000093501000041000000000061041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d02000039000000030300003900000937040000410000000005000019001400000006001d247d24730000040f000000010020019000001e1f0000613d0000000a01000039000000200010043f0000093801000041000000000101041a000000010010019000000001031002700000007f0330618f0000001f0030008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d000000200030008c000003880000413d001300000003001d0000093801000041000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000013020000290000001f0220003900000005022002700000000002210019000000000021004b000003880000813d000000000001041b0000000101100039000000000021004b000003840000413d00000939010000410000093802000041000000000012041b0000093a01000041000000000101041a000000010010019000000001031002700000007f0330618f0000001f0030008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d000000200030008c000003b00000413d001300000003001d0000093a01000041000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000201043b00000013010000290000001f01100039000000050110027000000000011200190000000202200039000000000012004b000003b00000813d000000000002041b0000000102200039000000000012004b000003ac0000413d0000093a010000410000004f02000039000000000021041b000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000093b02000041000000000021041b00000001011000390000093c02000041000000000021041b000000000100041000000028011002100000093d011001970000093e02000041000000000302041a0000093f03300197000000000113019f00000940011001c7000000000012041b0000ffff010000390000094102000041000000000012041b0000094201000041000000000201041a000009430220019700000014022001af000000000021041b00000009010000390000000102000039000000000021041b0000000001000411000000600110021200000f9e0000613d0000012c011001bf0000094402000041000000000012041b00000020010000390000010000100443000001200000044300000945010000410000247e0001042e000009670020009c000007840000613d000009680020009c00001e1f0000c13d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b000e00000002001d0000002402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000141034f000000000401043b000009de0040009c00001e1f0000213d000000240520003900000005014002100000000001510019000000000031004b00001e1f0000213d0000000901000039000000000101041a0000000e02000029000000000012004b00000b240000813d000000000020043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039001100000004001d001000000005001d247d24780000040f000000010020019000001e1f0000613d0000093502000041000000000202041a00000934032001970000000002000411000000000032004b0000041e0000613d000000000101043b0000000a01100039000000000101041a0000093401100197000000000012004b00000fe40000c13d0000001101000029000000800010008c00000d600000213d0000000e01000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000000c01100039000000000201041a000f00000001001d000000000001041b001400000002001d000000000002004b000012fa0000c13d0000001103000029000000000003004b00000010040000290000133f0000c13d000000400100043d0000002002000039000000000221043600000000003204350000004002100039000000000003004b0000044e0000613d0000000203000367000000000400001900000011060000290000001007000029000000000573034f000000000505043b000009340050009c00001e1f0000213d000000000252043600000020077000390000000104400039000000000064004b000004450000413d0000000002120049000009200020009c00000920020080410000006002200210000009200010009c00000920010080410000004001100210000000000112019f0000000002000414000009200020009c0000092002008041000000c002200210000000000121019f00000936011001c70000800d020000390000000203000039000009e6040000410000000e0500002900000d280000013d000009620020009c000007c70000613d000009630020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000801043b000000000108041a000000010210019000000001041002700000007f0440618f0000001f0040008c00000000030000390000000103002039000000000331013f0000000100300190000000a80000c13d000000400600043d0000000903800039000000000303041a001000000003001d0000000603800039000000000303041a001100000003001d0000000503800039000000000303041a001300000003001d0000000403800039000000000303041a001200000003001d0000000005460436000000000002004b00000dbd0000613d000d00000004001d000e00000006001d000f00000005001d001400000008001d000000000080043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000d07000029000000000007004b00000000020000190000000f050000290000000e06000029000000140800002900000dc20000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000072004b000004aa0000413d00000dc20000013d0000096d0020009c000008d60000613d0000096e0020009c00001e1f0000c13d000000640030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b001000000002001d000009340020009c00001e1f0000213d0000004402100370000000000202043b0000002401100370000000000301043b000000000023004b00000d430000813d000000000100041a000000000012004b0000000002018019000f00000002001d000000010030008c000000010300a0390000001001000029000000000001004b00000db90000613d001300000003001d000000000010043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000d00600000003d000000000101043b00000013030000290000000f0230006b0000147e0000a13d000000000101041a000009de011001980000147e0000613d000000000012004b0000000002018019000e00000002001d0000000501200210000000400200043d000d00000002001d00000000012100190000002001100039000000400010043f001200000001001d000009f60010009c000010cf0000213d00000012020000290000008001200039000000400010043f0000006001200039000000000001043500000040012000390000000000010435000000200120003900000000000104350000000000020435000000000100041a000000000031004b0000000001000019000011360000a13d0000001301000029001400000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b000012c90000c13d0000001401000029000000010110008a000004ff0000013d0000095b0020009c000009600000613d0000095c0020009c00001e1f0000c13d000000640030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000004402100370000000000202043b0000002403100370000000000303043b0000000401100370000000000101043b0000093504000041000000000404041a0000000005000411000000000045004b000009c80000c13d000003e70020008c00000d470000a13d00000a0f01000041000000000010043f000009bd010000410000247f00010430000009500020009c000009880000613d000009510020009c00001e1f0000c13d0000000001000416000000000001004b00001e1f0000c13d000009bf01000041000000800010043f000009a0010000410000247e0001042e000009560020009c000009a30000613d000009570020009c00001e1f0000c13d0000000001000416000000000001004b00001e1f0000c13d0000001003000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000000a80000c13d000000800010043f000000000004004b00000d2d0000613d000000000030043f000000000001004b000000000200001900000d320000613d00000931030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000012004b000005530000413d00000d320000013d0000094b0020009c000009b70000613d0000094c0020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000009340010009c00001e1f0000213d0000099f020000410000000c0020043f000000000010043f0000000c010000390000002002000039000005ec0000013d000009920020009c00000c5d0000613d000009930020009c00001e1f0000c13d0000000001000416000000000001004b00001e1f0000c13d00000009010000390000073f0000013d0000097d0020009c00000c680000613d0000097e0020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b001400000001001d247d23f20000040f00000000010004110000001402000029247d23da0000040f00000000010000190000247e0001042e0000098d0020009c00000c720000613d0000098e0020009c00001e1f0000c13d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b001400000002001d0000002401100370000000000101043b001300000001001d0000ffff0010008c00001e1f0000213d0000000901000039000000000101041a0000001402000029000000000012004b00000b240000813d000000000020043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000093502000041000000000202041a00000934032001970000000002000411000000000032004b000005b70000613d000000000101043b0000000a01100039000000000101041a0000093401100197000000000012004b00000fe40000c13d0000001401000029000000000010043f0000000a01000039000000200010043f00000040020000390000000001000019247d24470000040f00000009011000390000001302000029000000000021041b00000000010000190000247e0001042e000009780020009c00000cbc0000613d000009790020009c00001e1f0000c13d0000093501000041000000000101041a0000000005000411000000000015004b000009c80000c13d0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d02000039000000030300003900000937040000410000000006000019247d24730000040f000000010020019000001e1f0000613d0000093501000041000000000001041b00000000010000190000247e0001042e000009980020009c00000d010000613d000009990020009c00001e1f0000c13d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000d01000039000000200010043f00000040020000390000000001000019247d24470000040f0000073f0000013d000009830020009c00000d100000613d000009840020009c00001e1f0000c13d000000440030008c00001e1f0000413d0000002402100370000000000202043b000d00000002001d0000000401100370000000000201043b0000000901000039000000000101041a001200000002001d000000000012004b00000b240000813d000009e801000041000000000201041a0000000003000410000000000032004b00000b200000613d000000000031041b0000001201000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000201043b0000000801200039000000000101041a000000ff001001900000198f0000c13d0000000601200039000000000101041a000009e4001001980000103b0000c13d001100000002001d000000ff00100190000010f80000613d0000000d01000029000000010010008c000010f80000a13d00000a0801000041000000000010043f000009bd010000410000247f00010430000001a40030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b001400000002001d0000002402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b001300000004001d000009de0040009c00001e1f0000213d0000002404200039001200000004001d0000001302400029000000000032004b00001e1f0000213d0000004402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b001100000004001d000009de0040009c00001e1f0000213d0000002404200039001000000004001d0000001102400029000000000032004b00001e1f0000213d0000006402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b000f00000004001d000009de0040009c00001e1f0000213d0000002404200039000e00000004001d0000000f02400029000000000032004b00001e1f0000213d0000008402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b000d00000004001d000009de0040009c00001e1f0000213d0000002404200039000c00000004001d0000000d02400029000000000032004b00001e1f0000213d000000a402100370000000000202043b000b00000002001d000009340020009c00001e1f0000213d000000c402100370000000000202043b000900000002001d000000e402100370000000000302043b000000000003004b0000000002000039000000010200c039000a00000003001d000000000023004b00001e1f0000c13d0000010402100370000000000302043b000000000003004b0000000002000039000000010200c039000800000003001d000000000023004b00001e1f0000c13d0000012402100370000000000302043b000000000003004b0000000002000039000000010200c039000700000003001d000000000023004b00001e1f0000c13d0000014402100370000000000202043b000600000002001d0000ffff0020008c00001e1f0000213d0000016402100370000000000202043b000500000002001d000009340020009c00001e1f0000213d0000018401100370000000000101043b000400000001001d0000000901000039000000000101041a000000140010006c00000b240000a13d0000001401000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000093502000041000000000202041a00000934032001970000000002000411000000000032004b000006be0000613d000000000101043b0000000a01100039000000000101041a0000093401100197000000000012004b00000fe40000c13d0000000601000029000009c40010008c00000ba50000213d0000000401000029000009400110009a00000a2e0010009c00001a580000413d0000001401000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000300000001001d000000000101041a000000010010019000000001021002700000007f0220618f000200000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000000201000029000000200010008c000006fe0000413d0000000301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000013030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000002010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b000006fe0000813d000000000002041b0000000102200039000000000012004b000006fa0000413d0000001301000029000000200010008c00001abd0000413d0000000301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000001302200180000000000101043b00001b9a0000c13d000000000300001900001ba40000013d0000000001000416000000000001004b00001e1f0000c13d0000000f03000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000000a80000c13d000000800010043f000000000004004b00000d2d0000613d000000000030043f000000000001004b000000000200001900000d320000613d0000092b030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000012004b000007290000413d00000d320000013d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000a01000039000000200010043f00000040020000390000000001000019247d24470000040f0000000501100039000000000101041a000000800010043f000009a0010000410000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000601043b000000000106041a000000010210019000000001041002700000007f0440618f0000001f0040008c00000000030000390000000103002039000000000331013f0000000100300190000000a80000c13d000000400700043d0000000005470436000000000002004b00000dfa0000613d001100000004001d001200000007001d001300000005001d001400000006001d000000000060043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000001108000029000000000008004b000000000200001900000013050000290000001406000029000000120700002900000dff0000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000082004b0000077c0000413d00000dff0000013d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b001400000002001d000009340020009c00001e1f0000213d0000002401100370000000000201043b000000000002004b0000000001000039000000010100c039001300000002001d000000000012004b00001e1f0000c13d0000000001000411000000000010043f0000000701000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000001402000029000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000201041a00000a2f022001970000001303000029000000000232019f000000000021041b000000400100043d0000000000310435000009200010009c000009200100804100000040011002100000000002000414000009200020009c0000092002008041000000c002200210000000000112019f00000926011001c70000800d020000390000000303000039000009e7040000410000000005000411000000140600002900000d280000013d000000640030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b001300000002001d0000002402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b001400000004001d000009de0040009c00001e1f0000213d001200240020003d000000140200002900000005022002100000001202200029000000000032004b00001e1f0000213d0000004402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000141034f000000000101043b001100000001001d000009de0010009c00001e1f0000213d001000240020003d000000110100002900000005011002100000001001100029000000000031004b00001e1f0000213d0000000901000039000000000101041a000000130010006b00000b240000813d0000001301000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000093502000041000000000202041a00000934022001970000000003000411000000000023004b000008130000613d000000000101043b0000000a01100039000000000101041a00000934011001970000000002000411000000000012004b00000fe40000c13d0000001102000029000000140020006b00000d600000c13d0000001301000029000000000010043f0000000b01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b001100000001001d0000001301000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000000801100039000f00000001001d000000000101041a000000ff001001900000198f0000c13d00000011010000290000000201100039000e00000001001d000000000101041a000000ff001001900000198f0000c13d0000001102000029000000000302041a0000001401000029000000000012041b000d00000003001d000000000013004b000008590000a13d0000001101000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000201043b00000014012000290000000d02200029000000000021004b000008590000813d000000000001041b0000000101100039000000000021004b000008550000413d0000001101000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000140000006b0000001205000029000008750000613d00000002020003670000000003000019000000000452034f000000000404043b000009340040009c00001e1f0000213d00000000060500190000000005130019000000000045041b00000020056000390000000103300039000000140030006c0000086a0000413d00000011010000290000000102100039000000000302041a0000001401000029001200000002001d000000000012041b001100000003001d000000000013004b000008920000a13d0000001201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000201043b00000014012000290000001102200029000000000021004b000008920000813d000000000001041b0000000101100039000000000021004b0000088e0000413d0000001201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000001406000029000000000006004b0000001007000029000008ac0000613d000000020200036700000000030000190000000004130019000000000572034f000000000505043b000000000054041b00000020077000390000000103300039000000000063004b000008a40000413d0000000e03000029000000000103041a00000a2f0110019700000001011001bf000000000013041b0000000f03000029000000000103041a00000a2f0110019700000001011001bf000000000013041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000303000039000009e5040000410000001305000029000000000600041100000d280000013d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000a01000039000000200010043f00000040020000390000000001000019247d24470000040f0000000c01100039247d206a0000040f0000002002000039000000400300043d001400000003001d0000000002230436247d1eb70000040f00000d390000013d0000000001000416000000000001004b00001e1f0000c13d0000000303000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000000a80000c13d000000800010043f000000000004004b00000d2d0000613d000000000030043f000000000001004b000000000200001900000d320000613d000009f7030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000012004b000008ed0000413d00000d320000013d000000840030008c00001e1f0000413d0000000402100370000000000202043b001400000002001d000009340020009c00001e1f0000213d0000002402100370000000000202043b001300000002001d000009340020009c00001e1f0000213d0000006402100370000000000402043b000009de0040009c00001e1f0000213d0000002302400039000000000032004b00001e1f0000813d0000000402400039000000000221034f000000000202043b0000004401100370000000000101043b001200000001001d0000002401400039247d1eea0000040f0000000004010019000003280000013d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000c01000039000000200010043f00000040020000390000000001000019247d24470000040f0000000102100039000000000202041a000000000101041a000000800010043f000000a00020043f000009c1010000410000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b001400000001001d000009340010009c00001e1f0000213d247d23f20000040f0000001301000039000000000201041a000009430220019700000014022001af000000000021041b00000000010000190000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000301043b0000093501000041000000000101041a0000000002000411000000000012004b000009c80000c13d000000000003004b000010310000613d000000000100041a000000000031004b000010310000a13d001300000003001d001400000003001d000000000030043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000fe80000c13d0000001403000029000000000003004b000000010330008a0000094a0000c13d000009820000013d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000201043b000000000002004b000010310000613d000000000100041a000000000021004b000010310000a13d001300000002001d001400000002001d000000000020043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000e890000c13d0000001402000029000000000002004b000000010220008a0000096d0000c13d00000a0c01000041000000000010043f0000001101000039000000040010043f00000a0d010000410000247f00010430000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b000009340020009c00001e1f0000213d0000002401100370000000000101043b001400000001001d000009340010009c00001e1f0000213d000000000020043f0000000701000039000000200010043f00000040020000390000000001000019247d24470000040f0000001402000029247d1f220000040f000000000101041a000000ff001001900000000001000039000000010100c03900000cc60000013d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b001400000002001d000009340020009c00001e1f0000213d0000002401100370000000000101043b001300000001001d247d23f20000040f000000000200041100000014010000290000001303000029247d23890000040f00000000010000190000247e0001042e000000240030008c00001e1f0000413d0000000401100370000000000101043b000009340010009c00001e1f0000213d0000093502000041000000000202041a0000000003000411000000000023004b000009c80000c13d000000000001004b000010380000c13d000009a101000041000000000010043f000009a2010000410000247f0001043000000a1b01000041000000000010043f000009a2010000410000247f00010430000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000201043b00000a280020019800001e1f0000c13d000000010100003900000a290320019700000a2a0030009c000009e30000613d00000a2b0030009c000009e30000613d00000a2c0030009c000009e30000613d000000e0022002700000098d0020009c000000000100003900000001010060390000099c0020009c00000001011061bf000000010110018f000000800010043f000009a0010000410000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000b01000039000000200010043f00000040020000390000000001000019247d24470000040f0000000002010019001400000001001d0000000201100039000000000101041a001300000001001d0000000001020019247d206a0000040f001200000001001d00000014010000290000000101100039247d1f320000040f0000006002000039000000400300043d001400000003001d0000000002230436001000000002001d001100000001001d00000060023000390000001201000029247d1eb70000040f0000000002010019000000140120006a000000100300002900000000001304350000001101000029247d1e890000040f0000001302000029000000ff002001900000000002000039000000010200c0390000001404000029000000400340003900000000002304350000000001410049000009200040009c00000920040080410000004002400210000009200010009c00000920010080410000006001100210000000000121019f0000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000201043b0000000901000039000000000101041a000000000012004b00000b240000813d000c00000002001d000000000020043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000093502000041000000000202041a00000934032001970000000002000411000000000032004b00000a420000613d000000000101043b0000000a01100039000000000101041a0000093401100197000000000012004b00000fe40000c13d000009e801000041000000000301041a0000000002000410000000000023004b00000b200000613d000000000021041b0000000c01000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000201043b0000000801200039000b00000001001d000000000101041a000000ff001001900000198f0000c13d0000000b03200039001100000003001d000000000303041a001200000003001d0000000503200039000000000303041a001000000003001d000000000003004b000016950000613d000000120000006b000016950000613d000f00040020003d0000000003000019000000110200002900000a700000013d000000340000043f00000013030000290000000103300039000000120030006c0000001102000029000016930000813d000000000102041a001300000003001d000000000031004b0000168d0000a13d000000000020043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000001301100029000000000101041a000000000001004b00000d0c0000613d001400000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000aab0000c13d000000000100041a0000001402000029000000000021004b00000d0c0000a13d000000010220008a001400000002001d000000000020043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b000000140200002900000a980000613d000009a80010019800000d0c0000c13d00000934041001970000000f01000029000000000101041a000009340210019800000afb0000613d000000140040043f0000001001000029000000340010043f00000a2101000041000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000a22011001c7001400000002001d247d24730000040f00000060031002700000092008300197000000200080008c00000020030000390000000003084019000000200730019000000acb0000613d000000000401034f0000000005000019000000004604043c0000000005650436000000000075004b00000ac70000c13d0000001f0330019000000ad80000613d000000000471034f0000000303300210000000000507043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f0000000000370435000100000008001f0003000000010355000000000100043d000000010010008c00000000010000390000000101006039000000000112016f000000010010019000000a6a0000c13d000d00000008001d000e00000002001d000009ec010000410000000000100443000000140100002900000004001004430000000001000414000009200010009c0000092001008041000000c001100210000009ed011001c70000800202000039247d24780000040f00000001002001900000198e0000613d000000000101043b000000000001004b000000000100003900000001010060390000000d001001b0000000000100003900000001010060390000000e0110017f000000010010019000000a6a0000c13d000018040000013d0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c7000080090200003900000010030000290000000005000019247d24730000040f0000006003100270000109200030019d0003000000010355000000010020019000000a6b0000c13d00000a2401000041000000000010043f000009a2010000410000247f00010430000000840030008c00001e1f0000413d0000006402100370000000000402043b0000004402100370000000000502043b0000002402100370000000000602043b0000000401100370000000000301043b0000000901000039000000000101041a000000000013004b00000b240000813d000009e801000041000000000201041a0000000007000410000000000072004b00000d5d0000c13d00000a2701000041000000000010043f000009a2010000410000247f0001043000000a1e01000041000000000010043f000009bd010000410000247f00010430000001840030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b001400000004001d000009de0040009c00001e1f0000213d0000002404200039001300000004001d0000001402400029000000000032004b00001e1f0000213d0000002402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b001200000004001d000009de0040009c00001e1f0000213d0000002404200039001100000004001d0000001202400029000000000032004b00001e1f0000213d0000004402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b001000000004001d000009de0040009c00001e1f0000213d0000002404200039000f00000004001d0000001002400029000000000032004b00001e1f0000213d0000006402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d0000000404200039000000000441034f000000000404043b000e00000004001d000009de0040009c00001e1f0000213d0000002404200039000d00000004001d0000000e02400029000000000032004b00001e1f0000213d0000008402100370000000000202043b000c00000002001d000009340020009c00001e1f0000213d000000a402100370000000000202043b000a00000002001d000000c402100370000000000302043b000000000003004b0000000002000039000000010200c039000b00000003001d000000000023004b00001e1f0000c13d000000e402100370000000000302043b000000000003004b0000000002000039000000010200c039000900000003001d000000000023004b00001e1f0000c13d0000010402100370000000000302043b000000000003004b0000000002000039000000010200c039000800000003001d000000000023004b00001e1f0000c13d0000012402100370000000000202043b000700000002001d0000ffff0020008c00001e1f0000213d0000014402100370000000000202043b000600000002001d000009340020009c00001e1f0000213d0000016401100370000000000101043b000500000001001d0000000701000029000009c50010008c00001a540000413d00000a1701000041000000000010043f000009bd010000410000247f00010430000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000402100370000000000202043b000009de0020009c00001e1f0000213d0000002304200039000000000034004b00001e1f0000813d001300040020003d0000001304100360000000000504043b000009de0050009c00001e1f0000213d000000050450021000000000024200190000002402200039000000000032004b00001e1f0000213d000000800050043f000000a002400039000000400020043f000000000005004b00000bfe0000c13d00000020010000390000000001120436000000800300043d00000000003104350000004001200039000000000003004b00000d3a0000613d00000080040000390000000005000019000000200440003900000000060404330000000087060434000009340770019700000000077104360000000008080433000009de08800197000000000087043500000040076000390000000007070433000000000007004b0000000007000039000000010700c039000000400810003900000000007804350000006006600039000000000606043300000a01066001970000006007100039000000000067043500000080011000390000000105500039000000000035004b00000bcd0000413d00000d3a0000013d000000000301034f0000000201000367000000000303043b000000000303041a0000008004200039000000400040043f0000006004200039000000e8053002700000000000540435000009a8003001980000000004000039000000010400c0390000004005200039000000000045043500000934043001970000000004420436000000a003300270000009de033001970000000000340435000000200460008c00000080036000390000000000230435000000400200043d00000bc40000613d00000000060400190000001303400029000000000331034f000000000403043b000009f60020009c000010cf0000213d0000008003200039000000400030043f0000006003200039000000000003043500000040032000390000000000030435000000200320003900000000000304350000000000020435000000000004004b00000bf90000613d000000000300041a000000000043004b00000bf90000a13d001200000006001d001400000004001d000000000040043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000c270000c13d0000001404000029000000010440008a00000c130000013d000000400100043d000009f60010009c0000001403000029000010cf0000213d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000000030043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400200043d000009f60020009c000000120600002900000be60000a13d000010cf0000013d0000000001030019247d1ea50000040f247d1f670000040f00000000010000190000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000a01000039000000200010043f00000040020000390000000001000019247d24470000040f0000000a01100039000000000101041a0000093401100197000000800010043f000009a0010000410000247e0001042e0000000001000416000000000001004b00001e1f0000c13d0000000101000039000000000101041a00000a3001100167000000000200041a0000000001120019000000800010043f000009a0010000410000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b247d23fc0000040f000009340110019700000cc60000013d000000440030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000002402100370000000000202043b001400000002001d0000000401100370000000000101043b000000000010043f0000094401000041000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000201041a00000a110020009c00000c8e0000213d0000094401000041000000000201041a00000a11012001980000000003000019000000010300c08a000000000313c0d9000000140030006b0000000003000019000000000301201900000001040000310000000005430019000000000045004b00001e1f0000213d00000a2d053001980000001f0630018f0000000307400367000000000354001900000ca30000613d000000000807034f000000008908043c0000000004940436000000000034004b00000c9f0000c13d0000006002200270000000000006004b00000cb10000613d000000000457034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f000000000043043500000014011000b9000027100110011a000000400300043d000000200430003900000000001404350000000000230435000009200030009c0000092003008041000000400130021000000a12011001c70000247e0001042e000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000009340010009c00001e1f0000213d247d20a00000040f000000400200043d0000000000120435000009200020009c00000920020080410000004001200210000009c0011001c70000247e0001042e0000000001000416000000000001004b00001e1f0000c13d0000000203000039000000000203041a000000010420019000000001012002700000007f0110618f0000001f0010008c00000000050000390000000105002039000000000552013f0000000100500190000000a80000c13d000000800010043f000000000004004b00000d2d0000613d000000000030043f000000000001004b000000000200001900000d320000613d00000923030000410000000002000019000000000403041a000000a005200039000000000045043500000001033000390000002002200039000000000012004b00000ce40000413d00000d320000013d000000240030008c00001e1f0000413d0000000002000416000000000002004b00001e1f0000c13d0000000401100370000000000101043b000000000010043f0000000b01000039000000200010043f00000040020000390000000001000019247d24470000040f0000000201100039000000000101041a000000ff001001900000000001000039000000010100c039000000800010043f000009a0010000410000247e0001042e000000440030008c00001e1f0000413d0000000402100370000000000202043b001300000002001d000009340020009c00001e1f0000213d0000002401100370000000000101043b000000000001004b00000d640000c13d00000a2501000041000000000010043f000009bd010000410000247f000104300000099f010000410000000c0010043f0000000001000411000000000010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a3011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000001041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d02000039000000020300003900000a05040000410000000005000411247d24730000040f000000010020019000001e1f0000613d00000000010000190000247e0001042e00000a2f02200197000000a00020043f000000000001004b0000002002000039000000000200603900000020022000390000008001000039247d1ed80000040f000000400100043d001400000001001d0000008002000039247d1e740000040f00000014020000290000000001210049000009200010009c00000920010080410000006001100210000009200020009c00000920020080410000004002200210000000000121019f0000247e0001042e000009f801000041000000000010043f000009bd010000410000247f00010430000000c004000039000000400040043f000000800010043f0000007e04200210000000000434019f000000a00040043f0000001105000039000000000015041b0000001205000039000000000045041b000000c00010043f000000e00030043f000001000020043f0000000001000414000009200010009c0000092001008041000000c001100210000009c2011001c70000800d020000390000000103000039000009c30400004100000d280000013d000000000071041b000000000003004b00000e370000c13d00000a1001000041000000000010043f000009bd010000410000247f00010430001200000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000d8d0000c13d000000000100041a0000001202000029000000000021004b00000d0c0000a13d001400000002001d0000001401000029000000010110008a001400000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000d7a0000613d000009a80010019800000d0c0000c13d001409340010019b0000000002000411000000140020006c000010d50000c13d0000001201000029000000000010043f0000000601000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000013020000290000093406200197000000000101043b000000000201041a0000094302200197000000000262019f000000000021041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d02000039000000040300003900000a190400004100000014050000290000001207000029247d24730000040f000000010020019000001e1f0000613d00000d2b0000013d000d00000001001d0000000f01000029000000000001004b00000f890000c13d000009f901000041000000000010043f000009bd010000410000247f0001043000000a2f011001970000000000150435000000000004004b000000200200003900000000020060390000003f0120003900000a2d011001970000000007610019000000000017004b00000000010000390000000101004039000009de0070009c000010cf0000213d0000000100100190000010cf0000c13d000000400070043f0000000101800039000000000201041a000000010320019000000001092002700000007f0990618f0000001f0090008c00000000040000390000000104002039000000000442013f0000000100400190000000a80000c13d001400000008001d000e00000006001d000f00000005001d000d00000007001d000b00000009001d0000000004970436000c00000004001d000000000003004b000010450000613d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000b06000029000000000006004b00000000020000190000000c050000290000104b0000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000062004b00000df20000413d0000104b0000013d00000a2f011001970000000000150435000000000004004b000000200200003900000000020060390000003f0120003900000a2d011001970000000008710019000000000018004b00000000010000390000000101004039000009de0080009c000010cf0000213d0000000100100190000010cf0000c13d000000400080043f0000000101600039000000000201041a000000010320019000000001092002700000007f0990618f0000001f0090008c00000000040000390000000104002039000000000442013f0000000100400190000000a80000c13d001200000007001d001400000006001d001300000005001d001100000008001d000f00000009001d0000000004980436001000000004001d000000000003004b000010840000613d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000f06000029000000000006004b000000000200001900000010050000290000108a0000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000062004b00000e2f0000413d0000108a0000013d000003e80040008c000005290000813d000e00000006001d000f00000005001d001000000004001d001200000003001d000000000030043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b001100000001001d0000000801100039000000000101041a000000ff001001900000198f0000c13d00000011010000290000000c01100039001300000001001d000000000101041a000000000001004b000011a40000c13d00000011010000290000000601100039001400000001001d000000000101041a000000ff00100190000011be0000c13d00000011010000290000000b01100039000000000101041a00000a300010009c000009820000613d00000011020000290000000902200039000000000202041a000000000021004b000011030000813d000000000100041600000011030000290000000502300039000000000202041a001300000002001d0000000402300039000000000202041a000d09340020019c000015bc0000c13d000000130010006c000016660000c13d000000130000006b000016180000613d00000011020000290000000702200039000000000302041a000000000013001a000009820000413d0000000001130019000000000012041b000016180000013d000009a800100198000000130100002900000e850000c13d000000000010043f0000000601000039000000200010043f00000040020000390000000001000019247d24470000040f000000000101041a00000c700000013d00000a1a01000041000000000010043f000009bd010000410000247f00010430000009a8001001980000001301000029000010310000c13d000000000010043f0000000c01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400200043d001400000002001d000009c40020009c000010cf0000213d000000000101043b00000014030000290000004002300039000000400020043f000000000201041a00000000022304360000000101100039000000000101041a001200000001001d00000000001204350000001301000029247d20b80000040f000000400200043d000000a003200039000000400030043f001000000001001d0000008006200039000000000006043500000013030000290000000001060019000000090030008c0000000a4330011a000000f804400210000000010660008a0000000005060433000009c505500197000000000454019f000009c6044001c7000000000046043500000eaf0000213d001100000006001d00000000021200490000008102200039000000210110008a000f00000001001d0000000000210435000000400100043d000000a002100039000000400020043f0000008005100039000000000005043500000013060000290000000002050019000000090060008c0000000a3660011a000000f803300210000000010550008a0000000004050433000009c504400197000000000343019f000009c6033001c7000000000035043500000ec60000213d001300000005001d00000000012100490000008101100039000000210220008a000d00000002001d000000000012043500000014010000290000000002010433000000400100043d000000a003100039000000400030043f000000800610003900000000000604350000000003060019000000090020008c0000000a4220011a000000f804400210000000010660008a0000000005060433000009c505500197000000000454019f000009c6044001c7000000000046043500000ede0000213d001400000006001d00000000013100490000008101100039000000210230008a000c00000002001d0000000000120435000000400100043d000000a002100039000000400020043f0000001202000029000009c702200197000000800610003900000000000604350000000003060019000000090020008c0000000a4220011a000000f804400210000000010660008a0000000005060433000009c505500197000000000454019f000009c6044001c7000000000046043500000ef60000213d000e00000006001d00000000013100490000008101100039000000210230008a000b00000002001d0000000000120435000000400100043d000000a002100039000000400020043f00000012020000290000007e02200270000003ff0220018f000000800610003900000000000604350000000003060019000000090020008c0000000a4220011a000000f804400210000000010660008a0000000005060433000009c505500197000000000454019f000009c6044001c7000000000046043500000f0f0000213d001200000006001d00000000013100490000008101100039000000210230008a000a00000002001d0000000000120435000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f00000001002001900000198e0000613d000000400500043d000009c40050009c000010cf0000213d000000000101043b0000004002500039000000400020043f000009c80010009c000000040100003900000005010040390000000004150436000009ca01000041000009c9010040410000000000140435000000400200043d000000a001200039000000400010043f0000008001200039000000000001043500000010080000290000000003010019000000090080008c0000000a1880011a000000f806100210000000010130008a0000000007010433000009c507700197000000000676019f000009c6066001c7000000000061043500000f3e0000213d00000000023200490000008102200039000000210630008a0000000000260435000000400200043d0000002003200039000009cb0700004100000000007304350000002107200039000009cc08000041000000000087043500000032072000390000000f080000290000000008080433000000000008004b000000110c00002900000f620000613d0000000009000019000000000a790019000000000bc90019000000000b0b04330000000000ba04350000002009900039000000000089004b00000f5b0000413d00000000087800190000002207800039000009cd090000410000000000970435000009ce0700004100000000007804350000000207800039000009cf0900004100000000009704350000003607800039000009d00900004100000000009704350000000f0a00003900000000090a041a000000010b90019000000001079002700000007f0770618f0000001f0070008c000000000c000039000000010c002039000000000cc9013f0000000100c00190000000a80000c13d0000003f0880003900000000000b004b0000166a0000613d0000000000a0043f000000000007004b0000166c0000613d0000092b09000041000000000a000019000000000b8a0019000000000c09041a0000000000cb04350000000109900039000000200aa0003900000000007a004b00000f810000413d0000166c0000013d000000000010043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400400043d000000000101043b000000000101041a000009de01100198000010c30000c13d0000006002000039000002f40000013d000000000002004b0000103f0000c13d00000a1c01000041000000000010043f000009a2010000410000247f00010430000009a8001001980000001301000029000010310000c13d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000fcc0000c13d000000000100041a000000130010006c00000d0c0000a13d001400130000002d0000001401000029000000010110008a001400000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b00000fb90000613d000009a80010019800000d0c0000c13d00000934011001970000000002000411000000000021004b00000fe40000c13d000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f00000001002001900000198e0000613d000000000101043b000009c80010009c000016b90000413d000009ff01000041000000000010043f000009bd010000410000247f0001043000000a1f01000041000000000010043f000009bd010000410000247f00010430000009a8001001980000001301000029000010310000c13d000000000010043f0000000c01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000401041a0000000102100039000000000302041a000000000500001900000006065000c9000000000664022f0000003f006001900000112a0000613d000000290050008c000000010550003900000ffc0000413d0000003f003001900000112a0000613d00000fc0003001900000112a0000613d000009bb003001980000112a0000613d000009ba003001980000112a0000613d000009b9003001980000112a0000613d000009b8003001980000112a0000613d000009b7003001980000112a0000613d000009b6003001980000112a0000613d000009b5003001980000112a0000613d000009b4003001980000112a0000613d000009b3003001980000112a0000613d000009b2003001980000112a0000613d000009b1003001980000112a0000613d000009b0003001980000112a0000613d000009af003001980000112a0000613d000009ae003001980000112a0000613d000009ad003001980000112a0000613d000009ac003001980000112a0000613d000009ab003001980000112a0000613d000009aa003001980000112a0000613d000009a9003001980000112a0000613d000009bc01000041000000000010043f000009bd010000410000247f0001043000000a0001000041000000000010043f000009bd010000410000247f000104300000001201000029000000000001041b0000001401000029247d24300000040f00000000010000190000247e0001042e00000a0201000041000000000010043f000009bd010000410000247f000104300000006002200210000000000121019f0000094402000041000000000012041b00000000010000190000247e0001042e00000a2f012001970000000c0200002900000000001204350000000b0000006b000000200200003900000000020060390000003f0120003900000a2d011001970000000d02100029000000000012004b00000000010000390000000101004039000b00000002001d000009de0020009c0000001402000029000010cf0000213d0000000100100190000010cf0000c13d0000000b01000029000000400010043f0000000201200039000000000201041a000000010320019000000001042002700000007f0440618f000a00000004001d0000001f0040008c00000000040000390000000104002039000000000442013f0000000100400190000000a80000c13d0000000b040000290000000a050000290000000004540436000900000004001d000000000003004b0000122e0000613d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000a06000029000000000006004b00000000020000190000000905000029000012340000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000062004b0000107c0000413d000012340000013d00000a2f01200197000000100200002900000000001204350000000f0000006b000000200200003900000000020060390000003f0120003900000a2d011001970000001102100029000000000012004b00000000010000390000000101004039000f00000002001d000009de0020009c0000001402000029000010cf0000213d0000000100100190000010cf0000c13d0000000f01000029000000400010043f0000000201200039000000000201041a000000010320019000000001042002700000007f0440618f000e00000004001d0000001f0040008c00000000040000390000000104002039000000000442013f0000000100400190000000a80000c13d0000000f040000290000000e050000290000000004540436000d00000004001d000000000003004b0000126d0000613d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000e06000029000000000006004b00000000020000190000000d05000029000012730000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000062004b000010bb0000413d000012730000013d0000000e0010006b00000000020100190000000e02004029000e00000002001d0000000501200210001100000004001d00000000011400190000002001100039000000400010043f001200000001001d000009f60010009c000011070000a13d00000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f000104300000001401000029000000000010043f0000000701000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000000020004110000093402200197000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000ff0010019000000d930000c13d00000a1801000041000000000010043f000009bd010000410000247f0001043000000011010000290000000b01100039000000000101041a0000000d0010002a000009820000413d0000000d0110002900000011020000290000000902200039000000000202041a000000000021004b000011830000a13d00000a0901000041000000000010043f000009bd010000410000247f0001043000000012020000290000008001200039000000400010043f0000006001200039000000000001043500000040012000390000000000010435000000200120003900000000000104350000000000020435000000000100041a000000020010008c0000000001000019000011de0000413d0000000101000039001400000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000001004b0000130e0000c13d0000001401000029000000010110008a000011160000013d000000000001041b000000000002041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000203000039000009be04000041000000130500002900000d280000013d001400000001001d001100000000001d00000000010000190000001305000029000011400000013d001400000000001d0000001201000029000000400010043f000000010550003900000001010000390000000100100190000011470000613d0000000f0050006c0000147b0000613d00000011020000290000000e0020006c0000147b0000613d000000400100043d000009f60010009c000010cf0000213d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435001300000005001d000000000050043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400200043d000009f60020009c0000001305000029000010cf0000213d000000000101043b000000000101041a0000006003200039000000e80410027000000000004304350000004003200039000009a8001001980000000004000039000000010400c0390000000000430435000000a003100270000009de0330019700000020042000390000000000340435000009340110019700000000001204350000113b0000c13d000000000001004b00000000020100190000001402006029001400000002001d000000100120014f00000934001001980000113c0000c13d00000011010000290000000101100039001100000001001d00000005011002100000000d0110002900000000005104350000113c0000013d00000011010000290000000c01100039001300000001001d000000000101041a000000000001004b000012ac0000c13d00000011010000290000000501100039000000000101041a0014000d001000bd000000000001004b000011920000613d00000014011000f90000000d0010006c000009820000c13d000000000100041600000011020000290000000402200039000000000202041a001309340020019c000013670000c13d000000140010006c000016660000c13d000000000001004b000013ac0000613d00000011020000290000000702200039000000000302041a000000000013001a000009820000413d0000000001130019000000000012041b000013ac0000013d001400000000001d0000001302000029000000000020043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000014030000290000000001310019000000000101041a0000000002000411000000000121013f000009340010019800000e550000613d001400010030003d0000001302000029000000000102041a000000140010006b000011a60000413d000012c50000013d0000001201000029000000000010043f0000000e01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000000020004110000093402200197000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000ff00100190000006200000c13d00000e5b0000013d001300000001001d0000000105000039001000000000001d00000000010000190000001102000029000011ea0000013d001300000000001d00000011020000290000001201000029000000400010043f000000010550003900000001010000390000000100100190000011f10000613d0000000d0050006c000015b80000613d00000010030000290000000e0030006c000015b80000613d000000400100043d000009f60010009c000010cf0000213d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435001400000005001d000000000050043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400200043d000009f60020009c0000001405000029000010cf0000213d000000000101043b000000000101041a0000006003200039000000e80410027000000000004304350000004003200039000009a8001001980000000004000039000000010400c0390000000000430435000000a003100270000009de033001970000002004200039000000000034043500000934011001970000000000120435000011e40000c13d000000000001004b00000000020100190000001302006029001300000002001d0000000f0120014f00000934001001980000001102000029000011e60000c13d00000010010000290000000101100039001000000001001d000000050110021000000000012100190000000000510435000011e60000013d00000a2f01200197000000090200002900000000001204350000000a0000006b000000200200003900000000020060390000003f0120003900000a2d011001970000000b02100029000000000012004b00000000010000390000000101004039000a00000002001d000009de0020009c0000001402000029000010cf0000213d0000000100100190000010cf0000c13d0000000a01000029000000400010043f0000000301200039000000000201041a000000010320019000000001042002700000007f0440618f001400000004001d0000001f0040008c00000000040000390000000104002039000000000442013f0000000100400190000000a80000c13d0000000a0400002900000014050000290000000004540436000800000004001d000000000003004b000014820000613d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000001406000029000000000006004b00000000020000190000000805000029000014880000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000062004b000012650000413d000014880000013d00000a2f012001970000000d0200002900000000001204350000000e0000006b000000200200003900000000020060390000003f0120003900000a2d011001970000000f02100029000000000012004b00000000010000390000000101004039000e00000002001d000009de0020009c0000001402000029000010cf0000213d0000000100100190000010cf0000c13d0000000e01000029000000400010043f0000000301200039000000000201041a000000010320019000000001042002700000007f0440618f000c00000004001d0000001f0040008c00000000040000390000000104002039000000000442013f0000000100400190000000a80000c13d0000000e040000290000000c050000290000000004540436000b00000004001d000000000003004b0000150f0000613d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000c06000029000000000006004b00000000020000190000000b05000029000015150000613d000000000101043b00000000020000190000000003250019000000000401041a000000000043043500000001011000390000002002200039000000000062004b000012a40000413d000015150000013d001400000000001d0000001302000029000000000020043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000014030000290000000001310019000000000101041a0000000002000411000000000121013f0000093400100198000011890000613d001400010030003d0000001302000029000000000102041a000000140010006b000012ae0000413d00000a0701000041000000000010043f000009bd010000410000247f00010430000000400100043d000009f60010009c000010cf0000213d0000008002100039000000400020043f00000060021000390000000000020435000000400210003900000000000204350000002002100039000000000002043500000000000104350000001401000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400200043d000009f60020009c000010cf0000213d000000000101043b000000000101041a0000008003200039000000400030043f0000006003200039000000e80410027000000000004304350000004003200039000009a8001001980000000004000039000000010400c0390000000000430435000000a003100270000009de033001970000002004200039000000000034043500000934011001970000000000120435001400000000001d001400000001601d000011370000013d0000000f01000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000001402100029000000000021004b000004360000813d000000000001041b0000000101100039000000000021004b000013090000413d000004360000013d000000400100043d000009f60010009c000010cf0000213d0000008002100039000000400020043f00000060021000390000000000020435000000400210003900000000000204350000002002100039000000000002043500000000000104350000001401000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400200043d000009f60020009c000010cf0000213d000000000101043b000000000101041a0000008003200039000000400030043f0000006003200039000000e80410027000000000004304350000004003200039000009a8001001980000000004000039000000010400c0390000000000430435000000a003100270000009de033001970000002004200039000000000034043500000934011001970000000000120435001300000000001d001300000001601d000011df0000013d0000000005000019000000050150021000000000014100190000000201100367000000000101043b000009340010009c00001e1f0000213d001300000001001d001400000005001d0000000f02000029000000000102041a000009de0010009c000010cf0000213d001200000001001d0000000101100039000000000012041b000000000020043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f0000000100200190000000110300002900000010040000290000001405000029000000130600002900001e1f0000613d000000000101043b0000001201100029000000000201041a0000094302200197000000000262019f000000000021041b0000000105500039000000000035004b000013400000413d0000043a0000013d000000000001004b000016660000c13d000000140000006b000013ac0000613d000000400100043d000e00000001001d0000001401000029000000600010043f0000000001000410000000400010043f000000000100041100000060011002100000002c0010043f00000a03010000410000000c0010043f0000000001000414000009200010009c0000092001008041000000c00110021000000a04011001c70000001302000029247d24730000040f000f00000002001d00000060021002700000092002200197000000200020008c001000000002001d00000020020080390000001f0320018f00000020022001900000138c0000613d000000000401034f0000000005000019000000004604043c0000000005650436000000000025004b000013880000c13d000000000003004b000013990000613d000000000421034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f0000000000320435000100100000002f0003000000010355000000000100043d000000010010008c000000000100003900000001010060390000000f0110017f0000000100100190000017e90000613d000000600000043f0000000e01000029000000400010043f00000011010000290000000701100039000000000201041a000000140020002a000009820000413d0000001402200029000000000021041b0000000d0000006b000016ac0000613d0000000001000411001309340010019b000f00000000001d0000001201000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b001000000001001d000000000100041a001400000001001d000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f00000001002001900000198e0000613d000000000101043b001100000001001d0000001401000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000001102000029000000a0022002100000001303000029000000000232019f000009f0022001c7000000000101043b000000000021041b000000000030043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000201041a000009f10220009a000000000021041b000000130000006b000016620000613d0000001401000029001100010010003d000000000100001900000001001001900000140a0000c13d0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000403000039000009f204000041000000000500001900000013060000290000001407000029247d24730000040f00000001002001900000000101000039000013f80000c13d00001e1f0000013d0000001101000029000000000010041b000000400200043d000009c40020009c000010cf0000213d0000004001200039000000400010043f001100000002001d0000000001020436000e00000001001d00000000000104350000001401000029000000000010043f0000000c01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000011020000290000000002020433000000000101043b000000000021041b00000001011000390000000e020000290000000002020433000000000021041b0000001401000029000000000010043f0000000d01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000001202000029000000000021041b00000010010000290000000b01100039000000000201041a000009de0020009c000010cf0000213d001100000002001d0000000102200039000000000021041b000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000011011000290000001402000029000000000021041b0000000a01000039000000200010043f000009f301000041000000000101041a000009de0010009c000010cf0000213d001100000001001d0000000101100039000009f302000041000000000012041b000000000020043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000011011000290000001406000029000000000061041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000403000039000009f40400004100000012050000290000001307000029247d24730000040f000000010020019000001e1f0000613d0000000f020000290000000102200039000f00000002001d0000000d0020006c000013b10000413d000016ac0000013d0000000d0100002900000011020000290000000000210435000000400100043d001400000001001d0000000d02000029000002f60000013d00000a2f0120019700000008020000290000000000120435000000140000006b000000200200003900000000020060390000003f0120003900000a2d021001970000000a01200029000000000021004b00000000020000390000000102004039000009de0010009c0000000f080000290000000e03000029000010cf0000213d0000000100200190000010cf0000c13d000000400010043f00000180020000390000000002210436000001800410003900000000030304330000000000340435000001a004100039000000000003004b000014a50000613d000000000500001900000000064500190000000007580019000000000707043300000000007604350000002005500039000000000035004b0000149e0000413d000000000543001900000000000504350000001f0330003900000a2d033001970000000004430019000000000314004900000000003204350000000d0200002900000000030204330000000002340436000000000003004b0000000c07000029000014ba0000613d000000000400001900000000052400190000000006470019000000000606043300000000006504350000002004400039000000000034004b000014b30000413d000000000423001900000000000404350000001f0330003900000a2d0330019700000000022300190000000003120049000000400410003900000000003404350000000b0300002900000000030304330000000002320436000000000003004b0000000907000029000014d00000613d000000000400001900000000052400190000000006470019000000000606043300000000006504350000002004400039000000000034004b000014c90000413d000000000423001900000000000404350000001f0330003900000a2d0330019700000000022300190000000003120049000000600410003900000000003404350000000a0300002900000000030304330000000002320436000000000003004b0000000807000029000014e60000613d000000000400001900000000052400190000000006470019000000000606043300000000006504350000002004400039000000000034004b000014df0000413d000000000423001900000000000404350000016004100039000000100500002900000000005404350000001106000029000000280460027000000934044001970000014005100039000000000045043500000018046002700000ffff0440018f00000120051000390000000000450435000009e4006001980000000004000039000000010400c039000001000510003900000000004504350000ff00006001900000000004000039000000010400c039000000e0051000390000000000450435000000ff006001900000000004000039000000010400c039000000c0051000390000000000450435000000a0041000390000001305000029000000000054043500000012040000290000093404400197000000800510003900000000004504350000001f0330003900000a2d0330019700000000021200490000000002320019000015b00000013d00000a2f012001970000000b0200002900000000001204350000000c0000006b000000200200003900000000020060390000003f0120003900000a2d021001970000000e01200029000000000021004b00000000020000390000000102004039000009de0010009c000000130f0000290000001403000029000000120a000029000010cf0000213d0000000100200190000010cf0000c13d000000400010043f0000000a02300039000000000802041a0000000902300039000000000602041a0000000802300039000000000702041a0000000702300039000000000502041a0000000602300039000000000402041a0000000502300039000000000202041a0000000403300039000000000303041a000001e0090000390000000009910436000001e00b100039000000000a0a04330000000000ab0435000002000b10003900000000000a004b000015410000613d000000000c000019000000000dbc0019000000000ecf0019000000000e0e04330000000000ed0435000000200cc000390000000000ac004b0000153a0000413d000000000cba001900000000000c04350000001f0aa0003900000a2d0aa00197000000000bba0019000000000a1b00490000000000a904350000001109000029000000000a0904330000000009ab043600000000000a004b000000100e000029000015560000613d000000000b000019000000000c9b0019000000000dbe0019000000000d0d04330000000000dc0435000000200bb000390000000000ab004b0000154f0000413d000000000b9a001900000000000b04350000001f0aa0003900000a2d0aa0019700000000099a0019000000000a190049000000400b1000390000000000ab04350000000f0a000029000000000a0a04330000000009a9043600000000000a004b0000000d0e0000290000156c0000613d000000000b000019000000000c9b0019000000000dbe0019000000000d0d04330000000000dc0435000000200bb000390000000000ab004b000015650000413d000000000b9a001900000000000b04350000001f0aa0003900000a2d0aa0019700000000099a0019000000000a190049000000600b1000390000000000ab04350000000e0a000029000000000a0a04330000000009a9043600000000000a004b0000000b0e000029000015820000613d000000000b000019000000000c9b0019000000000dbe0019000000000d0d04330000000000dc0435000000200bb000390000000000ab004b0000157b0000413d000000000b9a001900000000000b04350000093408800197000001c00b10003900000000008b0435000001a0081000390000000000680435000000ff007001900000000006000039000000010600c0390000018007100039000000000067043500000160061000390000000000560435000000280540027000000934055001970000014006100039000000000056043500000018054002700000ffff0550018f00000120061000390000000000560435000009e4004001980000000005000039000000010500c039000001000610003900000000005604350000ff00004001900000000005000039000000010500c039000000e0061000390000000000560435000000ff004001900000000004000039000000010400c039000000c0051000390000000000450435000000a00410003900000000002404350000093402300197000000800310003900000000002304350000001f02a0003900000a2d0220019700000000031900490000000002230019000009200020009c00000920020080410000006002200210000009200010009c00000920010080410000004001100210000000000112019f0000247e0001042e00000010010000290000000000120435000000400400043d000002f40000013d000000000001004b000016660000c13d000000130000006b000016180000613d000000400100043d000a00000001001d0000001301000029000000600010043f0000000001000410000000400010043f000000000100041100000060011002100000002c0010043f00000a03010000410000000c0010043f0000000001000414000009200010009c0000092001008041000000c00110021000000a04011001c70000000d02000029247d24730000040f000c00000002001d00000060021002700000092002200197000000200020008c000b00000002001d00000020020080390000001f0320018f0000002002200190000015e10000613d000000000401034f0000000005000019000000004604043c0000000005650436000000000025004b000015dd0000c13d000000000003004b000015ee0000613d000000000421034f0000000303300210000000000502043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f00000000003204350001000b0000002f0003000000010355000000000100043d000000010010008c000000000100003900000001010060390000000c0110017f00000001001001900000160e0000c13d000009ec0100004100000000001004430000000d0100002900000004001004430000000001000414000009200010009c0000092001008041000000c001100210000009ed011001c70000800202000039247d24780000040f00000001002001900000198e0000613d000000000101043b000000000001004b000000000100003900000001010060390000000b001001b0000000000100003900000001010060390000000c0110017f0000000100100190000018000000613d000000600000043f0000000a01000029000000400010043f00000011010000290000000701100039000000000201041a000000130020002a000009820000413d0000001302200029000000000021041b0000001401000029000000000101041a000000ff00100190000017140000c13d0000001201000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b001100000001001d000000000100041a001400000001001d000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f00000001002001900000198e0000613d000000000101043b001300000001001d0000001401000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000200041100000934032001970000001302000029000000a002200210000000000232019f000009f0022001c7000000000101043b000000000021041b001300000003001d000000000030043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000201041a000009f10220009a000000000021041b000000130000006b000019930000c13d00000a0e01000041000000000010043f000009bd010000410000247f0001043000000a0b01000041000000000010043f000009bd010000410000247f0001043000000a2f0990019700000000009804350000000008870019000009ce0700004100000000007804350000000207800039000009d1090000410000000000970435000000100a00003900000000090a041a000000010b90019000000001079002700000007f0770618f0000001f0070008c000000000c000039000000010c002039000000000cc9013f0000000100c00190000000a80000c13d000000130880003900000000000b004b000017350000613d0000000000a0043f000000000007004b000017370000613d0000093109000041000000000a000019000000000b8a0019000000000c09041a0000000000cb04350000000109900039000000200aa0003900000000007a004b000016850000413d000017370000013d00000a0c01000041000000000010043f0000003201000039000000040010043f00000a0d010000410000247f000104300000000b01000029000000000101041a00000a2f0110019700000001011001bf0000000b02000029000000000012041b000000400100043d00000012020000290000000000210435000009200010009c000009200100804100000040011002100000000002000414000009200020009c0000092002008041000000c002200210000000000112019f00000926011001c70000800d02000039000000020300003900000a26040000410000000c05000029247d24730000040f000000010020019000001e1f0000613d0000000001000412001500000001001d000080020100003900000024030000390000000004000415000000150440008a0000000504400210000009ec02000041247d245c0000040f000009e802000041000000000012041b00000000010000190000247e0001042e0000001201000029000003e70010008c000005290000213d0000001301000029000000000010043f0000000d01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000400100043d001400000001001d000009c40010009c000010cf0000213d00000014020000290000004001200039000000400010043f0000001001000029000000000312043600000012010000290000007e0110021000000011011001af000f00000003001d00000000001304350000001301000029000000000010043f0000000c01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000014020000290000000002020433000000000101043b000000000021041b00000001011000390000000f020000290000000002020433000000000021041b000000400100043d00000040021000390000001203000029000000000032043500000020021000390000001103000029000000000032043500000010020000290000000000210435000009200010009c000009200100804100000040011002100000000002000414000009200020009c0000092002008041000000c002200210000000000112019f000009fd011001c70000800d020000390000000203000039000009fe040000410000001305000029247d24730000040f000000010020019000001e1f0000613d000016ac0000013d0000001201000029000000000010043f0000000e01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000000020004110000093402200197000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000201041a00000a2f0220019700000001022001bf000000000021041b0000161c0000013d00000a2f09900197000000000098043500000000078700190000000d080000290000000008080433000000000008004b000000130c000029000017450000613d0000000009000019000000000a790019000000000bc90019000000000b0b04330000000000ba04350000002009900039000000000089004b0000173e0000413d0000000007780019000009ce0800004100000000008704350000000208700039000009d20900004100000000009804350000001008700039000009d309000041000000000098043500000030077000390000000c080000290000000008080433000000000008004b000000140c0000290000175c0000613d0000000009000019000000000a790019000000000bc90019000000000b0b04330000000000ba04350000002009900039000000000089004b000017550000413d0000000008780019000009d40700004100000000007804350000000309800039000009d50a0000410000000000a9043500000023088000390000000b090000290000000009090433000000000009004b0000000e0d000029000017700000613d000000000a000019000000000b8a0019000000000cda0019000000000c0c04330000000000cb0435000000200aa0003900000000009a004b000017690000413d00000000088900190000002309800039000009d60a0000410000000000a9043500000000007804350000000307800039000009d709000041000000000097043500000027078000390000000a080000290000000008080433000000000008004b000000120c000029000017860000613d0000000009000019000000000a790019000000000bc90019000000000b0b04330000000000ba04350000002009900039000000000089004b0000177f0000413d00000000087800190000002307800039000009d8090000410000000000970435000009d40700004100000000007804350000000309800039000009d90a0000410000000000a9043500000024088000390000000005050433000000000005004b0000179b0000613d0000000009000019000000000a890019000000000b490019000000000b0b04330000000000ba04350000002009900039000000000059004b000017940000413d000000000485001900000000007404350000000305400039000009da07000041000000000075043500000023044000390000000005060433000000000005004b000017ac0000613d000000000600001900000000074600190000000008160019000000000808043300000000008704350000002006600039000000000056004b000017a50000413d0000000001450019000009db0400004100000000004104350000000204100039000009dc0500004100000000005404350000000304100039000009dd05000041000000000054043500000000012100490000001c0410008a0000000000420435000000230110003900000a2d041001970000000001240019000000000041004b00000000040000390000000104004039000009de0010009c000010cf0000213d0000000100400190000010cf0000c13d000000400010043f0000000005020433000000000005004b000018080000c13d00000000030100190000006001000039000018490000013d000000400100043d001400000001001d000009ec010000410000000000100443000000130100002900000004001004430000000001000414000009200010009c0000092001008041000000c001100210000009ed011001c70000800202000039247d24780000040f00000001002001900000198e0000613d000000000101043b000000000001004b0000185c0000c13d0000000d010000290000000001010433000000400010008c000018ab0000613d000000410010008c0000016c0000c13d0000000d0200002900000060012000390000000001010433000000f801100270000000200010043f00000040012000390000000001010433000018b20000013d000009ec010000410000000000100443000000130100002900000004001004430000000001000414000009200010009c0000092001008041000000c001100210000009ed011001c70000800202000039247d24780000040f00000001002001900000198e0000613d000000010200008a0000000f0220014f000000000101043b000000000001004b0000000001000039000000010100603900000010001001b0000000010220c1bf0000000100200190000013a20000613d00000a0a01000041000000000010043f000009a2010000410000247f0001043000000a2301000041000000000010043f000009a2010000410000247f00010430000009df040000410000001f0040043f000009e0040000410000003f0040043f00000000063500190000000007060433000000000006043500000020031000390000000204500039000000030440011a000000020440021000000000081400190000002009800039000000000a00043d000009c50aa001970000000302200039000000000b020433000000120cb002700000003f0cc0018f000000000c0c0433000000f80cc00210000000000aca019f0000000000a0043f0000000c0ab002700000003f0aa0018f000000000a0a0433000000f80aa00210000000010c00043d000009c50cc00197000000000aac019f0000000100a0043f000000060ab002700000003f0aa0018f000000000a0a0433000000f80aa00210000000020c00043d000009c50cc00197000000000aac019f0000000200a0043f0000003f0ab0018f000000000a0a0433000000f80aa00210000000030b00043d000009c50bb00197000000000aab019f0000000300a0043f000000000a00043d0000000000a304350000000403300039000000000093004b000018150000413d00000000007604350000004002800039000000400020043f000000032050011a000000000002004b0000000005000019000000ff0220c18f000000020520c1190000000002530049000009e105000041000000000052043500000000000304350000000000410435000000400300043d0000000004030019001400000003001d0000002002300039000009e20300004100000000003204350000003d02400039247d237b0000040f00000014030000290000000002310049000000200120008a00000000001304350000000001030019247d1ed80000040f000000400100043d001300000001001d0000001402000029247d1e740000040f000000130200002900000d3a0000013d000000140300002900000024043000390000000401300039000009ee0200004100000000002304350000000b0200002900000000002104350000004001000039000e00000004001d00000000001404350000000d070000290000000001070433000000200210003a000018740000613d00000014030000290000004403300039000000000400001900000000054300190000000006740019000000000606043300000000006504350000002004400039000000000024004b0000186d0000413d0000001402000029000009200020009c000009200200804100000040022002100000006401100039000009200010009c00000920010080410000006001100210000000000121019f0000000002000414000009200020009c0000092002008041000000c002200210000000000112019f0000001302000029247d24780000040f00000060031002700000092003300197000000200030008c000000200400003900000000040340190000001f0540018f00000020064001900000000e04600029000018930000613d000000000701034f0000000e08000029000000007907043c0000000008980436000000000048004b0000188f0000c13d000000000005004b000018a00000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000e010000290000000001010433000009ee0010009c00000000010000390000000101006039000000000112016f00000001001001900000016c0000613d000018e60000013d0000000d0100002900000040011000390000000001010433000000ff021002700000001b02200039000000200020043f000009ef01100197000000600010043f0000000b01000029000000000010043f0000000c010000290000000001010433000000400010043f0000000001000414000009200010009c0000092001008041000000c001100210000009e3011001c70000000102000039247d24780000040f000000010900003900000060031002700000092003300197000000200030008c000000200400003900000000040340190000001f0540018f000000200640019000000001046001bf000018ce0000613d000000000701034f000000007807043c0000000009890436000000000049004b000018ca0000c13d000000010220018f000000000005004b000018dc0000613d000000000661034f0000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f00000000005404350003000000010355000100000003001f0000000001020433000000600000043f0000001402000029000000400020043f0000000a0110014f0000006001100210000000000013004b0000016c0000a13d0000001201000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000e00000001001d0000000801100039000000000101041a000000ff001001900000198f0000c13d0000000e010000290000000c01100039001300000001001d000000000101041a000000000001004b00001a1a0000c13d0000000e010000290000000601100039001400000001001d000000000101041a000000ff0010019000001a340000c13d0000000e010000290000000b01100039000000000101041a00000a300010009c000009820000613d0000000e020000290000000902200039000000000202041a000000000021004b000011030000813d0000001401000029000000000101041a000000ff00100190000019330000613d0000001201000029000000000010043f0000000e01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000000020004110000093402200197000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000201041a00000a2f0220019700000001022001bf000000000021041b0000001201000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000e00000001001d000000000100041a001400000001001d000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f00000001002001900000198e0000613d000000000101043b001300000001001d0000001401000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000200041100000934032001970000001302000029000000a002200210000000000232019f000009f0022001c7000000000101043b000000000021041b001300000003001d000000000030043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000201041a000009f10220009a000000000021041b000000130000006b000016620000613d0000001401000029000d00010010003d0000000001000019000000010010019000001acb0000c13d0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000403000039000009f204000041000000000500001900000013060000290000001407000029247d24730000040f000000010020019000000001010000390000197c0000c13d00001e1f0000013d000000000001042f00000a2001000041000000000010043f000009bd010000410000247f000104300000001401000029000d00010010003d00000000010000190000000100100190000019a80000c13d0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000403000039000009f204000041000000000500001900000013060000290000001407000029247d24730000040f00000001002001900000000101000039000019960000c13d00001e1f0000013d0000000d01000029000000000010041b000000400100043d000d00000001001d000009c40010009c000010cf0000213d0000000d020000290000004001200039000000400010043f0000000e01000029000000000312043600000010010000290000007e011002100000000f011001af001000000003001d00000000001304350000001401000029000000000010043f0000000c01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000d020000290000000002020433000000000101043b000000000021041b000000010110003900000010020000290000000002020433000000000021041b0000001401000029000000000010043f0000000d01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000001202000029000000000021041b00000011010000290000000b01100039000000000201041a001100000002001d000009de0020009c000010cf0000213d00000011020000290000000102200039000000000021041b000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000011011000290000001402000029000000000021041b0000000a01000039000000200010043f000009f301000041000000000201041a001100000002001d000009de0020009c000010cf0000213d00000011020000290000000102200039000000000021041b000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000011011000290000001406000029000000000061041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000403000039000009f40400004100000012050000290000001307000029247d24730000040f000000010020019000001e1f0000613d000016ac0000013d001400000000001d0000001302000029000000000020043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000014030000290000000001310019000000000101041a0000000002000411000000000121013f0000093400100198000018ff0000613d001400010030003d0000001302000029000000000102041a000000140010006b00001a1c0000413d000012c50000013d0000001201000029000000000010043f0000000e01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000000020004110000093402200197000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000000000101041a000000ff00100190000006200000c13d000019050000013d0000000501000029000009400110009a00000a310010009c00001a5c0000213d00000a1601000041000000000010043f000009bd010000410000247f000104300000000901000039000000000201041a000400000002001d000000010220003a000009820000613d000000000021041b0000000401000029000000000010043f0000000a01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b000300000001001d000000000101041a000000010010019000000001021002700000007f0220618f000200000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000000201000029000000200010008c00001a9b0000413d0000000301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000014030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000002010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00001a9b0000813d000000000002041b0000000102200039000000000012004b00001a970000413d0000001401000029000000200010008c00001aaf0000413d0000000301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000001402200180000000000101043b00001b310000c13d000000000300001900001b3b0000013d000000140000006b000000000100001900001b4a0000613d0000001403000029000000030130021000000a300110027f00000a300110016700000013020000290000000202200367000000000202043b000000000112016f0000000102300210000000000121019f00001b4a0000013d000000130000006b000000000100001900001bb30000613d0000001303000029000000030130021000000a300110027f00000a300110016700000012020000290000000202200367000000000202043b000000000112016f0000000102300210000000000121019f00001bb30000013d0000000d01000029000000000010041b000000400100043d000d00000001001d000009c40010009c000010cf0000213d0000000d020000290000004001200039000000400010043f0000000f01000029000000000312043600000011010000290000007e0110021000000010011001af001100000003001d00000000001304350000001401000029000000000010043f0000000c01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000d020000290000000002020433000000000101043b000000000021041b000000010110003900000011020000290000000002020433000000000021041b0000001401000029000000000010043f0000000d01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b0000001202000029000000000021041b0000000e010000290000000b01100039000000000201041a001100000002001d000009de0020009c000010cf0000213d00000011020000290000000102200039000000000021041b000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000011011000290000001402000029000000000021041b0000000a01000039000000200010043f000009f301000041000000000201041a001100000002001d000009de0020009c000010cf0000213d00000011020000290000000102200039000000000021041b000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000000101043b00000011011000290000001406000029000000000061041b000000000100041400001a0d0000013d000000020400036700000000030000190000001305300029000000000554034f000000000505043b000000000051041b00000001011000390000002003300039000000000023004b00001b330000413d000000140020006c00001b470000813d00000014020000290000000302200210000000f80220018f00000a300220027f00000a300220016700000013033000290000000203300367000000000303043b000000000223016f000000000021041b0000001401000029000000010110021000000001011001bf0000000302000029000000000012041b0000000101200039000200000001001d000000000101041a000000010010019000000001021002700000007f0220618f000100000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000000101000029000000200010008c00001b780000413d0000000201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000012030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000001010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00001b780000813d000000000002041b0000000102200039000000000012004b00001b740000413d0000001201000029000000200010008c00001b8c0000413d0000000201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000001202200180000000000101043b00001c030000c13d000000000300001900001c0d0000013d000000120000006b000000000100001900001c1c0000613d0000001203000029000000030130021000000a300110027f00000a300110016700000011020000290000000202200367000000000202043b000000000112016f0000000102300210000000000121019f00001c1c0000013d000000020400036700000000030000190000001205300029000000000554034f000000000505043b000000000051041b00000001011000390000002003300039000000000023004b00001b9c0000413d000000130020006c00001bb00000813d00000013020000290000000302200210000000f80220018f00000a300220027f00000a300220016700000012033000290000000203300367000000000303043b000000000223016f000000000021041b0000001301000029000000010110021000000001011001bf0000000302000029000000000012041b0000000101200039001300000001001d000000000101041a000000010010019000000001021002700000007f0220618f001200000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000001201000029000000200010008c00001be10000413d0000001301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000011030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000012010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00001be10000813d000000000002041b0000000102200039000000000012004b00001bdd0000413d0000001101000029000000200010008c00001bf50000413d0000001301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000001102200180000000000101043b00001c6d0000c13d000000000300001900001c770000013d000000110000006b000000000100001900001c860000613d0000001103000029000000030130021000000a300110027f00000a300110016700000010020000290000000202200367000000000202043b000000000112016f0000000102300210000000000121019f00001c860000013d000000020400036700000000030000190000001105300029000000000554034f000000000505043b000000000051041b00000001011000390000002003300039000000000023004b00001c050000413d000000120020006c00001c190000813d00000012020000290000000302200210000000f80220018f00000a300220027f00000a300220016700000011033000290000000203300367000000000303043b000000000223016f000000000021041b0000001201000029000000010110021000000001011001bf0000000202000029000000000012041b00000003010000290000000201100039001200000001001d000000000101041a000000010010019000000001021002700000007f0220618f001100000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000001101000029000000200010008c00001c4b0000413d0000001201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d00000010030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000011010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00001c4b0000813d000000000002041b0000000102200039000000000012004b00001c470000413d0000001001000029000000200010008c00001c5f0000413d0000001201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000001002200180000000000101043b00001cd70000c13d000000000300001900001ce10000013d000000100000006b000000000100001900001cf00000613d0000001003000029000000030130021000000a300110027f00000a30011001670000000f020000290000000202200367000000000202043b000000000112016f0000000102300210000000000121019f00001cf00000013d000000020400036700000000030000190000001005300029000000000554034f000000000505043b000000000051041b00000001011000390000002003300039000000000023004b00001c6f0000413d000000110020006c00001c830000813d00000011020000290000000302200210000000f80220018f00000a300220027f00000a300220016700000010033000290000000203300367000000000303043b000000000223016f000000000021041b0000001101000029000000010110021000000001011001bf0000001302000029000000000012041b00000003010000290000000201100039001300000001001d000000000101041a000000010010019000000001021002700000007f0220618f001200000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000001201000029000000200010008c00001cb50000413d0000001301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000f030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000012010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00001cb50000813d000000000002041b0000000102200039000000000012004b00001cb10000413d0000000f01000029000000200010008c00001cc90000413d0000001301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000000f02200180000000000101043b00001dc30000c13d000000000300001900001dcd0000013d0000000f0000006b000000000100001900001ddc0000613d0000000f03000029000000030130021000000a300110027f00000a30011001670000000e020000290000000202200367000000000202043b000000000112016f0000000102300210000000000121019f00001ddc0000013d000000020400036700000000030000190000000f05300029000000000554034f000000000505043b000000000051041b00000001011000390000002003300039000000000023004b00001cd90000413d000000100020006c00001ced0000813d00000010020000290000000302200210000000f80220018f00000a300220027f00000a30022001670000000f033000290000000203300367000000000303043b000000000223016f000000000021041b0000001001000029000000010110021000000001011001bf0000001202000029000000000012041b00000003010000290000000301100039001200000001001d000000000101041a000000010010019000000001021002700000007f0220618f001100000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000001101000029000000200010008c00001d1f0000413d0000001201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000e030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000011010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00001d1f0000813d000000000002041b0000000102200039000000000012004b00001d1b0000413d0000000e01000029000000200010008c00001d4b0000413d0000001201000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000000e032001800000000202000367000000000101043b000000000400001900001d3b0000613d0000000d05400029000000000552034f000000000505043b000000000051041b00000001011000390000002004400039000000000034004b00001d330000413d0000000e0030006c00001d470000813d0000000e030000290000000303300210000000f80330018f00000a300330027f00000a30033001670000000d04400029000000000442034f000000000404043b000000000334016f000000000031041b0000000e01000029000000010110021000000001011001bf00001d590000013d00000002020003670000000e0000006b00001d500000c13d000000000100001900001d590000013d0000000e04000029000000030140021000000a300110027f00000a30011001670000000d03200360000000000303043b000000000113016f0000000103400210000000000131019f00000000030004110000001204000029000000000014041b0000000c01000029000009340110019700000003070000290000000404700039000000000504041a0000094305500197000000000115019f000000000014041b00000005017000390000000a04000029000000000041041b000000080000006b00000940010000410000000001006019000000090000006b000001000110c1bf00000007040000290000001804400210000009fa04400197000000000141019f000000060400002900000028044002100000093d04400197000000000141019f0000000604700039000000000504041a000009fb05500197000000000151019f0000000b011001af000000000014041b00000009017000390000000504000029000000000041041b00000934063001970000000a01700039000000000301041a0000094303300197000000000363019f000000000031041b00000013052003600000002002000039000000400100043d00000000022104360000001403000029000000000032043500000a2d073001980000001f0830018f0000004003100039000000000473001900001d940000613d000000000905034f000000000a030019000000009b09043c000000000aba043600000000004a004b00001d900000c13d000000000008004b00001da10000613d000000000575034f0000000307800210000000000804043300000000087801cf000000000878022f000000000505043b0000010007700089000000000575022f00000000057501cf000000000585019f000000000054043500000014050000290000001f0450003900000a2d02400197000000000353001900000000000304350000004002200039000009200020009c00000920020080410000006002200210000009200010009c00000920010080410000004001100210000000000121019f0000000002000414000009200020009c0000092002008041000000c002200210000000000112019f00000936011001c70000800d02000039000000030300003900000a15040000410000000405000029247d24730000040f000000010020019000001e1f0000613d000000400100043d00000004020000290000000000210435000009200010009c00000920010080410000004001100210000009c0011001c70000247e0001042e000000020400036700000000030000190000000e05300029000000000554034f000000000505043b000000000051041b00000001011000390000002003300039000000000023004b00001dc50000413d0000000f0020006c00001dd90000813d0000000f020000290000000302200210000000f80220018f00000a300220027f00000a30022001670000000e033000290000000203300367000000000303043b000000000223016f000000000021041b0000000f01000029000000010110021000000001011001bf0000001302000029000000000012041b00000003010000290000000301100039001300000001001d000000000101041a000000010010019000000001021002700000007f0220618f001200000002001d0000001f0020008c00000000020000390000000102002039000000000121013f0000000100100190000000a80000c13d0000001201000029000000200010008c00001e0b0000413d0000001301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d0000000d030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000012010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00001e0b0000813d000000000002041b0000000102200039000000000012004b00001e070000413d0000000d01000029000000200010008c00001e210000413d0000001301000029000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001e1f0000613d000000200200008a0000000d02200180000000000101043b00001e2f0000c13d000000000300001900001e390000013d00000000010000190000247f000104300000000d0000006b000000000100001900001e480000613d0000000d03000029000000030130021000000a300110027f00000a30011001670000000c020000290000000202200367000000000202043b000000000112016f0000000102300210000000000121019f00001e480000013d000000020400036700000000030000190000000c05300029000000000554034f000000000505043b000000000051041b00000001011000390000002003300039000000000023004b00001e310000413d0000000d0020006c00001e450000813d0000000d020000290000000302200210000000f80220018f00000a300220027f00000a30022001670000000c033000290000000203300367000000000303043b000000000223016f000000000021041b0000000d01000029000000010110021000000001011001bf0000001302000029000000000012041b0000000b01000029000009340110019700000003040000290000000402400039000000000302041a0000094303300197000000000113019f000000000012041b00000005014000390000000902000029000000000021041b000000070000006b00000940010000410000000001006019000000080000006b000001000110c1bf00000006020000290000001802200210000009fa02200197000000000121019f000000050200002900000028022002100000093d02200197000000000121019f0000000602400039000000000302041a000009fb03300197000000000131019f0000000a011001af000000000012041b00000009014000390000000402000029000000000021041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000203000039000009fc040000410000021e0000013d00000020030000390000000004310436000000003202043400000000002404350000004001100039000000000002004b00001e830000613d000000000400001900000000051400190000000006430019000000000606043300000000006504350000002004400039000000000024004b00001e7c0000413d000000000312001900000000000304350000001f0220003900000a2d022001970000000001120019000000000001042d000000000301001900000000040104330000000001420436000000000004004b00001e950000613d00000000020000190000002003300039000000000503043300000000015104360000000102200039000000000042004b00001e8f0000413d000000000001042d00000020030000390000000004310436000000000302043300000000003404350000004001100039000000000003004b00001ea40000613d00000000040000190000002002200039000000000502043300000000015104360000000104400039000000000034004b00001e9e0000413d000000000001042d000009ef0010009c00001eb50000213d000000630010008c00001eb50000a13d00000002030003670000000401300370000000000101043b000009340010009c00001eb50000213d0000002402300370000000000202043b000009340020009c00001eb50000213d0000004403300370000000000303043b000000000001042d00000000010000190000247f00010430000000000301001900000000040104330000000001420436000000000004004b00001ec40000613d000000000200001900000020033000390000000005030433000009340550019700000000015104360000000102200039000000000042004b00001ebd0000413d000000000001042d0000000043010434000009340330019700000000033204360000000004040433000009de04400197000000000043043500000040031000390000000003030433000000000003004b0000000003000039000000010300c0390000004004200039000000000034043500000060022000390000006001100039000000000101043300000a01011001970000000000120435000000000001042d0000001f0220003900000a2d022001970000000001120019000000000021004b00000000020000390000000102004039000009de0010009c00001ee40000213d000000010020019000001ee40000c13d000000400010043f000000000001042d00000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f0001043000000a320020009c00001f1a0000813d00000000040100190000001f0120003900000a2d011001970000003f0110003900000a2d05100197000000400100043d0000000005510019000000000015004b00000000070000390000000107004039000009de0050009c00001f1a0000213d000000010070019000001f1a0000c13d000000400050043f00000000052104360000000007420019000000000037004b00001f200000213d00000a2d062001980000001f0720018f0000000204400367000000000365001900001f0a0000613d000000000804034f0000000009050019000000008a08043c0000000009a90436000000000039004b00001f060000c13d000000000007004b00001f170000613d000000000464034f0000000306700210000000000703043300000000076701cf000000000767022f000000000404043b0000010006600089000000000464022f00000000046401cf000000000474019f000000000043043500000000022500190000000000020435000000000001042d00000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f0001043000000000010000190000247f000104300000093402200197000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f000000010020019000001f300000613d000000000101043b000000000001042d00000000010000190000247f000104300003000000000002000000000301041a000000400200043d000300000002001d000200000003001d0000000002320436000100000002001d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f000000010020019000001f5f0000613d0000000205000029000000000005004b00001f500000613d000000000101043b00000000020000190000000104000029000000000301041a000000000434043600000001011000390000000102200039000000000052004b00001f490000413d00001f510000013d0000000104000029000000030100002900000000021400490000001f0320003900000a2d023001970000000003120019000000000023004b00000000020000390000000102004039000009de0030009c00001f610000213d000000010020019000001f610000c13d000000400030043f000000000001042d00000000010000190000247f0001043000000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f000104300007000000000002000300000002001d000500000001001d000600000003001d000000000003004b000020590000613d0000000601000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b000000000101041a000000000001004b00001f950000c13d000000000100041a000000060010006c000020590000a13d0000000602000029000000010220008a000700000002001d000000000020043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b000000000101041a000000000001004b000000070200002900001f820000613d000009a800100198000020590000c13d00000005020000290000093402200197000400000001001d0000093401100197000700000002001d000000000021004b0000205d0000c13d0000000601000029000000000010043f0000000601000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000201043b000000000302041a00000000010004110000093404100197000000070040006c00001fd60000613d000000000034004b00001fd60000613d000500000004001d000100000003001d000200000002001d0000000701000029000000000010043f0000000701000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b0000000502000029000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b000000000101041a000000ff0010019000000002020000290000000103000029000020660000613d000000000003004b00001fd90000613d000000000002041b0000000701000029000000000010043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b000000000201041a000000010220008a000000000021041b00000003010000290000093401100197000500000001001d000000000010043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b000000000201041a0000000102200039000000000021041b000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f0000000100200190000020610000613d000000000101043b000300000001001d0000000601000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d0000000302000029000000a00220021000000005022001af000009f0022001c7000000000101043b000000000021041b0000000401000029000009f000100198000020460000c13d00000006010000290000000101100039000300000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b000000000101041a000000000001004b000020460000c13d000000000100041a000000030010006b000020460000613d0000000301000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020570000613d000000000101043b0000000402000029000000000021041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000403000039000009f204000041000000070500002900000005060000290000000607000029247d24730000040f0000000100200190000020570000613d000000050000006b000020620000613d000000000001042d00000000010000190000247f0001043000000a2501000041000000000010043f000009bd010000410000247f0001043000000a3301000041000000000010043f000009bd010000410000247f00010430000000000001042f00000a3501000041000000000010043f000009bd010000410000247f0001043000000a3401000041000000000010043f000009bd010000410000247f000104300003000000000002000000000301041a000000400200043d000300000002001d000200000003001d0000000002320436000100000002001d000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000926011001c70000801002000039247d24780000040f0000000100200190000020980000613d0000000205000029000000000005004b000020890000613d000000000101043b00000000020000190000000104000029000000000301041a0000093403300197000000000434043600000001011000390000000102200039000000000052004b000020810000413d0000208a0000013d0000000104000029000000030100002900000000021400490000001f0320003900000a2d023001970000000003120019000000000023004b00000000020000390000000102004039000009de0030009c0000209a0000213d00000001002001900000209a0000c13d000000400030043f000000000001042d00000000010000190000247f0001043000000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f000104300000093401100198000020b20000613d000000000010043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000020b60000613d000000000101043b000000000101041a000009de01100197000000000001042d000009f901000041000000000010043f000009bd010000410000247f0001043000000000010000190000247f000104300006000000000002000000000001004b000021560000613d000000000200041a000000000012004b000021560000a13d000100000001001d000200000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000021540000613d000000000101043b000000000101041a000000000001004b000020da0000c13d0000000201000029000000000001004b000000010110008a000020bf0000c13d00000a0c01000041000000000010043f0000001101000039000000040010043f00000a0d010000410000247f00010430000009a8001001980000000101000029000021560000c13d000000000010043f0000000c01000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000021540000613d000000400400043d00000a360040009c0000215a0000813d000000000201043b0000004001400039000000400010043f000000000102041a00000000011404360000000102200039000000000202041a0000000000210435000000400300043d000009c40030009c0000215a0000213d0000004002300039000000400020043f0000001102000039000000000202041a00000000032304360000001205000039000000000505041a0000000000530435000009c70350019700000000040404330000000001010433000009c7051001970000000001000019000000000a0000190000210b0000013d000000010110003a000020d40000613d0000003e00a0008c000000010aa00039000021530000813d0000002a0ca0008c0000211e0000413d000000000b000415000000060bb0008a000000050bb00210000000060dc000c900000000000c004b0000211b0000613d000000ff0bc0018f000000ff0cd0018f000000000bbc00d90000000600b0008c000020d40000c13d000000000b000415000000040bb0008a000000050bb00210000000000cd3022f000000000dd5022f0000212e0000013d000000000b000415000000050bb0008a000000050bb00210000000060da000c900000000000a004b0000212c0000613d000000ff0ba0018f000000ff0cd0018f000000000bbc00d90000000600b0008c000020d40000c13d000000000b000415000000030bb0008a000000050bb00210000000000cd2022f000000000dd4022f000000050bb002700000003f0bc001950000003f0bd00190000021080000613d0000003f0cc00190000021080000613d0000000000cb004b000021080000c13d0000001f00a0008c000021060000a13d0000003000a0008c000021440000413d0000003800a0008c000021480000413d0000003c00a0008c0000214c0000413d0000003e00a0008c000021500000813d00000a370010009c000020d40000213d0000000801100039000021080000013d00000a3a0010009c000020d40000213d0000000201100039000021080000013d00000a390010009c000020d40000213d0000000301100039000021080000013d00000a380010009c000020d40000213d0000000501100039000021080000013d00000a3b0010009c000020d40000213d0000000d01100039000000000001042d00000000010000190000247f0001043000000a0001000041000000000010043f000009bd010000410000247f0001043000000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f000104300008000000000002000100000004001d000500000002001d000600000001001d000700000003001d000000000003004b000022cb0000613d0000000701000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b000000000101041a000000000001004b0000218f0000c13d000000000100041a000000070010006c000022cb0000a13d0000000702000029000000010220008a000800000002001d000000000020043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b000000000101041a000000000001004b00000008020000290000217c0000613d000009a800100198000022cb0000c13d00000006020000290000093402200197000300000001001d0000093401100197000800000002001d000000000021004b000022d00000c13d0000000701000029000000000010043f0000000601000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000301043b000000000403041a00000000010004110000093402100197000400000002001d000000080020006c000021d00000613d000000040040006b000021d00000613d000200000004001d000600000003001d0000000801000029000000000010043f0000000701000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b0000000402000029000000000020043f000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b000000000101041a000000ff0010019000000006030000290000000204000029000022dc0000613d000000000004004b000021d30000613d000000000003041b0000000801000029000000000010043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b000000000201041a000000010220008a000000000021041b00000005010000290000093401100197000600000001001d000000000010043f0000000501000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b000000000201041a0000000102200039000000000021041b000009a40100004100000000001004430000000001000414000009200010009c0000092001008041000000c001100210000009a5011001c70000800b02000039247d24780000040f0000000100200190000022cf0000613d000000000101043b000200000001001d0000000701000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d0000000202000029000000a00220021000000006022001af000009f0022001c7000000000101043b000000000021041b0000000301000029000009f000100198000022400000c13d00000007010000290000000101100039000200000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b000000000101041a000000000001004b000022400000c13d000000000100041a000000020010006b000022400000613d0000000201000029000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000022c90000613d000000000101043b0000000302000029000000000021041b0000000001000414000009200010009c0000092001008041000000c00110021000000936011001c70000800d020000390000000403000039000009f204000041000000080500002900000006060000290000000707000029247d24730000040f0000000100200190000022c90000613d000000060000006b000022d40000613d000009ec010000410000000000100443000000050100002900000004001004430000000001000414000009200010009c0000092001008041000000c001100210000009ed011001c70000800202000039247d24780000040f0000000100200190000022cf0000613d000000000101043b000000000001004b000022c80000613d000000400700043d00000064017000390000008002000039000500000002001d000000000021043500000044017000390000000702000029000000000021043500000024017000390000000802000029000000000021043500000a3c0100004100000000001704350000000401700039000000040200002900000000002104350000008402700039000000010100002900000000310104340000000000120435000000a402700039000000000001004b0000227f0000613d000000000400001900000000052400190000000006430019000000000606043300000000006504350000002004400039000000000014004b000022780000413d0000001f0310003900000a2d0330019700000000012100190000000000010435000000a401300039000009200010009c00000920010080410000006001100210000009200070009c000009200200004100000000020740190000004002200210000000000121019f0000000002000414000009200020009c0000092002008041000000c002200210000000000112019f0000000602000029000800000007001d247d24730000040f000000080b00002900000060031002700000092003300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000022a40000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000022a00000c13d000000000006004b000022b10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000022d80000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000009de0010009c0000230e0000213d00000001002001900000230e0000c13d000000400010043f000000200030008c000022c90000413d00000000010b043300000a2800100198000022c90000c13d00000a290110019700000a3c0010009c0000230a0000c13d000000000001042d00000000010000190000247f0001043000000a2501000041000000000010043f000009bd010000410000247f00010430000000000001042f00000a3301000041000000000010043f000009bd010000410000247f0001043000000a3501000041000000000010043f000009bd010000410000247f00010430000000000003004b000022e00000c13d0000006002000039000023070000013d00000a3401000041000000000010043f000009bd010000410000247f000104300000001f0230003900000a3d022001970000003f0220003900000a3e04200197000000400200043d0000000004420019000000000024004b00000000050000390000000105004039000009de0040009c0000230e0000213d00000001005001900000230e0000c13d000000400040043f0000001f0430018f000000000632043600000a3f05300198000500000006001d0000000003560019000022fa0000613d000000000601034f0000000507000029000000006806043c0000000007870436000000000037004b000022f60000c13d000000000004004b000023070000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000000001020433000000000001004b000023140000c13d00000a4001000041000000000010043f000009bd010000410000247f0001043000000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f000104300000000502000029000009200020009c00000920020080410000004002200210000009200010009c00000920010080410000006001100210000000000121019f0000247f0001043000010000000000020000000003010019000000400100043d00000a410010009c000023750000813d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000000003004b000023720000613d000000000200041a000000000032004b000023720000a13d000100000003001d000000000030043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000023730000613d000000000101043b000000000101041a000000000001004b000023440000c13d0000000103000029000000010330008a000023300000013d000000400100043d000009f60010009c0000000103000029000023750000213d0000008002100039000000400020043f0000006002100039000000000002043500000040021000390000000000020435000000200210003900000000000204350000000000010435000000000030043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f0000000100200190000023730000613d000000000301034f000000400100043d000009f60010009c000023750000213d000000000203043b000000000202041a0000008003100039000000400030043f0000006003100039000000e8042002700000000000430435000009a8002001980000000003000039000000010300c0390000004004100039000000000034043500000934032001970000000003310436000000a002200270000009de022001970000000000230435000000000001042d00000000010000190000247f0001043000000a0c01000041000000000010043f0000004101000039000000040010043f00000a0d010000410000247f000104300000000031010434000000000001004b000023860000613d000000000400001900000000052400190000000006430019000000000606043300000000006504350000002004400039000000000014004b0000237f0000413d00000000012100190000000000010435000000000001042d0003000000000002000300000001001d000000140020043f000000340030043f00000a2101000041000000000010043f0000000001000414000009200010009c0000092001008041000000c00110021000000a22011001c70000000302000029247d24730000040f00000060031002700000092007300197000000200070008c000000200400003900000000040740190000001f0340018f0000002008400190000023a40000613d000000000401034f0000000005000019000000004604043c0000000005650436000000000085004b000023a00000c13d000000000003004b000023b10000613d000000000481034f0000000303300210000000000508043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f0000000000380435000100000007001f0003000000010355000000000100043d000000010010008c00000000010000390000000101006039000000000112016f0000000100100190000023d30000c13d000100000002001d000200000007001d000009ec010000410000000000100443000000030100002900000004001004430000000001000414000009200010009c0000092001008041000000c001100210000009ed011001c70000800202000039247d24780000040f0000000100200190000023d50000613d000000010200008a000000010220014f000000000101043b000000000001004b0000000001000039000000010100603900000002001001b0000000010220c1bf0000000100200190000023d60000c13d000000340000043f000000000001042d000000000001042f00000a2301000041000000000010043f000009a2010000410000247f0001043000000000040100190000000001000414000009200010009c0000092001008041000000c001100210000000000002004b000023e60000613d000000000302001900000936011001c700008009020000390000000005000019000023e70000013d0000000002040019247d24730000040f00030000000103550000006001100270000109200010019d0000000100200190000023ee0000613d000000000001042d00000a2401000041000000000010043f000009a2010000410000247f000104300000093501000041000000000101041a0000000002000411000000000012004b000023f80000c13d000000000001042d00000a1b01000041000000000010043f000009a2010000410000247f000104300001000000000002000000000001004b0000242c0000613d000100000001001d000000000010043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f00000001002001900000242a0000613d000000000101043b000000000101041a000000000001004b000024270000c13d000000000100041a0000000102000029000000000021004b0000242c0000a13d000000010220008a000100000002001d000000000020043f0000000401000039000000200010043f0000000001000414000009200010009c0000092001008041000000c001100210000009a7011001c70000801002000039247d24780000040f00000001002001900000242a0000613d000000000101043b000000000101041a000000000001004b0000000102000029000024140000613d000009a8001001980000242c0000c13d000000000001042d00000000010000190000247f0001043000000a2501000041000000000010043f000009bd010000410000247f0001043000010000000000020000093502000041000000000502041a00000000020004140000093406100197000009200020009c0000092002008041000000c00120021000000936011001c70000800d0200003900000003030000390000093704000041000100000006001d247d24730000040f0000000100200190000024440000613d00000935010000410000000102000029000000000021041b000000000001042d00000000010000190000247f00010430000000000001042f000009200010009c00000920010080410000004001100210000009200020009c00000920020080410000006002200210000000000112019f0000000002000414000009200020009c0000092002008041000000c002200210000000000112019f00000936011001c70000801002000039247d24780000040f00000001002001900000245a0000613d000000000101043b000000000001042d00000000010000190000247f0001043000000000050100190000000000200443000000040030008c000024630000a13d000000050140027000000000010100310000000400100443000009200030009c000009200300804100000060013002100000000002000414000009200020009c0000092002008041000000c002200210000000000112019f00000a42011001c70000000002050019247d24780000040f0000000100200190000024720000613d000000000101043b000000000001042d000000000001042f00002476002104210000000102000039000000000001042d0000000002000019000000000001042d0000247b002104230000000102000039000000000001042d0000000002000019000000000001042d0000247d000004320000247e0001042e0000247f0001043000000000000000000000000000000000000000000000000000000000ffffffff41627374726163744d61646e657373427261636b6574730000000000000000004142534d41440000000000000000000000000000000000000000000000000000405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acebfa87805ed57dc1f0d489ce33be4c4577d74ccde357eeeee058a32c55c44a53241627374726163744d61646e657373427261636b65747300000000000000002e0200000000000000000000000000000000000020000000000000000000000000ffffffffffff000000000000000000000000000000000000000000000000000072eef71ef43483d822203fd126296c5f8bfc62fd930b15bdbf4bf082a7e537fe8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac805697066733a2f2f626166796265696562323236797733336133637165327076658d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8026835777a6f366e757577766b3571357134696c737668756476773735616c63778d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8036f712f00000000000000000000000000000000000000000000000000000000008d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80468747470733a2f2f6d61646e6573732e626561726973682e61662f6170692f621b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6727261636b65742f000000000000000000000000000000000000000000000000001b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae673000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392702000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e013da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3476c6f62616c20506f6f6c00000000000000000000000000000000000000001613da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e4416c6c206d696e74656420627261636b65747320666f7220676c6f62616c20747261636b696e670000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000013da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e9ffffffffffffff000000000000000000000000000000000000000000000000ff000000000000000000000000000000000000000000000000000000000001000013da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343ec13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343edffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000aa4ec00224afccfdb70000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000007209b83d00000000000000000000000000000000000000000000000000000000b88d4fdd00000000000000000000000000000000000000000000000000000000dff1ae4200000000000000000000000000000000000000000000000000000000ebac0f7d00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fee81cf400000000000000000000000000000000000000000000000000000000ebac0f7e00000000000000000000000000000000000000000000000000000000f04e283e00000000000000000000000000000000000000000000000000000000e985e9c400000000000000000000000000000000000000000000000000000000e985e9c500000000000000000000000000000000000000000000000000000000eb3f674c00000000000000000000000000000000000000000000000000000000dff1ae4300000000000000000000000000000000000000000000000000000000e4beb87f00000000000000000000000000000000000000000000000000000000d17f5f3e00000000000000000000000000000000000000000000000000000000df29b98100000000000000000000000000000000000000000000000000000000df29b98200000000000000000000000000000000000000000000000000000000dfd8d9df00000000000000000000000000000000000000000000000000000000d17f5f3f00000000000000000000000000000000000000000000000000000000d557f40200000000000000000000000000000000000000000000000000000000c87b56dc00000000000000000000000000000000000000000000000000000000c87b56dd00000000000000000000000000000000000000000000000000000000cd3d5da200000000000000000000000000000000000000000000000000000000b88d4fde00000000000000000000000000000000000000000000000000000000c23dc68f000000000000000000000000000000000000000000000000000000009af94f2f00000000000000000000000000000000000000000000000000000000ac4afa3700000000000000000000000000000000000000000000000000000000b58a5ee400000000000000000000000000000000000000000000000000000000b58a5ee500000000000000000000000000000000000000000000000000000000b8764c3900000000000000000000000000000000000000000000000000000000ac4afa3800000000000000000000000000000000000000000000000000000000b2b6599100000000000000000000000000000000000000000000000000000000a22cb46400000000000000000000000000000000000000000000000000000000a22cb46500000000000000000000000000000000000000000000000000000000a70bd71b000000000000000000000000000000000000000000000000000000009af94f30000000000000000000000000000000000000000000000000000000009bc6b2bd000000000000000000000000000000000000000000000000000000008a0e8cc40000000000000000000000000000000000000000000000000000000095d89b400000000000000000000000000000000000000000000000000000000095d89b410000000000000000000000000000000000000000000000000000000099a2557a000000000000000000000000000000000000000000000000000000008a0e8cc5000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000000000000000000000000000000000007209b83e0000000000000000000000000000000000000000000000000000000074f82e30000000000000000000000000000000000000000000000000000000008462151c000000000000000000000000000000000000000000000000000000003b345a86000000000000000000000000000000000000000000000000000000005bbb2176000000000000000000000000000000000000000000000000000000006e34b4e30000000000000000000000000000000000000000000000000000000070a082300000000000000000000000000000000000000000000000000000000070a0823100000000000000000000000000000000000000000000000000000000715018a6000000000000000000000000000000000000000000000000000000006e34b4e4000000000000000000000000000000000000000000000000000000006f6c4717000000000000000000000000000000000000000000000000000000006352211d000000000000000000000000000000000000000000000000000000006352211e000000000000000000000000000000000000000000000000000000006b792c4b000000000000000000000000000000000000000000000000000000005bbb2177000000000000000000000000000000000000000000000000000000005d8b150b000000000000000000000000000000000000000000000000000000004487d3de0000000000000000000000000000000000000000000000000000000054d1f13c0000000000000000000000000000000000000000000000000000000054d1f13d0000000000000000000000000000000000000000000000000000000056e15a53000000000000000000000000000000000000000000000000000000004487d3df0000000000000000000000000000000000000000000000000000000052202b0a000000000000000000000000000000000000000000000000000000003b345a87000000000000000000000000000000000000000000000000000000003bf524bb0000000000000000000000000000000000000000000000000000000042842e0e00000000000000000000000000000000000000000000000000000000151fc0b40000000000000000000000000000000000000000000000000000000023b872dc000000000000000000000000000000000000000000000000000000002a552059000000000000000000000000000000000000000000000000000000002a55205a000000000000000000000000000000000000000000000000000000002c175e830000000000000000000000000000000000000000000000000000000023b872dd00000000000000000000000000000000000000000000000000000000256929620000000000000000000000000000000000000000000000000000000018160ddc0000000000000000000000000000000000000000000000000000000018160ddd0000000000000000000000000000000000000000000000000000000018e5613100000000000000000000000000000000000000000000000000000000151fc0b50000000000000000000000000000000000000000000000000000000017c1fdd30000000000000000000000000000000000000000000000000000000006fdde0200000000000000000000000000000000000000000000000000000000095ea7b200000000000000000000000000000000000000000000000000000000095ea7b3000000000000000000000000000000000000000000000000000000000c0c0c630000000000000000000000000000000000000000000000000000000006fdde0300000000000000000000000000000000000000000000000000000000081812fc0000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000003df3bbc0000000000000000000000000000000000000000000000000000000004634d8d00000000000000000000000000000000000000000000000000000000389a75e10000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000000000000000000000007448fbae00000000000000000000000000000000000000040000001c000000000000000002000000000000000000000000000000000000200000000c0000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000006f5e881802000000000000000000000000000000000000400000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000000000000000000000000000000000000000000000000000000000000000fc0000000000000000000000000000000000000000000000000000000000000003f0000e38bd130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000002c35dcb876d55c64e73ecbaa35feec09450281164e6ad606d3ce2af487cd68ed0000000000000000000000000000000000000000000000000000000067dc3f04000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000008000000000000000000200000000000000000000000000000000000060000000c00000000000000000b499a87957d942c0dc013625bae08513462e710d369f0eb35781d626ede140b0000000000000000000000000000000000000000000000000ffffffffffffffbf00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000067dc3f0566616c736500000000000000000000000000000000000000000000000000000074727565000000000000000000000000000000000000000000000000000000007b00000000000000000000000000000000000000000000000000000000000000226e616d65223a22427261636b65742023000000000000000000000000000000506f77657265642042792042454152495348222c000000000000000000000000222c000000000000000000000000000000000000000000000000000000000000226465736372697074696f6e223a224162737472616374204d61646e6573732022696d616765223a22000000000000000000000000000000000000000000000022616e696d6174696f6e5f75726c223a220000000000000000000000000000002261747472696275746573223a5b0000000000000000000000000000000000007b2274726169745f74797065223a22506172742031222c2276616c7565223a22227d2c00000000000000000000000000000000000000000000000000000000007b2274726169745f74797065223a22506172742032222c2276616c7565223a2265223a22000000000000000000000000000000000000000000000000000000007b2274726169745f74797065223a22546965627265616b6572222c2276616c7522000000000000000000000000000000000000000000000000000000000000007b2274726169745f74797065223a22697346696e616c222c2276616c7565223a7b2274726169745f74797065223a22506f696e7473222c2276616c7565223a22227d0000000000000000000000000000000000000000000000000000000000005d000000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3d3d000000000000000000000000000000000000000000000000000000000000646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000ff00006579d6cc09898222c9cfc44fae23d6b225f63e53d07c033325431e172a2f726dac802cf9dda1332a00570c5769f5507ee19f80d0da2937a935c0bb9b1d42c34017307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c310000000000000000000000000000000000000000000000929eee149b4bd2126802000000000000000000000000000000000000a8000000a000000000000000000000000019457468657265756d205369676e6564204d6573736167653a0a3332020000000000000000000000000000000000003c0000000400000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000001626ba7e000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000200000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffeffffffffffffffffddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343ee080ba648fc54b265c4617e919a8f8785652ab5039bfef6cb936a011bf906304b8baa579f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b32c1995a000000000000000000000000000000000000000000000000000000008f4eb60400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffff000000ffffffffffffff000000000000000000000000000000000000000000000000007693fb874210106ac40607a2a10bbf27da2385fd470a082c86b5965b7efe82ef0200000000000000000000000000000000000060000000000000000000000000f3ff2300b15dbb817a1207ea89f4e71f8041096cb0ac2d5c3d4a2ef4f2ee9e88bb45552d00000000000000000000000000000000000000000000000000000000b1d04f08000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffff27a10cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023b872dd00000000000000000000000000000000000000000000000000000000000000640000001c0000000000000000fa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92d189f6f0bdc1a0f5448a0caaf7fe4ea125788c675f33c05ab8ecf0c120e4080fa410f59e000000000000000000000000000000000000000000000000000000005ab78eca00000000000000000000000000000000000000000000000000000000418073f100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007939f424cd3cb2bb000000000000000000000000000000000000000000000000000000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000002e076300000000000000000000000000000000000000000000000000000000006d090789000000000000000000000000000000000000000000000000000000009a949722000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000040000000000000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd5d00dbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d7eb8d63c0f8c2fb1b61dd0947e2f9eb707c7d44ec5d65a0761976cbc070197a5af3bc6aa000000000000000000000000000000000000000000000000000000008974ee7600000000000000000000000000000000000000000000000000000000cfb3b942000000000000000000000000000000000000000000000000000000008c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925cf4700e4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082b4290000000000000000000000000000000000000000000000000000000000b4457eaa00000000000000000000000000000000000000000000000000000000350a88b39c8787c000000000000000000000000000000000000000000000000000000000c688be7000000000000000000000000000000000000000000000000000000000cce553a90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a9059cbb00000000000000000000000000000000000000000000000000000000000000440000001000000000000000000000000000000000000000000000000000000000000000000000000090b8ec1800000000000000000000000000000000000000000000000000000000b12d13ebdf2d9b4200000000000000000000000000000000000000000000000000000000bb17fd751831099c253a371fe89123c7bf8568f9b6fd4f29d9e6673dc93f700600000000000000000000000000000000000000000000000000000000ab143c0600000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000005b5e139f0000000000000000000000000000000000000000000000000000000080ac58cd00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0005ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00040000000000000000000000000000000000000000000000010000000000000000a11481000000000000000000000000000000000000000000000000000000000059c896be00000000000000000000000000000000000000000000000000000000ea553b3400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffc0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffafffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2150b7a020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000003ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0d1a57ed600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff8002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c83db5846ff3e371327db9005592d810d752e31e06c2dd6ac960a64559c725b9
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.