ERC-721
NFT
Overview
Max Total Supply
6,666 MOTHZ
Holders
1,959
Market
Volume (24H)
0.001 ETH
Min Price (24H)
$3.48 @ 0.001000 ETH
Max Price (24H)
$3.48 @ 0.001000 ETH
Other Info
Token Contract
Balance
1 MOTHZLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Mothz
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /// @title Mothz /// @author SecuroMint /// @notice wën thę lämp göęs brïght, thę möthz gët hypę! /// @custom:security-contact [email protected] contract Mothz is ERC721A, Ownable, ReentrancyGuard, PaymentSplitter { enum MintState { Public, Whitelisted } struct SecuroMintData { // @dev The total supply of the token. uint16 supplyTotal; // @dev The maximum number of tokens that can be minted to a single address. uint16 maxPerWallet; // @dev The maximum number of tokens that can be minted in a single transaction. uint16 maxPerTx; // @dev The price for a private, whitelist-only mint. uint72 preSalePrice; // @dev The price for a public mint. uint72 salePrice; // @dev Whether the pre-sale is active. bool preSaleActive; // @dev Whether the public sale is active. bool saleActive; } // @dev The number of tokens a specific address has minted. mapping(address => uint16) public hasMinted; // @dev The merkle root for the pre-sale whitelist. bytes32 public presaleMerkleRoot; // @dev The merkle root for the regular sale whitelist. bytes32 public saleMerkleRoot; // @dev The base URI for metadata. string private baseURI; // @dev SecuroMint platform data. SecuroMintData private _securoMintData; // @dev The mint state. MintState private _mintState; using Strings for uint256; constructor( address[] memory _payees, uint256[] memory _shares, string memory _base, address _owner, SecuroMintData memory _data ) ERC721A("mothz", "MOTHZ") PaymentSplitter(_payees, _shares) { baseURI = _base; transferOwnership(_owner); _securoMintData = _data; _mintState = MintState.Public; } /////////////// /// Minting /// /////////////// function mint(uint16 _quantity, bytes32[] memory _proof) public payable nonReentrant { require(getPrice() * _quantity <= msg.value, "SECUROMINT_INSUFFICIENT_ETH"); // Retrieve in memory the token data for maximums. uint16 _totalSupply = _securoMintData.supplyTotal; uint16 _maxPerWallet = _securoMintData.maxPerWallet; uint16 _maxPerTx = _securoMintData.maxPerTx; // Ensure the user has not exceeded the maximums. require(_quantity <= _maxPerTx, "SECUROMINT_EXCEEDS_MAX_PER_TX"); require(totalSupply() + _quantity <= _totalSupply, "SECUROMINT_EXCEEDS_TOTAL_SUPPLY"); // Retrieve the current sale status. bool _saleActive = _securoMintData.saleActive; bool _preSaleActive = _securoMintData.preSaleActive; // Require the sale to be active. // If the sale is public, require the public sale to be active. If the sale is private, require the private // sale to be active. if (_mintState == MintState.Public) { require(_saleActive, "SECUROMINT_SALE_NOT_ACTIVE"); } else { require(_preSaleActive, "SECUROMINT_PRE_SALE_NOT_ACTIVE"); } // Ensure the user has not exceeded the maximum per wallet. require(hasMinted[msg.sender] + _quantity <= _maxPerWallet, "SECUROMINT_EXCEEDS_MAX_PER_WALLET"); // If the sale is private, ensure the user is whitelisted. if (_mintState == MintState.Whitelisted) { require(_verifyWhitelist(msg.sender, _proof), "SECUROMINT_NOT_WHITELISTED"); } // Mint the tokens. hasMinted[msg.sender] += _quantity; _safeMint(msg.sender, _quantity); } // @dev Verify a user's address against a merkle root. function _verifyWhitelist(address _address, bytes32[] memory _proof) internal view returns (bool) { bytes32 _leaf = keccak256(abi.encodePacked(_address)); if (_mintState == MintState.Public) { return MerkleProof.verify(_proof, saleMerkleRoot, _leaf); } else { return MerkleProof.verify(_proof, presaleMerkleRoot, _leaf); } } // @dev Allow the owner to mint tokens to a specific address. function reserve(address _address, uint16 _quantity) public nonReentrant onlyOwner { require(totalSupply() + _quantity <= _securoMintData.supplyTotal, "SECUROMINT_EXCEEDS_TOTAL_SUPPLY"); _safeMint(_address, _quantity); } /////////////// /// Getters /// /////////////// function tokenURI(uint256 _tokenId) override public view returns (string memory) { return string(abi.encodePacked(baseURI, _tokenId.toString())); } function readData() public view returns (SecuroMintData memory) { return _securoMintData; } function getPrice() public view returns (uint72) { if (_securoMintData.preSaleActive) { return _securoMintData.preSalePrice; } else { return _securoMintData.salePrice; } } function _startTokenId() override internal view virtual returns (uint256) { return 1; } function getMintState() public view returns (MintState) { return _mintState; } function getSaleActive() public view returns (bool) { return _securoMintData.saleActive; } function getMerkleRoots() public view returns (bytes32, bytes32) { return (presaleMerkleRoot, saleMerkleRoot); } function getBaseURI() public view returns (string memory) { return baseURI; } function getHasMinted(address _address) public view returns (uint16) { return hasMinted[_address]; } /////////////// /// Setters /// /////////////// function setBase(string memory _base) public onlyOwner { baseURI = _base; } function setPresaleMerkleRoot(bytes32 _root) public onlyOwner { presaleMerkleRoot = _root; } function setSaleMerkleRoot(bytes32 _root) public onlyOwner { saleMerkleRoot = _root; } function updateData(uint16 _supplyTotal, uint16 _maxPerWallet, uint16 _maxPerTx, uint72 _preSalePrice, uint72 _salePrice) public onlyOwner { require(_supplyTotal >= 0, "SECUROMINT_MANAGE_ERR_SUPPLY_LESS_THAN_ZERO"); require(_maxPerWallet >= 0, "SECUROMINT_MANAGE_ERR_MAX_PER_WALLET_LESS_THAN_ZERO"); require(_maxPerTx >= 0, "SECUROMINT_MANAGE_ERR_MAX_PER_TX_LESS_THAN_ZERO"); require(_preSalePrice >= 0, "SECUROMINT_MANAGE_ERR_PRE_SALE_PRICE_LESS_THAN_ZERO"); require(_salePrice >= 0, "SECUROMINT_MANAGE_ERR_SALE_PRICE_LESS_THAN_ZERO"); require(_supplyTotal >= totalSupply(), "SECUROMINT_MANAGE_ERR_SUPPLY_LESS_THAN_TOTAL_SUPPLY"); _securoMintData.supplyTotal = _supplyTotal; _securoMintData.maxPerWallet = _maxPerWallet; _securoMintData.maxPerTx = _maxPerTx; _securoMintData.preSalePrice = _preSalePrice; _securoMintData.salePrice = _salePrice; } // @dev Change the mint state. function setState(MintState _mint, bool _presale, bool _sale) public onlyOwner { if (_presale) { require(!_sale, "SECUROMINT_MANAGE_ERR_SALE_AND_PRE_SALE_ACTIVE"); } else if (_sale) { require(!_presale, "SECUROMINT_MANAGE_ERR_SALE_AND_PRE_SALE_ACTIVE"); } _mintState = _mint; _securoMintData.preSaleActive = _presale; _securoMintData.saleActive = _sale; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Reference type for token approval. struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, str) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev See {ERC721-_burn}. This override additionally checks to see if a * token-specific URI was set for the token, and if so, it deletes the token URI from * the storage mapping. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); return _pendingPayment(account, totalReceived, released(token, account)); } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(account); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(token, account); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // 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(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @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, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @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. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @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 (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"},{"internalType":"string","name":"_base","type":"string"},{"internalType":"address","name":"_owner","type":"address"},{"components":[{"internalType":"uint16","name":"supplyTotal","type":"uint16"},{"internalType":"uint16","name":"maxPerWallet","type":"uint16"},{"internalType":"uint16","name":"maxPerTx","type":"uint16"},{"internalType":"uint72","name":"preSalePrice","type":"uint72"},{"internalType":"uint72","name":"salePrice","type":"uint72"},{"internalType":"bool","name":"preSaleActive","type":"bool"},{"internalType":"bool","name":"saleActive","type":"bool"}],"internalType":"struct Mothz.SecuroMintData","name":"_data","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getHasMinted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMerkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintState","outputs":[{"internalType":"enum Mothz.MintState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint72","name":"","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasMinted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_quantity","type":"uint16"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"readData","outputs":[{"components":[{"internalType":"uint16","name":"supplyTotal","type":"uint16"},{"internalType":"uint16","name":"maxPerWallet","type":"uint16"},{"internalType":"uint16","name":"maxPerTx","type":"uint16"},{"internalType":"uint72","name":"preSalePrice","type":"uint72"},{"internalType":"uint72","name":"salePrice","type":"uint72"},{"internalType":"bool","name":"preSaleActive","type":"bool"},{"internalType":"bool","name":"saleActive","type":"bool"}],"internalType":"struct Mothz.SecuroMintData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint16","name":"_quantity","type":"uint16"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_base","type":"string"}],"name":"setBase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setPresaleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setSaleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Mothz.MintState","name":"_mint","type":"uint8"},{"internalType":"bool","name":"_presale","type":"bool"},{"internalType":"bool","name":"_sale","type":"bool"}],"name":"setState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_supplyTotal","type":"uint16"},{"internalType":"uint16","name":"_maxPerWallet","type":"uint16"},{"internalType":"uint16","name":"_maxPerTx","type":"uint16"},{"internalType":"uint72","name":"_preSalePrice","type":"uint72"},{"internalType":"uint72","name":"_salePrice","type":"uint72"}],"name":"updateData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162006ce138038062006ce1833981810160405281019062000037919062000e1a565b84846040518060400160405280600581526020017f6d6f74687a0000000000000000000000000000000000000000000000000000008152506040518060400160405280600581526020017f4d4f54485a0000000000000000000000000000000000000000000000000000008152508160029080519060200190620000bd929190620007ee565b508060039080519060200190620000d6929190620007ee565b50620000e76200038b60201b60201c565b60008190555050506200010f620001036200039460201b60201c565b6200039c60201b60201c565b600160098190555080518251146200015e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001559062000f87565b60405180910390fd5b6000825111620001a5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019c9062000ff9565b60405180910390fd5b60005b82518110156200021457620001fe838281518110620001cc57620001cb6200101b565b5b6020026020010151838381518110620001ea57620001e96200101b565b5b60200260200101516200046260201b60201c565b80806200020b9062001079565b915050620001a8565b50505082601490805190602001906200022f929190620007ee565b5062000241826200069c60201b60201c565b80601560008201518160000160006101000a81548161ffff021916908361ffff16021790555060208201518160000160026101000a81548161ffff021916908361ffff16021790555060408201518160000160046101000a81548161ffff021916908361ffff16021790555060608201518160000160066101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550608082015181600001600f6101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff16021790555060a08201518160000160186101000a81548160ff02191690831515021790555060c08201518160000160196101000a81548160ff0219169083151502179055509050506000601660006101000a81548160ff021916908360018111156200037b576200037a620010c7565b5b02179055505050505050620014b3565b60006001905090565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620004d5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004cc906200116c565b60405180910390fd5b600081116200051b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200051290620011de565b60405180910390fd5b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414620005a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005979062001276565b60405180910390fd5b600e829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600a5462000657919062001298565b600a819055507f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac82826040516200069092919062001317565b60405180910390a15050565b620006ac6200073360201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200071f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200071690620013ba565b60405180910390fd5b62000730816200039c60201b60201c565b50565b620007436200039460201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1662000769620007c460201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614620007c2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620007b9906200142c565b60405180910390fd5b565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b828054620007fc906200147d565b90600052602060002090601f0160209004810192826200082057600085556200086c565b82601f106200083b57805160ff19168380011785556200086c565b828001600101855582156200086c579182015b828111156200086b5782518255916020019190600101906200084e565b5b5090506200087b91906200087f565b5090565b5b808211156200089a57600081600090555060010162000880565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200090282620008b7565b810181811067ffffffffffffffff82111715620009245762000923620008c8565b5b80604052505050565b6000620009396200089e565b9050620009478282620008f7565b919050565b600067ffffffffffffffff8211156200096a5762000969620008c8565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620009ad8262000980565b9050919050565b620009bf81620009a0565b8114620009cb57600080fd5b50565b600081519050620009df81620009b4565b92915050565b6000620009fc620009f6846200094c565b6200092d565b9050808382526020820190506020840283018581111562000a225762000a216200097b565b5b835b8181101562000a4f578062000a3a8882620009ce565b84526020840193505060208101905062000a24565b5050509392505050565b600082601f83011262000a715762000a70620008b2565b5b815162000a83848260208601620009e5565b91505092915050565b600067ffffffffffffffff82111562000aaa5762000aa9620008c8565b5b602082029050602081019050919050565b6000819050919050565b62000ad08162000abb565b811462000adc57600080fd5b50565b60008151905062000af08162000ac5565b92915050565b600062000b0d62000b078462000a8c565b6200092d565b9050808382526020820190506020840283018581111562000b335762000b326200097b565b5b835b8181101562000b60578062000b4b888262000adf565b84526020840193505060208101905062000b35565b5050509392505050565b600082601f83011262000b825762000b81620008b2565b5b815162000b9484826020860162000af6565b91505092915050565b600080fd5b600067ffffffffffffffff82111562000bc05762000bbf620008c8565b5b62000bcb82620008b7565b9050602081019050919050565b60005b8381101562000bf857808201518184015260208101905062000bdb565b8381111562000c08576000848401525b50505050565b600062000c2562000c1f8462000ba2565b6200092d565b90508281526020810184848401111562000c445762000c4362000b9d565b5b62000c5184828562000bd8565b509392505050565b600082601f83011262000c715762000c70620008b2565b5b815162000c8384826020860162000c0e565b91505092915050565b600080fd5b600061ffff82169050919050565b62000caa8162000c91565b811462000cb657600080fd5b50565b60008151905062000cca8162000c9f565b92915050565b600068ffffffffffffffffff82169050919050565b62000cf08162000cd0565b811462000cfc57600080fd5b50565b60008151905062000d108162000ce5565b92915050565b60008115159050919050565b62000d2d8162000d16565b811462000d3957600080fd5b50565b60008151905062000d4d8162000d22565b92915050565b600060e0828403121562000d6c5762000d6b62000c8c565b5b62000d7860e06200092d565b9050600062000d8a8482850162000cb9565b600083015250602062000da08482850162000cb9565b602083015250604062000db68482850162000cb9565b604083015250606062000dcc8482850162000cff565b606083015250608062000de28482850162000cff565b60808301525060a062000df88482850162000d3c565b60a08301525060c062000e0e8482850162000d3c565b60c08301525092915050565b6000806000806000610160868803121562000e3a5762000e39620008a8565b5b600086015167ffffffffffffffff81111562000e5b5762000e5a620008ad565b5b62000e698882890162000a59565b955050602086015167ffffffffffffffff81111562000e8d5762000e8c620008ad565b5b62000e9b8882890162000b6a565b945050604086015167ffffffffffffffff81111562000ebf5762000ebe620008ad565b5b62000ecd8882890162000c59565b935050606062000ee088828901620009ce565b925050608062000ef38882890162000d53565b9150509295509295909350565b600082825260208201905092915050565b7f5061796d656e7453706c69747465723a2070617965657320616e64207368617260008201527f6573206c656e677468206d69736d617463680000000000000000000000000000602082015250565b600062000f6f60328362000f00565b915062000f7c8262000f11565b604082019050919050565b6000602082019050818103600083015262000fa28162000f60565b9050919050565b7f5061796d656e7453706c69747465723a206e6f20706179656573000000000000600082015250565b600062000fe1601a8362000f00565b915062000fee8262000fa9565b602082019050919050565b60006020820190508181036000830152620010148162000fd2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000620010868262000abb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620010bc57620010bb6200104a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f5061796d656e7453706c69747465723a206163636f756e74206973207468652060008201527f7a65726f20616464726573730000000000000000000000000000000000000000602082015250565b600062001154602c8362000f00565b91506200116182620010f6565b604082019050919050565b60006020820190508181036000830152620011878162001145565b9050919050565b7f5061796d656e7453706c69747465723a20736861726573206172652030000000600082015250565b6000620011c6601d8362000f00565b9150620011d3826200118e565b602082019050919050565b60006020820190508181036000830152620011f981620011b7565b9050919050565b7f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960008201527f2068617320736861726573000000000000000000000000000000000000000000602082015250565b60006200125e602b8362000f00565b91506200126b8262001200565b604082019050919050565b6000602082019050818103600083015262001291816200124f565b9050919050565b6000620012a58262000abb565b9150620012b28362000abb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115620012ea57620012e96200104a565b5b828201905092915050565b6200130081620009a0565b82525050565b620013118162000abb565b82525050565b60006040820190506200132e6000830185620012f5565b6200133d602083018462001306565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000620013a260268362000f00565b9150620013af8262001344565b604082019050919050565b60006020820190508181036000830152620013d58162001393565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006200141460208362000f00565b91506200142182620013dc565b602082019050919050565b60006020820190508181036000830152620014478162001405565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200149657607f821691505b60208210811415620014ad57620014ac6200144e565b5b50919050565b61581e80620014c36000396000f3fe6080604052600436106102765760003560e01c80638b83209b1161014f578063c45ac050116100c1578063de63b2d31161007a578063de63b2d314610a15578063e33b7de314610a3e578063e985e9c514610a69578063f2fde38b14610aa6578063f60aee4b14610acf578063f91eb63014610af8576102bd565b8063c45ac050146108da578063c87b56dd14610917578063ce7c2ac214610954578063d4a417e614610991578063d79779b2146109bc578063da41bfe1146109f9576102bd565b806398d5fdca1161011357806398d5fdca146107cc578063a22cb465146107f7578063a3f8eace14610820578063ad4f4c591461085d578063b88d4fde14610886578063bef55ef3146108af576102bd565b80638b83209b146106d15780638da5cb5b1461070e57806395d89b411461073957806397db4fe3146107645780639852595c1461078f576102bd565b8063406072a9116101e8578063664aa26b116101ac578063664aa26b146105d257806370a08231146105fb578063714c539814610638578063715018a614610663578063774a88351461067a57806385135a1a146106a5576102bd565b8063406072a9146104c957806340e3c2a31461050657806342842e0e1461054357806348b750441461056c5780636352211e14610595576102bd565b8063191655871161023a57806319165587146103bb57806322212e2b146103e457806323b872dd1461040f57806328d7b2761461043857806338e21cce146104615780633a98ef391461049e576102bd565b806301ffc9a7146102c257806306fdde03146102ff578063081812fc1461032a578063095ea7b31461036757806318160ddd14610390576102bd565b366102bd577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706102a4610b21565b346040516102b3929190613812565b60405180910390a1005b600080fd5b3480156102ce57600080fd5b506102e960048036038101906102e491906138a7565b610b29565b6040516102f691906138ef565b60405180910390f35b34801561030b57600080fd5b50610314610bbb565b60405161032191906139a3565b60405180910390f35b34801561033657600080fd5b50610351600480360381019061034c91906139f1565b610c4d565b60405161035e9190613a1e565b60405180910390f35b34801561037357600080fd5b5061038e60048036038101906103899190613a65565b610ccc565b005b34801561039c57600080fd5b506103a5610e10565b6040516103b29190613aa5565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190613afe565b610e27565b005b3480156103f057600080fd5b506103f9610fb0565b6040516104069190613b44565b60405180910390f35b34801561041b57600080fd5b5061043660048036038101906104319190613b5f565b610fb6565b005b34801561044457600080fd5b5061045f600480360381019061045a9190613bde565b6112db565b005b34801561046d57600080fd5b5061048860048036038101906104839190613c0b565b6112ed565b6040516104959190613c55565b60405180910390f35b3480156104aa57600080fd5b506104b361130e565b6040516104c09190613aa5565b60405180910390f35b3480156104d557600080fd5b506104f060048036038101906104eb9190613cae565b611318565b6040516104fd9190613aa5565b60405180910390f35b34801561051257600080fd5b5061052d60048036038101906105289190613c0b565b61139f565b60405161053a9190613c55565b60405180910390f35b34801561054f57600080fd5b5061056a60048036038101906105659190613b5f565b6113f6565b005b34801561057857600080fd5b50610593600480360381019061058e9190613cae565b611416565b005b3480156105a157600080fd5b506105bc60048036038101906105b791906139f1565b611633565b6040516105c99190613a1e565b60405180910390f35b3480156105de57600080fd5b506105f960048036038101906105f49190613e23565b611645565b005b34801561060757600080fd5b50610622600480360381019061061d9190613c0b565b611667565b60405161062f9190613aa5565b60405180910390f35b34801561064457600080fd5b5061064d611720565b60405161065a91906139a3565b60405180910390f35b34801561066f57600080fd5b506106786117b2565b005b34801561068657600080fd5b5061068f6117c6565b60405161069c9190613ee3565b60405180910390f35b3480156106b157600080fd5b506106ba6117dd565b6040516106c8929190613efe565b60405180910390f35b3480156106dd57600080fd5b506106f860048036038101906106f391906139f1565b6117ee565b6040516107059190613a1e565b60405180910390f35b34801561071a57600080fd5b50610723611836565b6040516107309190613a1e565b60405180910390f35b34801561074557600080fd5b5061074e611860565b60405161075b91906139a3565b60405180910390f35b34801561077057600080fd5b506107796118f2565b60405161078691906138ef565b60405180910390f35b34801561079b57600080fd5b506107b660048036038101906107b19190613c0b565b61190c565b6040516107c39190613aa5565b60405180910390f35b3480156107d857600080fd5b506107e1611955565b6040516107ee9190613f4b565b60405180910390f35b34801561080357600080fd5b5061081e60048036038101906108199190613f92565b6119b2565b005b34801561082c57600080fd5b5061084760048036038101906108429190613c0b565b611b2a565b6040516108549190613aa5565b60405180910390f35b34801561086957600080fd5b50610884600480360381019061087f9190613ffe565b611b5d565b005b34801561089257600080fd5b506108ad60048036038101906108a891906140df565b611c3d565b005b3480156108bb57600080fd5b506108c4611cb0565b6040516108d1919061421d565b60405180910390f35b3480156108e657600080fd5b5061090160048036038101906108fc9190613cae565b611dca565b60405161090e9190613aa5565b60405180910390f35b34801561092357600080fd5b5061093e600480360381019061093991906139f1565b611e88565b60405161094b91906139a3565b60405180910390f35b34801561096057600080fd5b5061097b60048036038101906109769190613c0b565b611ebc565b6040516109889190613aa5565b60405180910390f35b34801561099d57600080fd5b506109a6611f05565b6040516109b39190613b44565b60405180910390f35b3480156109c857600080fd5b506109e360048036038101906109de9190614238565b611f0b565b6040516109f09190613aa5565b60405180910390f35b610a136004803603810190610a0e919061432d565b611f54565b005b348015610a2157600080fd5b50610a3c6004803603810190610a3791906143ae565b6123a3565b005b348015610a4a57600080fd5b50610a536124a9565b604051610a609190613aa5565b60405180910390f35b348015610a7557600080fd5b50610a906004803603810190610a8b9190614401565b6124b3565b604051610a9d91906138ef565b60405180910390f35b348015610ab257600080fd5b50610acd6004803603810190610ac89190613c0b565b612547565b005b348015610adb57600080fd5b50610af66004803603810190610af1919061446d565b6125cb565b005b348015610b0457600080fd5b50610b1f6004803603810190610b1a9190613bde565b61285a565b005b600033905090565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b8457506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610bb45750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b606060028054610bca90614517565b80601f0160208091040260200160405190810160405280929190818152602001828054610bf690614517565b8015610c435780601f10610c1857610100808354040283529160200191610c43565b820191906000526020600020905b815481529060010190602001808311610c2657829003601f168201915b5050505050905090565b6000610c588261286c565b610c8e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610cd782611633565b90508073ffffffffffffffffffffffffffffffffffffffff16610cf86128cb565b73ffffffffffffffffffffffffffffffffffffffff1614610d5b57610d2481610d1f6128cb565b6124b3565b610d5a576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610e1a6128d3565b6001546000540303905090565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610ea9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea0906145bb565b60405180910390fd5b6000610eb482611b2a565b90506000811415610efa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef19061464d565b60405180910390fd5b80600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f49919061469c565b9250508190555080600b6000828254610f62919061469c565b92505081905550610f7382826128dc565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568282604051610fa4929190614751565b60405180910390a15050565b60125481565b6000610fc1826129d0565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611028576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061103484612a9e565b9150915061104a81876110456128cb565b612ac5565b6110965761105f8661105a6128cb565b6124b3565b611095576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156110fd576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61110a8686866001612b09565b801561111557600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506111e3856111bf888887612b0f565b7c020000000000000000000000000000000000000000000000000000000017612b37565b600460008681526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008416141561126b576000600185019050600060046000838152602001908152602001600020541415611269576000548114611268578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46112d38686866001612b62565b505050505050565b6112e3612b68565b8060128190555050565b60116020528060005260406000206000915054906101000a900461ffff1681565b6000600a54905090565b6000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900461ffff169050919050565b61141183838360405180602001604052806000815250611c3d565b505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148f906145bb565b60405180910390fd5b60006114a48383611dca565b905060008114156114ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e19061464d565b60405180910390fd5b80601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611576919061469c565b9250508190555080600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115cc919061469c565b925050819055506115de838383612be6565b8273ffffffffffffffffffffffffffffffffffffffff167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a8383604051611626929190613812565b60405180910390a2505050565b600061163e826129d0565b9050919050565b61164d612b68565b80601490805190602001906116639291906136b2565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116cf576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b60606014805461172f90614517565b80601f016020809104026020016040519081016040528092919081815260200182805461175b90614517565b80156117a85780601f1061177d576101008083540402835291602001916117a8565b820191906000526020600020905b81548152906001019060200180831161178b57829003601f168201915b5050505050905090565b6117ba612b68565b6117c46000612c6c565b565b6000601660009054906101000a900460ff16905090565b600080601254601354915091509091565b6000600e82815481106118045761180361477a565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606003805461186f90614517565b80601f016020809104026020016040519081016040528092919081815260200182805461189b90614517565b80156118e85780601f106118bd576101008083540402835291602001916118e8565b820191906000526020600020905b8154815290600101906020018083116118cb57829003601f168201915b5050505050905090565b6000601560000160199054906101000a900460ff16905090565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000601560000160189054906101000a900460ff161561199157601560000160069054906101000a900468ffffffffffffffffff1690506119af565b6015600001600f9054906101000a900468ffffffffffffffffff1690505b90565b6119ba6128cb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a1f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611a2c6128cb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611ad96128cb565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b1e91906138ef565b60405180910390a35050565b600080611b356124a9565b47611b40919061469c565b9050611b558382611b508661190c565b612d32565b915050919050565b60026009541415611ba3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9a906147f5565b60405180910390fd5b6002600981905550611bb3612b68565b601560000160009054906101000a900461ffff1661ffff168161ffff16611bd8610e10565b611be2919061469c565b1115611c23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1a90614861565b60405180910390fd5b611c31828261ffff16612da0565b60016009819055505050565b611c48848484610fb6565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611caa57611c7384848484612dbe565b611ca9576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b611cb8613738565b60156040518060e00160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016000820160029054906101000a900461ffff1661ffff1661ffff1681526020016000820160049054906101000a900461ffff1661ffff1661ffff1681526020016000820160069054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600f9054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff1681526020016000820160189054906101000a900460ff161515151581526020016000820160199054906101000a900460ff161515151581525050905090565b600080611dd684611f0b565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611e0f9190613a1e565b60206040518083038186803b158015611e2757600080fd5b505afa158015611e3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5f9190614896565b611e69919061469c565b9050611e7f8382611e7a8787611318565b612d32565b91505092915050565b60606014611e9583612f1e565b604051602001611ea6929190614993565b6040516020818303038152906040529050919050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60135481565b6000600f60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60026009541415611f9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f91906147f5565b60405180910390fd5b6002600981905550348261ffff16611fb0611955565b611fba91906149b7565b68ffffffffffffffffff161115612006576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ffd90614a46565b60405180910390fd5b6000601560000160009054906101000a900461ffff1690506000601560000160029054906101000a900461ffff1690506000601560000160049054906101000a900461ffff1690508061ffff168561ffff161115612099576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209090614ab2565b60405180910390fd5b8261ffff168561ffff166120ab610e10565b6120b5919061469c565b11156120f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ed90614861565b60405180910390fd5b6000601560000160199054906101000a900460ff1690506000601560000160189054906101000a900460ff1690506000600181111561213857612137613e6c565b5b601660009054906101000a900460ff16600181111561215a57612159613e6c565b5b14156121a557816121a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219790614b1e565b60405180910390fd5b6121e6565b806121e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121dc90614b8a565b60405180910390fd5b5b8361ffff1687601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900461ffff166122449190614baa565b61ffff161115612289576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228090614c54565b60405180910390fd5b60018081111561229c5761229b613e6c565b5b601660009054906101000a900460ff1660018111156122be576122bd613e6c565b5b141561230e576122ce338761307f565b61230d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230490614cc0565b60405180910390fd5b5b86601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900461ffff1661236a9190614baa565b92506101000a81548161ffff021916908361ffff160217905550612392338861ffff16612da0565b505050505060016009819055505050565b6123ab612b68565b81156123f75780156123f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e990614d52565b60405180910390fd5b612440565b801561243f57811561243e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243590614d52565b60405180910390fd5b5b5b82601660006101000a81548160ff0219169083600181111561246557612464613e6c565b5b021790555081601560000160186101000a81548160ff02191690831515021790555080601560000160196101000a81548160ff021916908315150217905550505050565b6000600b54905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61254f612b68565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156125bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125b690614de4565b60405180910390fd5b6125c881612c6c565b50565b6125d3612b68565b60008561ffff16101561261b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261290614e76565b60405180910390fd5b60008461ffff161015612663576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161265a90614f08565b60405180910390fd5b60008361ffff1610156126ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126a290614f9a565b60405180910390fd5b60008268ffffffffffffffffff1610156126fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f19061502c565b60405180910390fd5b60008168ffffffffffffffffff161015612749576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612740906150be565b60405180910390fd5b612751610e10565b8561ffff161015612797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278e90615150565b60405180910390fd5b84601560000160006101000a81548161ffff021916908361ffff16021790555083601560000160026101000a81548161ffff021916908361ffff16021790555082601560000160046101000a81548161ffff021916908361ffff16021790555081601560000160066101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550806015600001600f6101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff1602179055505050505050565b612862612b68565b8060138190555050565b6000816128776128d3565b11158015612886575060005482105b80156128c4575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b8047101561291f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612916906151bc565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516129459061520d565b60006040518083038185875af1925050503d8060008114612982576040519150601f19603f3d011682016040523d82523d6000602084013e612987565b606091505b50509050806129cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129c290615294565b60405180910390fd5b505050565b600080829050806129df6128d3565b11612a6757600054811015612a665760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612a64575b6000811415612a5a576004600083600190039350838152602001908152602001600020549050612a2f565b8092505050612a99565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612b26868684613113565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b612b70610b21565b73ffffffffffffffffffffffffffffffffffffffff16612b8e611836565b73ffffffffffffffffffffffffffffffffffffffff1614612be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bdb90615300565b60405180910390fd5b565b612c678363a9059cbb60e01b8484604051602401612c05929190613812565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061311c565b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600a54600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205485612d839190615320565b612d8d91906153a9565b612d9791906153da565b90509392505050565b612dba8282604051806020016040528060008152506131e3565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612de46128cb565b8786866040518563ffffffff1660e01b8152600401612e069493929190615463565b602060405180830381600087803b158015612e2057600080fd5b505af1925050508015612e5157506040513d601f19601f82011682018060405250810190612e4e91906154c4565b60015b612ecb573d8060008114612e81576040519150601f19603f3d011682016040523d82523d6000602084013e612e86565b606091505b50600081511415612ec3576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60606000821415612f66576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061307a565b600082905060005b60008214612f98578080612f81906154f1565b915050600a82612f9191906153a9565b9150612f6e565b60008167ffffffffffffffff811115612fb457612fb3613cf8565b5b6040519080825280601f01601f191660200182016040528015612fe65781602001600182028036833780820191505090505b5090505b6000851461307357600182612fff91906153da565b9150600a8561300e919061553a565b603061301a919061469c565b60f81b8183815181106130305761302f61477a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561306c91906153a9565b9450612fea565b8093505050505b919050565b6000808360405160200161309391906155b3565b604051602081830303815290604052805190602001209050600060018111156130bf576130be613e6c565b5b601660009054906101000a900460ff1660018111156130e1576130e0613e6c565b5b14156130fc576130f48360135483613280565b91505061310d565b6131098360125483613280565b9150505b92915050565b60009392505050565b600061317e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166132979092919063ffffffff16565b90506000815111156131de578080602001905181019061319e91906155e3565b6131dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131d490615682565b60405180910390fd5b5b505050565b6131ed83836132af565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461327b57600080549050600083820390505b61322d6000868380600101945086612dbe565b613263576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061321a57816000541461327857600080fd5b50505b505050565b60008261328d858461346c565b1490509392505050565b60606132a684846000856134c2565b90509392505050565b60008054905060008214156132f0576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132fd6000848385612b09565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613374836133656000866000612b0f565b61336e856135d6565b17612b37565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461341557808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506133da565b506000821415613451576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506134676000848385612b62565b505050565b60008082905060005b84518110156134b7576134a2828683815181106134955761349461477a565b5b60200260200101516135e6565b915080806134af906154f1565b915050613475565b508091505092915050565b606082471015613507576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134fe90615714565b60405180910390fd5b61351085613611565b61354f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161354690615780565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161357891906157d1565b60006040518083038185875af1925050503d80600081146135b5576040519150601f19603f3d011682016040523d82523d6000602084013e6135ba565b606091505b50915091506135ca828286613634565b92505050949350505050565b60006001821460e11b9050919050565b60008183106135fe576135f9828461369b565b613609565b613608838361369b565b5b905092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561364457829050613694565b6000835111156136575782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161368b91906139a3565b60405180910390fd5b9392505050565b600082600052816020526040600020905092915050565b8280546136be90614517565b90600052602060002090601f0160209004810192826136e05760008555613727565b82601f106136f957805160ff1916838001178555613727565b82800160010185558215613727579182015b8281111561372657825182559160200191906001019061370b565b5b509050613734919061379b565b5090565b6040518060e00160405280600061ffff168152602001600061ffff168152602001600061ffff168152602001600068ffffffffffffffffff168152602001600068ffffffffffffffffff1681526020016000151581526020016000151581525090565b5b808211156137b457600081600090555060010161379c565b5090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006137e3826137b8565b9050919050565b6137f3816137d8565b82525050565b6000819050919050565b61380c816137f9565b82525050565b600060408201905061382760008301856137ea565b6138346020830184613803565b9392505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6138848161384f565b811461388f57600080fd5b50565b6000813590506138a18161387b565b92915050565b6000602082840312156138bd576138bc613845565b5b60006138cb84828501613892565b91505092915050565b60008115159050919050565b6138e9816138d4565b82525050565b600060208201905061390460008301846138e0565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613944578082015181840152602081019050613929565b83811115613953576000848401525b50505050565b6000601f19601f8301169050919050565b60006139758261390a565b61397f8185613915565b935061398f818560208601613926565b61399881613959565b840191505092915050565b600060208201905081810360008301526139bd818461396a565b905092915050565b6139ce816137f9565b81146139d957600080fd5b50565b6000813590506139eb816139c5565b92915050565b600060208284031215613a0757613a06613845565b5b6000613a15848285016139dc565b91505092915050565b6000602082019050613a3360008301846137ea565b92915050565b613a42816137d8565b8114613a4d57600080fd5b50565b600081359050613a5f81613a39565b92915050565b60008060408385031215613a7c57613a7b613845565b5b6000613a8a85828601613a50565b9250506020613a9b858286016139dc565b9150509250929050565b6000602082019050613aba6000830184613803565b92915050565b6000613acb826137b8565b9050919050565b613adb81613ac0565b8114613ae657600080fd5b50565b600081359050613af881613ad2565b92915050565b600060208284031215613b1457613b13613845565b5b6000613b2284828501613ae9565b91505092915050565b6000819050919050565b613b3e81613b2b565b82525050565b6000602082019050613b596000830184613b35565b92915050565b600080600060608486031215613b7857613b77613845565b5b6000613b8686828701613a50565b9350506020613b9786828701613a50565b9250506040613ba8868287016139dc565b9150509250925092565b613bbb81613b2b565b8114613bc657600080fd5b50565b600081359050613bd881613bb2565b92915050565b600060208284031215613bf457613bf3613845565b5b6000613c0284828501613bc9565b91505092915050565b600060208284031215613c2157613c20613845565b5b6000613c2f84828501613a50565b91505092915050565b600061ffff82169050919050565b613c4f81613c38565b82525050565b6000602082019050613c6a6000830184613c46565b92915050565b6000613c7b826137d8565b9050919050565b613c8b81613c70565b8114613c9657600080fd5b50565b600081359050613ca881613c82565b92915050565b60008060408385031215613cc557613cc4613845565b5b6000613cd385828601613c99565b9250506020613ce485828601613a50565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613d3082613959565b810181811067ffffffffffffffff82111715613d4f57613d4e613cf8565b5b80604052505050565b6000613d6261383b565b9050613d6e8282613d27565b919050565b600067ffffffffffffffff821115613d8e57613d8d613cf8565b5b613d9782613959565b9050602081019050919050565b82818337600083830152505050565b6000613dc6613dc184613d73565b613d58565b905082815260208101848484011115613de257613de1613cf3565b5b613ded848285613da4565b509392505050565b600082601f830112613e0a57613e09613cee565b5b8135613e1a848260208601613db3565b91505092915050565b600060208284031215613e3957613e38613845565b5b600082013567ffffffffffffffff811115613e5757613e5661384a565b5b613e6384828501613df5565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110613eac57613eab613e6c565b5b50565b6000819050613ebd82613e9b565b919050565b6000613ecd82613eaf565b9050919050565b613edd81613ec2565b82525050565b6000602082019050613ef86000830184613ed4565b92915050565b6000604082019050613f136000830185613b35565b613f206020830184613b35565b9392505050565b600068ffffffffffffffffff82169050919050565b613f4581613f27565b82525050565b6000602082019050613f606000830184613f3c565b92915050565b613f6f816138d4565b8114613f7a57600080fd5b50565b600081359050613f8c81613f66565b92915050565b60008060408385031215613fa957613fa8613845565b5b6000613fb785828601613a50565b9250506020613fc885828601613f7d565b9150509250929050565b613fdb81613c38565b8114613fe657600080fd5b50565b600081359050613ff881613fd2565b92915050565b6000806040838503121561401557614014613845565b5b600061402385828601613a50565b925050602061403485828601613fe9565b9150509250929050565b600067ffffffffffffffff82111561405957614058613cf8565b5b61406282613959565b9050602081019050919050565b600061408261407d8461403e565b613d58565b90508281526020810184848401111561409e5761409d613cf3565b5b6140a9848285613da4565b509392505050565b600082601f8301126140c6576140c5613cee565b5b81356140d684826020860161406f565b91505092915050565b600080600080608085870312156140f9576140f8613845565b5b600061410787828801613a50565b945050602061411887828801613a50565b9350506040614129878288016139dc565b925050606085013567ffffffffffffffff81111561414a5761414961384a565b5b614156878288016140b1565b91505092959194509250565b61416b81613c38565b82525050565b61417a81613f27565b82525050565b614189816138d4565b82525050565b60e0820160008201516141a56000850182614162565b5060208201516141b86020850182614162565b5060408201516141cb6040850182614162565b5060608201516141de6060850182614171565b5060808201516141f16080850182614171565b5060a082015161420460a0850182614180565b5060c082015161421760c0850182614180565b50505050565b600060e082019050614232600083018461418f565b92915050565b60006020828403121561424e5761424d613845565b5b600061425c84828501613c99565b91505092915050565b600067ffffffffffffffff8211156142805761427f613cf8565b5b602082029050602081019050919050565b600080fd5b60006142a96142a484614265565b613d58565b905080838252602082019050602084028301858111156142cc576142cb614291565b5b835b818110156142f557806142e18882613bc9565b8452602084019350506020810190506142ce565b5050509392505050565b600082601f83011261431457614313613cee565b5b8135614324848260208601614296565b91505092915050565b6000806040838503121561434457614343613845565b5b600061435285828601613fe9565b925050602083013567ffffffffffffffff8111156143735761437261384a565b5b61437f858286016142ff565b9150509250929050565b6002811061439657600080fd5b50565b6000813590506143a881614389565b92915050565b6000806000606084860312156143c7576143c6613845565b5b60006143d586828701614399565b93505060206143e686828701613f7d565b92505060406143f786828701613f7d565b9150509250925092565b6000806040838503121561441857614417613845565b5b600061442685828601613a50565b925050602061443785828601613a50565b9150509250929050565b61444a81613f27565b811461445557600080fd5b50565b60008135905061446781614441565b92915050565b600080600080600060a0868803121561448957614488613845565b5b600061449788828901613fe9565b95505060206144a888828901613fe9565b94505060406144b988828901613fe9565b93505060606144ca88828901614458565b92505060806144db88828901614458565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061452f57607f821691505b60208210811415614543576145426144e8565b5b50919050565b7f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060008201527f7368617265730000000000000000000000000000000000000000000000000000602082015250565b60006145a5602683613915565b91506145b082614549565b604082019050919050565b600060208201905081810360008301526145d481614598565b9050919050565b7f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060008201527f647565207061796d656e74000000000000000000000000000000000000000000602082015250565b6000614637602b83613915565b9150614642826145db565b604082019050919050565b600060208201905081810360008301526146668161462a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006146a7826137f9565b91506146b2836137f9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156146e7576146e661466d565b5b828201905092915050565b6000819050919050565b600061471761471261470d846137b8565b6146f2565b6137b8565b9050919050565b6000614729826146fc565b9050919050565b600061473b8261471e565b9050919050565b61474b81614730565b82525050565b60006040820190506147666000830185614742565b6147736020830184613803565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006147df601f83613915565b91506147ea826147a9565b602082019050919050565b6000602082019050818103600083015261480e816147d2565b9050919050565b7f53454355524f4d494e545f455843454544535f544f54414c5f535550504c5900600082015250565b600061484b601f83613915565b915061485682614815565b602082019050919050565b6000602082019050818103600083015261487a8161483e565b9050919050565b600081519050614890816139c5565b92915050565b6000602082840312156148ac576148ab613845565b5b60006148ba84828501614881565b91505092915050565b600081905092915050565b60008190508160005260206000209050919050565b600081546148f081614517565b6148fa81866148c3565b94506001821660008114614915576001811461492657614959565b60ff19831686528186019350614959565b61492f856148ce565b60005b8381101561495157815481890152600182019150602081019050614932565b838801955050505b50505092915050565b600061496d8261390a565b61497781856148c3565b9350614987818560208601613926565b80840191505092915050565b600061499f82856148e3565b91506149ab8284614962565b91508190509392505050565b60006149c282613f27565b91506149cd83613f27565b92508168ffffffffffffffffff04831182151516156149ef576149ee61466d565b5b828202905092915050565b7f53454355524f4d494e545f494e53554646494349454e545f4554480000000000600082015250565b6000614a30601b83613915565b9150614a3b826149fa565b602082019050919050565b60006020820190508181036000830152614a5f81614a23565b9050919050565b7f53454355524f4d494e545f455843454544535f4d41585f5045525f5458000000600082015250565b6000614a9c601d83613915565b9150614aa782614a66565b602082019050919050565b60006020820190508181036000830152614acb81614a8f565b9050919050565b7f53454355524f4d494e545f53414c455f4e4f545f414354495645000000000000600082015250565b6000614b08601a83613915565b9150614b1382614ad2565b602082019050919050565b60006020820190508181036000830152614b3781614afb565b9050919050565b7f53454355524f4d494e545f5052455f53414c455f4e4f545f4143544956450000600082015250565b6000614b74601e83613915565b9150614b7f82614b3e565b602082019050919050565b60006020820190508181036000830152614ba381614b67565b9050919050565b6000614bb582613c38565b9150614bc083613c38565b92508261ffff03821115614bd757614bd661466d565b5b828201905092915050565b7f53454355524f4d494e545f455843454544535f4d41585f5045525f57414c4c4560008201527f5400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614c3e602183613915565b9150614c4982614be2565b604082019050919050565b60006020820190508181036000830152614c6d81614c31565b9050919050565b7f53454355524f4d494e545f4e4f545f57484954454c4953544544000000000000600082015250565b6000614caa601a83613915565b9150614cb582614c74565b602082019050919050565b60006020820190508181036000830152614cd981614c9d565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f53414c455f414e445f5060008201527f52455f53414c455f414354495645000000000000000000000000000000000000602082015250565b6000614d3c602e83613915565b9150614d4782614ce0565b604082019050919050565b60006020820190508181036000830152614d6b81614d2f565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614dce602683613915565b9150614dd982614d72565b604082019050919050565b60006020820190508181036000830152614dfd81614dc1565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f535550504c595f4c455360008201527f535f5448414e5f5a45524f000000000000000000000000000000000000000000602082015250565b6000614e60602b83613915565b9150614e6b82614e04565b604082019050919050565b60006020820190508181036000830152614e8f81614e53565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f4d41585f5045525f574160008201527f4c4c45545f4c4553535f5448414e5f5a45524f00000000000000000000000000602082015250565b6000614ef2603383613915565b9150614efd82614e96565b604082019050919050565b60006020820190508181036000830152614f2181614ee5565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f4d41585f5045525f545860008201527f5f4c4553535f5448414e5f5a45524f0000000000000000000000000000000000602082015250565b6000614f84602f83613915565b9150614f8f82614f28565b604082019050919050565b60006020820190508181036000830152614fb381614f77565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f5052455f53414c455f5060008201527f524943455f4c4553535f5448414e5f5a45524f00000000000000000000000000602082015250565b6000615016603383613915565b915061502182614fba565b604082019050919050565b6000602082019050818103600083015261504581615009565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f53414c455f505249434560008201527f5f4c4553535f5448414e5f5a45524f0000000000000000000000000000000000602082015250565b60006150a8602f83613915565b91506150b38261504c565b604082019050919050565b600060208201905081810360008301526150d78161509b565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f535550504c595f4c455360008201527f535f5448414e5f544f54414c5f535550504c5900000000000000000000000000602082015250565b600061513a603383613915565b9150615145826150de565b604082019050919050565b600060208201905081810360008301526151698161512d565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b60006151a6601d83613915565b91506151b182615170565b602082019050919050565b600060208201905081810360008301526151d581615199565b9050919050565b600081905092915050565b50565b60006151f76000836151dc565b9150615202826151e7565b600082019050919050565b6000615218826151ea565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b600061527e603a83613915565b915061528982615222565b604082019050919050565b600060208201905081810360008301526152ad81615271565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006152ea602083613915565b91506152f5826152b4565b602082019050919050565b60006020820190508181036000830152615319816152dd565b9050919050565b600061532b826137f9565b9150615336836137f9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561536f5761536e61466d565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006153b4826137f9565b91506153bf836137f9565b9250826153cf576153ce61537a565b5b828204905092915050565b60006153e5826137f9565b91506153f0836137f9565b9250828210156154035761540261466d565b5b828203905092915050565b600081519050919050565b600082825260208201905092915050565b60006154358261540e565b61543f8185615419565b935061544f818560208601613926565b61545881613959565b840191505092915050565b600060808201905061547860008301876137ea565b61548560208301866137ea565b6154926040830185613803565b81810360608301526154a4818461542a565b905095945050505050565b6000815190506154be8161387b565b92915050565b6000602082840312156154da576154d9613845565b5b60006154e8848285016154af565b91505092915050565b60006154fc826137f9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561552f5761552e61466d565b5b600182019050919050565b6000615545826137f9565b9150615550836137f9565b9250826155605761555f61537a565b5b828206905092915050565b60008160601b9050919050565b60006155838261556b565b9050919050565b600061559582615578565b9050919050565b6155ad6155a8826137d8565b61558a565b82525050565b60006155bf828461559c565b60148201915081905092915050565b6000815190506155dd81613f66565b92915050565b6000602082840312156155f9576155f8613845565b5b6000615607848285016155ce565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061566c602a83613915565b915061567782615610565b604082019050919050565b6000602082019050818103600083015261569b8161565f565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006156fe602683613915565b9150615709826156a2565b604082019050919050565b6000602082019050818103600083015261572d816156f1565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b600061576a601d83613915565b915061577582615734565b602082019050919050565b600060208201905081810360008301526157998161575d565b9050919050565b60006157ab8261540e565b6157b581856151dc565b93506157c5818560208601613926565b80840191505092915050565b60006157dd82846157a0565b91508190509291505056fea2646970667358221220eff1d561490e28cb94d534d7bd0240ec200fb0c9f2990d520459da85ff1513b464736f6c634300080900330000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000f7c26f7a235631616631d529ce19903d5cad8e600000000000000000000000000000000000000000000000000000000000000d050000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d2b52cfa3c3183ed00ba0e23cbd3c856120448a800000000000000000000000053f6effe7dd9fff2febcc56fb99570e8e84b430e000000000000000000000000a9808045f42a00c2fb9a3e8572100a36b15c9e110000000000000000000000004728ece4b8739867dbab2c2d31b68f2f5cf7ac6500000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000023000000000000000000000000000000000000000000000000000000000000002f68747470733a2f2f77617265686f7573652e73656375726f6d696e742e636f6d2f746573746e65742f4d4f54485a2f0000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102765760003560e01c80638b83209b1161014f578063c45ac050116100c1578063de63b2d31161007a578063de63b2d314610a15578063e33b7de314610a3e578063e985e9c514610a69578063f2fde38b14610aa6578063f60aee4b14610acf578063f91eb63014610af8576102bd565b8063c45ac050146108da578063c87b56dd14610917578063ce7c2ac214610954578063d4a417e614610991578063d79779b2146109bc578063da41bfe1146109f9576102bd565b806398d5fdca1161011357806398d5fdca146107cc578063a22cb465146107f7578063a3f8eace14610820578063ad4f4c591461085d578063b88d4fde14610886578063bef55ef3146108af576102bd565b80638b83209b146106d15780638da5cb5b1461070e57806395d89b411461073957806397db4fe3146107645780639852595c1461078f576102bd565b8063406072a9116101e8578063664aa26b116101ac578063664aa26b146105d257806370a08231146105fb578063714c539814610638578063715018a614610663578063774a88351461067a57806385135a1a146106a5576102bd565b8063406072a9146104c957806340e3c2a31461050657806342842e0e1461054357806348b750441461056c5780636352211e14610595576102bd565b8063191655871161023a57806319165587146103bb57806322212e2b146103e457806323b872dd1461040f57806328d7b2761461043857806338e21cce146104615780633a98ef391461049e576102bd565b806301ffc9a7146102c257806306fdde03146102ff578063081812fc1461032a578063095ea7b31461036757806318160ddd14610390576102bd565b366102bd577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706102a4610b21565b346040516102b3929190613812565b60405180910390a1005b600080fd5b3480156102ce57600080fd5b506102e960048036038101906102e491906138a7565b610b29565b6040516102f691906138ef565b60405180910390f35b34801561030b57600080fd5b50610314610bbb565b60405161032191906139a3565b60405180910390f35b34801561033657600080fd5b50610351600480360381019061034c91906139f1565b610c4d565b60405161035e9190613a1e565b60405180910390f35b34801561037357600080fd5b5061038e60048036038101906103899190613a65565b610ccc565b005b34801561039c57600080fd5b506103a5610e10565b6040516103b29190613aa5565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190613afe565b610e27565b005b3480156103f057600080fd5b506103f9610fb0565b6040516104069190613b44565b60405180910390f35b34801561041b57600080fd5b5061043660048036038101906104319190613b5f565b610fb6565b005b34801561044457600080fd5b5061045f600480360381019061045a9190613bde565b6112db565b005b34801561046d57600080fd5b5061048860048036038101906104839190613c0b565b6112ed565b6040516104959190613c55565b60405180910390f35b3480156104aa57600080fd5b506104b361130e565b6040516104c09190613aa5565b60405180910390f35b3480156104d557600080fd5b506104f060048036038101906104eb9190613cae565b611318565b6040516104fd9190613aa5565b60405180910390f35b34801561051257600080fd5b5061052d60048036038101906105289190613c0b565b61139f565b60405161053a9190613c55565b60405180910390f35b34801561054f57600080fd5b5061056a60048036038101906105659190613b5f565b6113f6565b005b34801561057857600080fd5b50610593600480360381019061058e9190613cae565b611416565b005b3480156105a157600080fd5b506105bc60048036038101906105b791906139f1565b611633565b6040516105c99190613a1e565b60405180910390f35b3480156105de57600080fd5b506105f960048036038101906105f49190613e23565b611645565b005b34801561060757600080fd5b50610622600480360381019061061d9190613c0b565b611667565b60405161062f9190613aa5565b60405180910390f35b34801561064457600080fd5b5061064d611720565b60405161065a91906139a3565b60405180910390f35b34801561066f57600080fd5b506106786117b2565b005b34801561068657600080fd5b5061068f6117c6565b60405161069c9190613ee3565b60405180910390f35b3480156106b157600080fd5b506106ba6117dd565b6040516106c8929190613efe565b60405180910390f35b3480156106dd57600080fd5b506106f860048036038101906106f391906139f1565b6117ee565b6040516107059190613a1e565b60405180910390f35b34801561071a57600080fd5b50610723611836565b6040516107309190613a1e565b60405180910390f35b34801561074557600080fd5b5061074e611860565b60405161075b91906139a3565b60405180910390f35b34801561077057600080fd5b506107796118f2565b60405161078691906138ef565b60405180910390f35b34801561079b57600080fd5b506107b660048036038101906107b19190613c0b565b61190c565b6040516107c39190613aa5565b60405180910390f35b3480156107d857600080fd5b506107e1611955565b6040516107ee9190613f4b565b60405180910390f35b34801561080357600080fd5b5061081e60048036038101906108199190613f92565b6119b2565b005b34801561082c57600080fd5b5061084760048036038101906108429190613c0b565b611b2a565b6040516108549190613aa5565b60405180910390f35b34801561086957600080fd5b50610884600480360381019061087f9190613ffe565b611b5d565b005b34801561089257600080fd5b506108ad60048036038101906108a891906140df565b611c3d565b005b3480156108bb57600080fd5b506108c4611cb0565b6040516108d1919061421d565b60405180910390f35b3480156108e657600080fd5b5061090160048036038101906108fc9190613cae565b611dca565b60405161090e9190613aa5565b60405180910390f35b34801561092357600080fd5b5061093e600480360381019061093991906139f1565b611e88565b60405161094b91906139a3565b60405180910390f35b34801561096057600080fd5b5061097b60048036038101906109769190613c0b565b611ebc565b6040516109889190613aa5565b60405180910390f35b34801561099d57600080fd5b506109a6611f05565b6040516109b39190613b44565b60405180910390f35b3480156109c857600080fd5b506109e360048036038101906109de9190614238565b611f0b565b6040516109f09190613aa5565b60405180910390f35b610a136004803603810190610a0e919061432d565b611f54565b005b348015610a2157600080fd5b50610a3c6004803603810190610a3791906143ae565b6123a3565b005b348015610a4a57600080fd5b50610a536124a9565b604051610a609190613aa5565b60405180910390f35b348015610a7557600080fd5b50610a906004803603810190610a8b9190614401565b6124b3565b604051610a9d91906138ef565b60405180910390f35b348015610ab257600080fd5b50610acd6004803603810190610ac89190613c0b565b612547565b005b348015610adb57600080fd5b50610af66004803603810190610af1919061446d565b6125cb565b005b348015610b0457600080fd5b50610b1f6004803603810190610b1a9190613bde565b61285a565b005b600033905090565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b8457506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610bb45750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b606060028054610bca90614517565b80601f0160208091040260200160405190810160405280929190818152602001828054610bf690614517565b8015610c435780601f10610c1857610100808354040283529160200191610c43565b820191906000526020600020905b815481529060010190602001808311610c2657829003601f168201915b5050505050905090565b6000610c588261286c565b610c8e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610cd782611633565b90508073ffffffffffffffffffffffffffffffffffffffff16610cf86128cb565b73ffffffffffffffffffffffffffffffffffffffff1614610d5b57610d2481610d1f6128cb565b6124b3565b610d5a576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610e1a6128d3565b6001546000540303905090565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610ea9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea0906145bb565b60405180910390fd5b6000610eb482611b2a565b90506000811415610efa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef19061464d565b60405180910390fd5b80600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f49919061469c565b9250508190555080600b6000828254610f62919061469c565b92505081905550610f7382826128dc565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568282604051610fa4929190614751565b60405180910390a15050565b60125481565b6000610fc1826129d0565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611028576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061103484612a9e565b9150915061104a81876110456128cb565b612ac5565b6110965761105f8661105a6128cb565b6124b3565b611095576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156110fd576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61110a8686866001612b09565b801561111557600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506111e3856111bf888887612b0f565b7c020000000000000000000000000000000000000000000000000000000017612b37565b600460008681526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008416141561126b576000600185019050600060046000838152602001908152602001600020541415611269576000548114611268578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46112d38686866001612b62565b505050505050565b6112e3612b68565b8060128190555050565b60116020528060005260406000206000915054906101000a900461ffff1681565b6000600a54905090565b6000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900461ffff169050919050565b61141183838360405180602001604052806000815250611c3d565b505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611498576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148f906145bb565b60405180910390fd5b60006114a48383611dca565b905060008114156114ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e19061464d565b60405180910390fd5b80601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611576919061469c565b9250508190555080600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115cc919061469c565b925050819055506115de838383612be6565b8273ffffffffffffffffffffffffffffffffffffffff167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a8383604051611626929190613812565b60405180910390a2505050565b600061163e826129d0565b9050919050565b61164d612b68565b80601490805190602001906116639291906136b2565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116cf576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b60606014805461172f90614517565b80601f016020809104026020016040519081016040528092919081815260200182805461175b90614517565b80156117a85780601f1061177d576101008083540402835291602001916117a8565b820191906000526020600020905b81548152906001019060200180831161178b57829003601f168201915b5050505050905090565b6117ba612b68565b6117c46000612c6c565b565b6000601660009054906101000a900460ff16905090565b600080601254601354915091509091565b6000600e82815481106118045761180361477a565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606003805461186f90614517565b80601f016020809104026020016040519081016040528092919081815260200182805461189b90614517565b80156118e85780601f106118bd576101008083540402835291602001916118e8565b820191906000526020600020905b8154815290600101906020018083116118cb57829003601f168201915b5050505050905090565b6000601560000160199054906101000a900460ff16905090565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000601560000160189054906101000a900460ff161561199157601560000160069054906101000a900468ffffffffffffffffff1690506119af565b6015600001600f9054906101000a900468ffffffffffffffffff1690505b90565b6119ba6128cb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a1f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611a2c6128cb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611ad96128cb565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b1e91906138ef565b60405180910390a35050565b600080611b356124a9565b47611b40919061469c565b9050611b558382611b508661190c565b612d32565b915050919050565b60026009541415611ba3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9a906147f5565b60405180910390fd5b6002600981905550611bb3612b68565b601560000160009054906101000a900461ffff1661ffff168161ffff16611bd8610e10565b611be2919061469c565b1115611c23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1a90614861565b60405180910390fd5b611c31828261ffff16612da0565b60016009819055505050565b611c48848484610fb6565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611caa57611c7384848484612dbe565b611ca9576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b611cb8613738565b60156040518060e00160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016000820160029054906101000a900461ffff1661ffff1661ffff1681526020016000820160049054906101000a900461ffff1661ffff1661ffff1681526020016000820160069054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff16815260200160008201600f9054906101000a900468ffffffffffffffffff1668ffffffffffffffffff1668ffffffffffffffffff1681526020016000820160189054906101000a900460ff161515151581526020016000820160199054906101000a900460ff161515151581525050905090565b600080611dd684611f0b565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611e0f9190613a1e565b60206040518083038186803b158015611e2757600080fd5b505afa158015611e3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5f9190614896565b611e69919061469c565b9050611e7f8382611e7a8787611318565b612d32565b91505092915050565b60606014611e9583612f1e565b604051602001611ea6929190614993565b6040516020818303038152906040529050919050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60135481565b6000600f60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60026009541415611f9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f91906147f5565b60405180910390fd5b6002600981905550348261ffff16611fb0611955565b611fba91906149b7565b68ffffffffffffffffff161115612006576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ffd90614a46565b60405180910390fd5b6000601560000160009054906101000a900461ffff1690506000601560000160029054906101000a900461ffff1690506000601560000160049054906101000a900461ffff1690508061ffff168561ffff161115612099576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161209090614ab2565b60405180910390fd5b8261ffff168561ffff166120ab610e10565b6120b5919061469c565b11156120f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ed90614861565b60405180910390fd5b6000601560000160199054906101000a900460ff1690506000601560000160189054906101000a900460ff1690506000600181111561213857612137613e6c565b5b601660009054906101000a900460ff16600181111561215a57612159613e6c565b5b14156121a557816121a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161219790614b1e565b60405180910390fd5b6121e6565b806121e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121dc90614b8a565b60405180910390fd5b5b8361ffff1687601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900461ffff166122449190614baa565b61ffff161115612289576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228090614c54565b60405180910390fd5b60018081111561229c5761229b613e6c565b5b601660009054906101000a900460ff1660018111156122be576122bd613e6c565b5b141561230e576122ce338761307f565b61230d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230490614cc0565b60405180910390fd5b5b86601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900461ffff1661236a9190614baa565b92506101000a81548161ffff021916908361ffff160217905550612392338861ffff16612da0565b505050505060016009819055505050565b6123ab612b68565b81156123f75780156123f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e990614d52565b60405180910390fd5b612440565b801561243f57811561243e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243590614d52565b60405180910390fd5b5b5b82601660006101000a81548160ff0219169083600181111561246557612464613e6c565b5b021790555081601560000160186101000a81548160ff02191690831515021790555080601560000160196101000a81548160ff021916908315150217905550505050565b6000600b54905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61254f612b68565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156125bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125b690614de4565b60405180910390fd5b6125c881612c6c565b50565b6125d3612b68565b60008561ffff16101561261b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261290614e76565b60405180910390fd5b60008461ffff161015612663576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161265a90614f08565b60405180910390fd5b60008361ffff1610156126ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126a290614f9a565b60405180910390fd5b60008268ffffffffffffffffff1610156126fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f19061502c565b60405180910390fd5b60008168ffffffffffffffffff161015612749576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612740906150be565b60405180910390fd5b612751610e10565b8561ffff161015612797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278e90615150565b60405180910390fd5b84601560000160006101000a81548161ffff021916908361ffff16021790555083601560000160026101000a81548161ffff021916908361ffff16021790555082601560000160046101000a81548161ffff021916908361ffff16021790555081601560000160066101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff160217905550806015600001600f6101000a81548168ffffffffffffffffff021916908368ffffffffffffffffff1602179055505050505050565b612862612b68565b8060138190555050565b6000816128776128d3565b11158015612886575060005482105b80156128c4575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b8047101561291f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612916906151bc565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516129459061520d565b60006040518083038185875af1925050503d8060008114612982576040519150601f19603f3d011682016040523d82523d6000602084013e612987565b606091505b50509050806129cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129c290615294565b60405180910390fd5b505050565b600080829050806129df6128d3565b11612a6757600054811015612a665760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612a64575b6000811415612a5a576004600083600190039350838152602001908152602001600020549050612a2f565b8092505050612a99565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612b26868684613113565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b612b70610b21565b73ffffffffffffffffffffffffffffffffffffffff16612b8e611836565b73ffffffffffffffffffffffffffffffffffffffff1614612be4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bdb90615300565b60405180910390fd5b565b612c678363a9059cbb60e01b8484604051602401612c05929190613812565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061311c565b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081600a54600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205485612d839190615320565b612d8d91906153a9565b612d9791906153da565b90509392505050565b612dba8282604051806020016040528060008152506131e3565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612de46128cb565b8786866040518563ffffffff1660e01b8152600401612e069493929190615463565b602060405180830381600087803b158015612e2057600080fd5b505af1925050508015612e5157506040513d601f19601f82011682018060405250810190612e4e91906154c4565b60015b612ecb573d8060008114612e81576040519150601f19603f3d011682016040523d82523d6000602084013e612e86565b606091505b50600081511415612ec3576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60606000821415612f66576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061307a565b600082905060005b60008214612f98578080612f81906154f1565b915050600a82612f9191906153a9565b9150612f6e565b60008167ffffffffffffffff811115612fb457612fb3613cf8565b5b6040519080825280601f01601f191660200182016040528015612fe65781602001600182028036833780820191505090505b5090505b6000851461307357600182612fff91906153da565b9150600a8561300e919061553a565b603061301a919061469c565b60f81b8183815181106130305761302f61477a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561306c91906153a9565b9450612fea565b8093505050505b919050565b6000808360405160200161309391906155b3565b604051602081830303815290604052805190602001209050600060018111156130bf576130be613e6c565b5b601660009054906101000a900460ff1660018111156130e1576130e0613e6c565b5b14156130fc576130f48360135483613280565b91505061310d565b6131098360125483613280565b9150505b92915050565b60009392505050565b600061317e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166132979092919063ffffffff16565b90506000815111156131de578080602001905181019061319e91906155e3565b6131dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131d490615682565b60405180910390fd5b5b505050565b6131ed83836132af565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461327b57600080549050600083820390505b61322d6000868380600101945086612dbe565b613263576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061321a57816000541461327857600080fd5b50505b505050565b60008261328d858461346c565b1490509392505050565b60606132a684846000856134c2565b90509392505050565b60008054905060008214156132f0576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132fd6000848385612b09565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613374836133656000866000612b0f565b61336e856135d6565b17612b37565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461341557808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506133da565b506000821415613451576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506134676000848385612b62565b505050565b60008082905060005b84518110156134b7576134a2828683815181106134955761349461477a565b5b60200260200101516135e6565b915080806134af906154f1565b915050613475565b508091505092915050565b606082471015613507576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134fe90615714565b60405180910390fd5b61351085613611565b61354f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161354690615780565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161357891906157d1565b60006040518083038185875af1925050503d80600081146135b5576040519150601f19603f3d011682016040523d82523d6000602084013e6135ba565b606091505b50915091506135ca828286613634565b92505050949350505050565b60006001821460e11b9050919050565b60008183106135fe576135f9828461369b565b613609565b613608838361369b565b5b905092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561364457829050613694565b6000835111156136575782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161368b91906139a3565b60405180910390fd5b9392505050565b600082600052816020526040600020905092915050565b8280546136be90614517565b90600052602060002090601f0160209004810192826136e05760008555613727565b82601f106136f957805160ff1916838001178555613727565b82800160010185558215613727579182015b8281111561372657825182559160200191906001019061370b565b5b509050613734919061379b565b5090565b6040518060e00160405280600061ffff168152602001600061ffff168152602001600061ffff168152602001600068ffffffffffffffffff168152602001600068ffffffffffffffffff1681526020016000151581526020016000151581525090565b5b808211156137b457600081600090555060010161379c565b5090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006137e3826137b8565b9050919050565b6137f3816137d8565b82525050565b6000819050919050565b61380c816137f9565b82525050565b600060408201905061382760008301856137ea565b6138346020830184613803565b9392505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6138848161384f565b811461388f57600080fd5b50565b6000813590506138a18161387b565b92915050565b6000602082840312156138bd576138bc613845565b5b60006138cb84828501613892565b91505092915050565b60008115159050919050565b6138e9816138d4565b82525050565b600060208201905061390460008301846138e0565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613944578082015181840152602081019050613929565b83811115613953576000848401525b50505050565b6000601f19601f8301169050919050565b60006139758261390a565b61397f8185613915565b935061398f818560208601613926565b61399881613959565b840191505092915050565b600060208201905081810360008301526139bd818461396a565b905092915050565b6139ce816137f9565b81146139d957600080fd5b50565b6000813590506139eb816139c5565b92915050565b600060208284031215613a0757613a06613845565b5b6000613a15848285016139dc565b91505092915050565b6000602082019050613a3360008301846137ea565b92915050565b613a42816137d8565b8114613a4d57600080fd5b50565b600081359050613a5f81613a39565b92915050565b60008060408385031215613a7c57613a7b613845565b5b6000613a8a85828601613a50565b9250506020613a9b858286016139dc565b9150509250929050565b6000602082019050613aba6000830184613803565b92915050565b6000613acb826137b8565b9050919050565b613adb81613ac0565b8114613ae657600080fd5b50565b600081359050613af881613ad2565b92915050565b600060208284031215613b1457613b13613845565b5b6000613b2284828501613ae9565b91505092915050565b6000819050919050565b613b3e81613b2b565b82525050565b6000602082019050613b596000830184613b35565b92915050565b600080600060608486031215613b7857613b77613845565b5b6000613b8686828701613a50565b9350506020613b9786828701613a50565b9250506040613ba8868287016139dc565b9150509250925092565b613bbb81613b2b565b8114613bc657600080fd5b50565b600081359050613bd881613bb2565b92915050565b600060208284031215613bf457613bf3613845565b5b6000613c0284828501613bc9565b91505092915050565b600060208284031215613c2157613c20613845565b5b6000613c2f84828501613a50565b91505092915050565b600061ffff82169050919050565b613c4f81613c38565b82525050565b6000602082019050613c6a6000830184613c46565b92915050565b6000613c7b826137d8565b9050919050565b613c8b81613c70565b8114613c9657600080fd5b50565b600081359050613ca881613c82565b92915050565b60008060408385031215613cc557613cc4613845565b5b6000613cd385828601613c99565b9250506020613ce485828601613a50565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613d3082613959565b810181811067ffffffffffffffff82111715613d4f57613d4e613cf8565b5b80604052505050565b6000613d6261383b565b9050613d6e8282613d27565b919050565b600067ffffffffffffffff821115613d8e57613d8d613cf8565b5b613d9782613959565b9050602081019050919050565b82818337600083830152505050565b6000613dc6613dc184613d73565b613d58565b905082815260208101848484011115613de257613de1613cf3565b5b613ded848285613da4565b509392505050565b600082601f830112613e0a57613e09613cee565b5b8135613e1a848260208601613db3565b91505092915050565b600060208284031215613e3957613e38613845565b5b600082013567ffffffffffffffff811115613e5757613e5661384a565b5b613e6384828501613df5565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110613eac57613eab613e6c565b5b50565b6000819050613ebd82613e9b565b919050565b6000613ecd82613eaf565b9050919050565b613edd81613ec2565b82525050565b6000602082019050613ef86000830184613ed4565b92915050565b6000604082019050613f136000830185613b35565b613f206020830184613b35565b9392505050565b600068ffffffffffffffffff82169050919050565b613f4581613f27565b82525050565b6000602082019050613f606000830184613f3c565b92915050565b613f6f816138d4565b8114613f7a57600080fd5b50565b600081359050613f8c81613f66565b92915050565b60008060408385031215613fa957613fa8613845565b5b6000613fb785828601613a50565b9250506020613fc885828601613f7d565b9150509250929050565b613fdb81613c38565b8114613fe657600080fd5b50565b600081359050613ff881613fd2565b92915050565b6000806040838503121561401557614014613845565b5b600061402385828601613a50565b925050602061403485828601613fe9565b9150509250929050565b600067ffffffffffffffff82111561405957614058613cf8565b5b61406282613959565b9050602081019050919050565b600061408261407d8461403e565b613d58565b90508281526020810184848401111561409e5761409d613cf3565b5b6140a9848285613da4565b509392505050565b600082601f8301126140c6576140c5613cee565b5b81356140d684826020860161406f565b91505092915050565b600080600080608085870312156140f9576140f8613845565b5b600061410787828801613a50565b945050602061411887828801613a50565b9350506040614129878288016139dc565b925050606085013567ffffffffffffffff81111561414a5761414961384a565b5b614156878288016140b1565b91505092959194509250565b61416b81613c38565b82525050565b61417a81613f27565b82525050565b614189816138d4565b82525050565b60e0820160008201516141a56000850182614162565b5060208201516141b86020850182614162565b5060408201516141cb6040850182614162565b5060608201516141de6060850182614171565b5060808201516141f16080850182614171565b5060a082015161420460a0850182614180565b5060c082015161421760c0850182614180565b50505050565b600060e082019050614232600083018461418f565b92915050565b60006020828403121561424e5761424d613845565b5b600061425c84828501613c99565b91505092915050565b600067ffffffffffffffff8211156142805761427f613cf8565b5b602082029050602081019050919050565b600080fd5b60006142a96142a484614265565b613d58565b905080838252602082019050602084028301858111156142cc576142cb614291565b5b835b818110156142f557806142e18882613bc9565b8452602084019350506020810190506142ce565b5050509392505050565b600082601f83011261431457614313613cee565b5b8135614324848260208601614296565b91505092915050565b6000806040838503121561434457614343613845565b5b600061435285828601613fe9565b925050602083013567ffffffffffffffff8111156143735761437261384a565b5b61437f858286016142ff565b9150509250929050565b6002811061439657600080fd5b50565b6000813590506143a881614389565b92915050565b6000806000606084860312156143c7576143c6613845565b5b60006143d586828701614399565b93505060206143e686828701613f7d565b92505060406143f786828701613f7d565b9150509250925092565b6000806040838503121561441857614417613845565b5b600061442685828601613a50565b925050602061443785828601613a50565b9150509250929050565b61444a81613f27565b811461445557600080fd5b50565b60008135905061446781614441565b92915050565b600080600080600060a0868803121561448957614488613845565b5b600061449788828901613fe9565b95505060206144a888828901613fe9565b94505060406144b988828901613fe9565b93505060606144ca88828901614458565b92505060806144db88828901614458565b9150509295509295909350565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061452f57607f821691505b60208210811415614543576145426144e8565b5b50919050565b7f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060008201527f7368617265730000000000000000000000000000000000000000000000000000602082015250565b60006145a5602683613915565b91506145b082614549565b604082019050919050565b600060208201905081810360008301526145d481614598565b9050919050565b7f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060008201527f647565207061796d656e74000000000000000000000000000000000000000000602082015250565b6000614637602b83613915565b9150614642826145db565b604082019050919050565b600060208201905081810360008301526146668161462a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006146a7826137f9565b91506146b2836137f9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156146e7576146e661466d565b5b828201905092915050565b6000819050919050565b600061471761471261470d846137b8565b6146f2565b6137b8565b9050919050565b6000614729826146fc565b9050919050565b600061473b8261471e565b9050919050565b61474b81614730565b82525050565b60006040820190506147666000830185614742565b6147736020830184613803565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006147df601f83613915565b91506147ea826147a9565b602082019050919050565b6000602082019050818103600083015261480e816147d2565b9050919050565b7f53454355524f4d494e545f455843454544535f544f54414c5f535550504c5900600082015250565b600061484b601f83613915565b915061485682614815565b602082019050919050565b6000602082019050818103600083015261487a8161483e565b9050919050565b600081519050614890816139c5565b92915050565b6000602082840312156148ac576148ab613845565b5b60006148ba84828501614881565b91505092915050565b600081905092915050565b60008190508160005260206000209050919050565b600081546148f081614517565b6148fa81866148c3565b94506001821660008114614915576001811461492657614959565b60ff19831686528186019350614959565b61492f856148ce565b60005b8381101561495157815481890152600182019150602081019050614932565b838801955050505b50505092915050565b600061496d8261390a565b61497781856148c3565b9350614987818560208601613926565b80840191505092915050565b600061499f82856148e3565b91506149ab8284614962565b91508190509392505050565b60006149c282613f27565b91506149cd83613f27565b92508168ffffffffffffffffff04831182151516156149ef576149ee61466d565b5b828202905092915050565b7f53454355524f4d494e545f494e53554646494349454e545f4554480000000000600082015250565b6000614a30601b83613915565b9150614a3b826149fa565b602082019050919050565b60006020820190508181036000830152614a5f81614a23565b9050919050565b7f53454355524f4d494e545f455843454544535f4d41585f5045525f5458000000600082015250565b6000614a9c601d83613915565b9150614aa782614a66565b602082019050919050565b60006020820190508181036000830152614acb81614a8f565b9050919050565b7f53454355524f4d494e545f53414c455f4e4f545f414354495645000000000000600082015250565b6000614b08601a83613915565b9150614b1382614ad2565b602082019050919050565b60006020820190508181036000830152614b3781614afb565b9050919050565b7f53454355524f4d494e545f5052455f53414c455f4e4f545f4143544956450000600082015250565b6000614b74601e83613915565b9150614b7f82614b3e565b602082019050919050565b60006020820190508181036000830152614ba381614b67565b9050919050565b6000614bb582613c38565b9150614bc083613c38565b92508261ffff03821115614bd757614bd661466d565b5b828201905092915050565b7f53454355524f4d494e545f455843454544535f4d41585f5045525f57414c4c4560008201527f5400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614c3e602183613915565b9150614c4982614be2565b604082019050919050565b60006020820190508181036000830152614c6d81614c31565b9050919050565b7f53454355524f4d494e545f4e4f545f57484954454c4953544544000000000000600082015250565b6000614caa601a83613915565b9150614cb582614c74565b602082019050919050565b60006020820190508181036000830152614cd981614c9d565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f53414c455f414e445f5060008201527f52455f53414c455f414354495645000000000000000000000000000000000000602082015250565b6000614d3c602e83613915565b9150614d4782614ce0565b604082019050919050565b60006020820190508181036000830152614d6b81614d2f565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614dce602683613915565b9150614dd982614d72565b604082019050919050565b60006020820190508181036000830152614dfd81614dc1565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f535550504c595f4c455360008201527f535f5448414e5f5a45524f000000000000000000000000000000000000000000602082015250565b6000614e60602b83613915565b9150614e6b82614e04565b604082019050919050565b60006020820190508181036000830152614e8f81614e53565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f4d41585f5045525f574160008201527f4c4c45545f4c4553535f5448414e5f5a45524f00000000000000000000000000602082015250565b6000614ef2603383613915565b9150614efd82614e96565b604082019050919050565b60006020820190508181036000830152614f2181614ee5565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f4d41585f5045525f545860008201527f5f4c4553535f5448414e5f5a45524f0000000000000000000000000000000000602082015250565b6000614f84602f83613915565b9150614f8f82614f28565b604082019050919050565b60006020820190508181036000830152614fb381614f77565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f5052455f53414c455f5060008201527f524943455f4c4553535f5448414e5f5a45524f00000000000000000000000000602082015250565b6000615016603383613915565b915061502182614fba565b604082019050919050565b6000602082019050818103600083015261504581615009565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f53414c455f505249434560008201527f5f4c4553535f5448414e5f5a45524f0000000000000000000000000000000000602082015250565b60006150a8602f83613915565b91506150b38261504c565b604082019050919050565b600060208201905081810360008301526150d78161509b565b9050919050565b7f53454355524f4d494e545f4d414e4147455f4552525f535550504c595f4c455360008201527f535f5448414e5f544f54414c5f535550504c5900000000000000000000000000602082015250565b600061513a603383613915565b9150615145826150de565b604082019050919050565b600060208201905081810360008301526151698161512d565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b60006151a6601d83613915565b91506151b182615170565b602082019050919050565b600060208201905081810360008301526151d581615199565b9050919050565b600081905092915050565b50565b60006151f76000836151dc565b9150615202826151e7565b600082019050919050565b6000615218826151ea565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b600061527e603a83613915565b915061528982615222565b604082019050919050565b600060208201905081810360008301526152ad81615271565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006152ea602083613915565b91506152f5826152b4565b602082019050919050565b60006020820190508181036000830152615319816152dd565b9050919050565b600061532b826137f9565b9150615336836137f9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561536f5761536e61466d565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006153b4826137f9565b91506153bf836137f9565b9250826153cf576153ce61537a565b5b828204905092915050565b60006153e5826137f9565b91506153f0836137f9565b9250828210156154035761540261466d565b5b828203905092915050565b600081519050919050565b600082825260208201905092915050565b60006154358261540e565b61543f8185615419565b935061544f818560208601613926565b61545881613959565b840191505092915050565b600060808201905061547860008301876137ea565b61548560208301866137ea565b6154926040830185613803565b81810360608301526154a4818461542a565b905095945050505050565b6000815190506154be8161387b565b92915050565b6000602082840312156154da576154d9613845565b5b60006154e8848285016154af565b91505092915050565b60006154fc826137f9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561552f5761552e61466d565b5b600182019050919050565b6000615545826137f9565b9150615550836137f9565b9250826155605761555f61537a565b5b828206905092915050565b60008160601b9050919050565b60006155838261556b565b9050919050565b600061559582615578565b9050919050565b6155ad6155a8826137d8565b61558a565b82525050565b60006155bf828461559c565b60148201915081905092915050565b6000815190506155dd81613f66565b92915050565b6000602082840312156155f9576155f8613845565b5b6000615607848285016155ce565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061566c602a83613915565b915061567782615610565b604082019050919050565b6000602082019050818103600083015261569b8161565f565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006156fe602683613915565b9150615709826156a2565b604082019050919050565b6000602082019050818103600083015261572d816156f1565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b600061576a601d83613915565b915061577582615734565b602082019050919050565b600060208201905081810360008301526157998161575d565b9050919050565b60006157ab8261540e565b6157b581856151dc565b93506157c5818560208601613926565b80840191505092915050565b60006157dd82846157a0565b91508190509291505056fea2646970667358221220eff1d561490e28cb94d534d7bd0240ec200fb0c9f2990d520459da85ff1513b464736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000f7c26f7a235631616631d529ce19903d5cad8e600000000000000000000000000000000000000000000000000000000000000d050000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d2b52cfa3c3183ed00ba0e23cbd3c856120448a800000000000000000000000053f6effe7dd9fff2febcc56fb99570e8e84b430e000000000000000000000000a9808045f42a00c2fb9a3e8572100a36b15c9e110000000000000000000000004728ece4b8739867dbab2c2d31b68f2f5cf7ac6500000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000023000000000000000000000000000000000000000000000000000000000000002f68747470733a2f2f77617265686f7573652e73656375726f6d696e742e636f6d2f746573746e65742f4d4f54485a2f0000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _payees (address[]): 0xd2b52CFa3c3183ed00BA0E23CBd3C856120448A8,0x53f6eFfE7dd9FFF2FEbcC56Fb99570E8E84B430e,0xA9808045f42A00c2fB9a3e8572100A36b15C9e11,0x4728ECE4b8739867DBab2c2D31b68F2F5cf7ac65
Arg [1] : _shares (uint256[]): 20,30,15,35
Arg [2] : _base (string): https://warehouse.securomint.com/testnet/MOTHZ/
Arg [3] : _owner (address): 0xF7c26F7a235631616631d529Ce19903D5caD8e60
Arg [4] : _data (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
24 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [2] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [3] : 000000000000000000000000f7c26f7a235631616631d529ce19903d5cad8e60
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000d05
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [12] : 000000000000000000000000d2b52cfa3c3183ed00ba0e23cbd3c856120448a8
Arg [13] : 00000000000000000000000053f6effe7dd9fff2febcc56fb99570e8e84b430e
Arg [14] : 000000000000000000000000a9808045f42a00c2fb9a3e8572100a36b15c9e11
Arg [15] : 0000000000000000000000004728ece4b8739867dbab2c2d31b68f2f5cf7ac65
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [18] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [19] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000023
Arg [21] : 000000000000000000000000000000000000000000000000000000000000002f
Arg [22] : 68747470733a2f2f77617265686f7573652e73656375726f6d696e742e636f6d
Arg [23] : 2f746573746e65742f4d4f54485a2f0000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.