Overview
TokenID
1510
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AppreciatorsS2
Compiler Version
v0.8.18+commit.87f61d96
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 "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./lib/ERC721A.sol"; import "./lib/MintStageWithReset.sol"; import "./lib/PaymentSplitterConnector.sol"; error TokenSupplyExceeded(); error BatchLengthMismatch(); error NoAvailableFreeClaim(); contract AppreciatorsS2 is PaymentSplitterConnector, ERC721A, Ownable, Pausable, MintStageWithReset { uint256 public constant TOKEN_SUPPLY_LIMIT = 5555; string public baseExtension = ".json"; string public baseURI = ""; mapping (address => uint256) public freeClaimList; constructor(address splitterAdmin, address splitterAddress) ERC721A("Appreciators", "APR") PaymentSplitterConnector(splitterAdmin, splitterAddress) {} function pauseFreeClaim() public onlyOwner { _pause(); } function unpauseFreeClaim() public onlyOwner { _unpause(); } function batchAirdrop( address[] calldata recipients, uint256[] calldata quantity ) public onlyOwner { if (recipients.length != quantity.length) { revert BatchLengthMismatch(); } for (uint256 i; i < recipients.length; ++i) { if ((_totalMinted() + quantity[i]) > TOKEN_SUPPLY_LIMIT) { revert TokenSupplyExceeded(); } _safeMint(recipients[i], quantity[i]); } } function mint(bytes32[] calldata merkleProof, uint256 quantity) public payable { _verifyMint(merkleProof, quantity, _totalMinted(), 0); _updateWalletMintCount(msg.sender, quantity); _safeMint(msg.sender, quantity); } function freeClaim() public whenNotPaused { address sender = msg.sender; uint256 freeClaimQty = freeClaimList[sender]; uint256 remainingFree = TOKEN_SUPPLY_LIMIT - _totalMinted(); uint256 mintAmount = 0; if (remainingFree > freeClaimQty) { mintAmount = freeClaimQty; } else { mintAmount = remainingFree; } if (mintAmount == 0) { revert TokenSupplyExceeded(); } if (freeClaimQty == 0) { revert NoAvailableFreeClaim(); } freeClaimList[sender] = 0; _safeMint(sender, mintAmount); } function updateFreeClaim( address[] calldata recipients, uint256[] calldata quantity ) public onlyOwner { if (recipients.length != quantity.length) { revert BatchLengthMismatch(); } for (uint256 i; i < recipients.length; ++i) { freeClaimList[recipients[i]] = quantity[i]; } } function burn(uint256 tokenId) public { _burn(tokenId, true); } function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return bytes(baseURI).length > 0 ? string( abi.encodePacked(baseURI, _toString(tokenId), baseExtension) ) : baseURI; } function setBaseURI(string memory _baseURI) public onlyOwner { baseURI = _baseURI; } function setBaseExtension(string memory extension) public onlyOwner { baseExtension = extension; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } }
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract PaymentSplitterConnector is AccessControl { address public PAYMENT_SPLITTER_ADDRESS; address public PAYMENT_DEFAULT_ADMIN; address public SPLITTER_ADMIN; bytes32 private constant SPLITTER_ADMIN_ROLE = keccak256("SPLITTER_ADMIN"); constructor(address admin, address splitterAddress) { _setupRole(DEFAULT_ADMIN_ROLE, admin); _setupRole(SPLITTER_ADMIN_ROLE, admin); SPLITTER_ADMIN = admin; PAYMENT_DEFAULT_ADMIN = admin; PAYMENT_SPLITTER_ADDRESS = splitterAddress; } modifier onlySplitterAdmin() { require( hasRole(SPLITTER_ADMIN_ROLE, msg.sender), "Splitter: No Splitter Role" ); _; } modifier onlyDefaultAdmin() { require( hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Splitter: No Admin Permission" ); _; } function setSplitterAddress(address _splitterAddress) public onlySplitterAdmin { PAYMENT_SPLITTER_ADDRESS = _splitterAddress; } function withdraw() public { address payable recipient = payable(PAYMENT_SPLITTER_ADDRESS); uint256 balance = address(this).balance; Address.sendValue(recipient, balance); } function transferSplitterAdminRole(address admin) public onlyDefaultAdmin { require(SPLITTER_ADMIN != admin, "Splitter: Should be different"); grantRole(SPLITTER_ADMIN_ROLE, admin); revokeRole(SPLITTER_ADMIN_ROLE, SPLITTER_ADMIN); SPLITTER_ADMIN = admin; } function transferDefaultAdminRole(address admin) public onlyDefaultAdmin { require( PAYMENT_DEFAULT_ADMIN != admin, "Splitter: Should be different" ); grantRole(DEFAULT_ADMIN_ROLE, admin); revokeRole(DEFAULT_ADMIN_ROLE, PAYMENT_DEFAULT_ADMIN); PAYMENT_DEFAULT_ADMIN = admin; } }
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; error InvalidMintAmount(); error InvalidDuration(); error NotOpenMint(); error ReachedMintStageLimit(); error ReachedMintWalletLimit(); error NotWhitelisted(); error NotEnoughPayment(); contract MintStageWithReset is Ownable { struct Stage { uint256 id; uint256 totalLimit; uint256 walletLimit; uint256 rate; uint256 walletLimitCounter; uint256 openingTime; uint256 closingTime; bytes32 whitelistRoot; bool isPublic; } Stage public currentStage; mapping(uint256 => mapping(address => uint256)) public walletMintCount; uint256 private constant BATCH_LIMIT = 10000; event MintStageUpdated( uint256 indexed _stage, uint256 _stageLimit, uint256 _stageLimitPerWallet, uint256 _rate, uint256 _openingTime, uint256 _closingTIme ); function setMintStage( uint256 _stage, uint256 _stageLimit, uint256 _stageLimitPerWallet, uint256 _rate, uint256 _openingTime, uint256 _closingTime, bytes32 _whitelistMerkleRoot, bool _isPublic, bool _resetClaimCounter ) public onlyOwner { if (_openingTime > _closingTime) { revert InvalidDuration(); } uint256 currentLimitWalletPerCounter = currentStage.walletLimitCounter; if (_resetClaimCounter) { currentLimitWalletPerCounter = currentLimitWalletPerCounter + 1; } currentStage = Stage( _stage, _stageLimit, _stageLimitPerWallet, _rate, currentLimitWalletPerCounter, _openingTime, _closingTime, _whitelistMerkleRoot, _isPublic ); emit MintStageUpdated( _stage, _stageLimit, _stageLimitPerWallet, _rate, _openingTime, _closingTime ); } function _verifyMint( bytes32[] calldata _merkleProof, uint256 _mintAmount, uint256 currentMintedCount, uint256 discount ) internal { address sender = msg.sender; uint256 sentAmount = msg.value; if (_mintAmount == 0 || _mintAmount > BATCH_LIMIT) { revert InvalidMintAmount(); } if (!isStageOpen()) { revert NotOpenMint(); } if (currentMintedCount + _mintAmount > currentStage.totalLimit) { revert ReachedMintStageLimit(); } uint256 mintCount = walletMintCount[currentStage.walletLimitCounter][ sender ]; if ( currentStage.walletLimit > 0 && mintCount + _mintAmount > currentStage.walletLimit ) { revert ReachedMintWalletLimit(); } if (!currentStage.isPublic) { bytes32 leaf = keccak256(abi.encodePacked(sender)); if ( !MerkleProof.verify( _merkleProof, currentStage.whitelistRoot, leaf ) ) { revert NotWhitelisted(); } } uint256 requiredPayment = _mintAmount * (currentStage.rate - discount); if (sentAmount < requiredPayment) { revert NotEnoughPayment(); } } function isStageOpen() public view returns (bool) { return block.timestamp >= currentStage.openingTime && block.timestamp <= currentStage.closingTime; } function _updateWalletMintCount(address sender, uint256 _mintAmount) internal { uint256 mintCount = walletMintCount[currentStage.walletLimitCounter][ sender ]; walletMintCount[currentStage.walletLimitCounter][sender] = mintCount + _mintAmount; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev ERC721 token receiver interface. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // 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 tokenId of the next token 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` 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 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * @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 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 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 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 returns (uint256) { return _burnCounter; } /** * @dev See {IERC165-supportsInterface}. */ 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: 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. } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (_addressToUint256(owner) == 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 auxillary 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 auxillary 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 { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; assembly { // Cast aux without masking. auxCasted := aux } packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX); _packedAddressData[owner] = packed; } /** * 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 ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. // // We can directly compare the packed value. // If the address is zero, packed is zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * 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; } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @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) { 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, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { assembly { result := value } } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { assembly { result := value } } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = address(uint160(_packedOwnershipOf(tokenId))); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), 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 { _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 { _transfer(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned. } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, 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. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = _currentIndex; if (_addressToUint256(to) == 0) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. _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] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.code.length != 0) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @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. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (_addressToUint256(to) == 0) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. _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] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); address approvedAddress = _tokenApprovals[tokenId]; bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || approvedAddress == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (_addressToUint256(to) == 0) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. if (_addressToUint256(approvedAddress) != 0) { delete _tokenApprovals[tokenId]; } // 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] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_NEXT_INITIALIZED; // 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 `_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)); address approvedAddress = _tokenApprovals[tokenId]; if (approvalCheck) { bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || approvedAddress == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. if (_addressToUint256(approvedAddress) != 0) { delete _tokenApprovals[tokenId]; } // 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] = _addressToUint256(from) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_BURNED | BITMASK_NEXT_INITIALIZED; // 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++; } } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _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)) } } } } /** * @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 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 returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. 48 is the ASCII index of '0'. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// 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.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * 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. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ 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 simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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 sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _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}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _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 // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ 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(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * 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(); struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); // ============================== // 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); // ============================== // 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`. * * 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 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 ) 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); // ============================== // 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); }
// 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 (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"splitterAdmin","type":"address"},{"internalType":"address","name":"splitterAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BatchLengthMismatch","type":"error"},{"inputs":[],"name":"InvalidDuration","type":"error"},{"inputs":[],"name":"InvalidMintAmount","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NoAvailableFreeClaim","type":"error"},{"inputs":[],"name":"NotEnoughPayment","type":"error"},{"inputs":[],"name":"NotOpenMint","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ReachedMintStageLimit","type":"error"},{"inputs":[],"name":"ReachedMintWalletLimit","type":"error"},{"inputs":[],"name":"TokenSupplyExceeded","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":"_stage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_stageLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_stageLimitPerWallet","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_openingTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_closingTIme","type":"uint256"}],"name":"MintStageUpdated","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"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAYMENT_DEFAULT_ADMIN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAYMENT_SPLITTER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SPLITTER_ADMIN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_SUPPLY_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"quantity","type":"uint256[]"}],"name":"batchAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentStage","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"totalLimit","type":"uint256"},{"internalType":"uint256","name":"walletLimit","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"walletLimitCounter","type":"uint256"},{"internalType":"uint256","name":"openingTime","type":"uint256"},{"internalType":"uint256","name":"closingTime","type":"uint256"},{"internalType":"bytes32","name":"whitelistRoot","type":"bytes32"},{"internalType":"bool","name":"isPublic","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"freeClaimList","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":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"isStageOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"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":[],"name":"pauseFreeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"extension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stage","type":"uint256"},{"internalType":"uint256","name":"_stageLimit","type":"uint256"},{"internalType":"uint256","name":"_stageLimitPerWallet","type":"uint256"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_openingTime","type":"uint256"},{"internalType":"uint256","name":"_closingTime","type":"uint256"},{"internalType":"bytes32","name":"_whitelistMerkleRoot","type":"bytes32"},{"internalType":"bool","name":"_isPublic","type":"bool"},{"internalType":"bool","name":"_resetClaimCounter","type":"bool"}],"name":"setMintStage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_splitterAddress","type":"address"}],"name":"setSplitterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"transferDefaultAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"transferSplitterAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseFreeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"quantity","type":"uint256[]"}],"name":"updateFreeClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"walletMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526040518060400160405280600581526020017f2e6a736f6e000000000000000000000000000000000000000000000000000000815250601790816200004a91906200075a565b5060405180602001604052806000815250601890816200006b91906200075a565b503480156200007957600080fd5b5060405162005b4038038062005b4083398181016040528101906200009f9190620008ab565b6040518060400160405280600c81526020017f4170707265636961746f727300000000000000000000000000000000000000008152506040518060400160405280600381526020017f41505200000000000000000000000000000000000000000000000000000000008152508383620001226000801b836200029860201b60201c565b620001547f10ec476f95b2ac17b26abe61aa04eca5036baf3b2845e79fbbb0fd495127a458836200029860201b60201c565b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505081600690816200022a91906200075a565b5080600790816200023c91906200075a565b506200024d620002ae60201b60201c565b60048190555050506200027562000269620002b760201b60201c565b620002bf60201b60201c565b6000600c60146101000a81548160ff0219169083151502179055505050620008f2565b620002aa82826200038560201b60201c565b5050565b60006001905090565b600033905090565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6200039782826200047660201b60201c565b6200047257600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555062000417620002b760201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200056257607f821691505b6020821081036200057857620005776200051a565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620005e27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620005a3565b620005ee8683620005a3565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200063b620006356200062f8462000606565b62000610565b62000606565b9050919050565b6000819050919050565b62000657836200061a565b6200066f620006668262000642565b848454620005b0565b825550505050565b600090565b6200068662000677565b620006938184846200064c565b505050565b5b81811015620006bb57620006af6000826200067c565b60018101905062000699565b5050565b601f8211156200070a57620006d4816200057e565b620006df8462000593565b81016020851015620006ef578190505b62000707620006fe8562000593565b83018262000698565b50505b505050565b600082821c905092915050565b60006200072f600019846008026200070f565b1980831691505092915050565b60006200074a83836200071c565b9150826002028217905092915050565b6200076582620004e0565b67ffffffffffffffff811115620007815762000780620004eb565b5b6200078d825462000549565b6200079a828285620006bf565b600060209050601f831160018114620007d25760008415620007bd578287015190505b620007c985826200073c565b86555062000839565b601f198416620007e2866200057e565b60005b828110156200080c57848901518255600182019150602085019450602081019050620007e5565b868310156200082c578489015162000828601f8916826200071c565b8355505b6001600288020188555050505b505050505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620008738262000846565b9050919050565b620008858162000866565b81146200089157600080fd5b50565b600081519050620008a5816200087a565b92915050565b60008060408385031215620008c557620008c462000841565b5b6000620008d58582860162000894565b9250506020620008e88582860162000894565b9150509250929050565b61523e80620009026000396000f3fe6080604052600436106102935760003560e01c806370a082311161015a578063b816d087116100c1578063da3ef23f1161007a578063da3ef23f146109d1578063e88d3b3e146109fa578063e985e9c514610a11578063f0fea4c814610a4e578063f234420814610a79578063f2fde38b14610aa457610293565b8063b816d087146108c3578063b88d4fde146108ec578063c668286214610915578063c87b56dd14610940578063d2d871e01461097d578063d547741f146109a857610293565b8063a217fddf11610113578063a217fddf146107db578063a22cb46514610806578063ae0cb9101461082f578063b03f768514610858578063b69f6df91461086f578063b7f70ac21461089a57610293565b806370a08231146106b7578063715018a6146106f45780638da5cb5b1461070b57806391d148541461073657806395d89b4114610773578063978139801461079e57610293565b80633ccfd60b116101fe57806355f804b3116101b757806355f804b3146105b15780635bf5d54c146105da5780635c975abb1461060d5780636352211e146106385780636c0360eb146106755780636c5c0991146106a057610293565b80633ccfd60b146104c657806340dbdd21146104dd57806342842e0e1461050657806342966c681461052f57806345de0d9b146105585780634eba67951461057457610293565b8063185e70b711610250578063185e70b7146103ba57806323b872dd146103e3578063248a9ca31461040c578063292005a2146104495780632f2ff15d1461047457806336568abe1461049d57610293565b806301ffc9a71461029857806306fdde03146102d5578063081812fc14610300578063095ea7b31461033d5780631526e0871461036657806318160ddd1461038f575b600080fd5b3480156102a457600080fd5b506102bf60048036038101906102ba9190613a71565b610acd565b6040516102cc9190613ab9565b60405180910390f35b3480156102e157600080fd5b506102ea610adf565b6040516102f79190613b64565b60405180910390f35b34801561030c57600080fd5b5061032760048036038101906103229190613bbc565b610b71565b6040516103349190613c2a565b60405180910390f35b34801561034957600080fd5b50610364600480360381019061035f9190613c71565b610bed565b005b34801561037257600080fd5b5061038d60048036038101906103889190613cb1565b610d93565b005b34801561039b57600080fd5b506103a4610eef565b6040516103b19190613ced565b60405180910390f35b3480156103c657600080fd5b506103e160048036038101906103dc9190613dc3565b610f06565b005b3480156103ef57600080fd5b5061040a60048036038101906104059190613e44565b610ff7565b005b34801561041857600080fd5b50610433600480360381019061042e9190613ecd565b611007565b6040516104409190613f09565b60405180910390f35b34801561045557600080fd5b5061045e611026565b60405161046b9190613ced565b60405180910390f35b34801561048057600080fd5b5061049b60048036038101906104969190613f24565b61102c565b005b3480156104a957600080fd5b506104c460048036038101906104bf9190613f24565b61104d565b005b3480156104d257600080fd5b506104db6110d0565b005b3480156104e957600080fd5b5061050460048036038101906104ff9190613cb1565b61110a565b005b34801561051257600080fd5b5061052d60048036038101906105289190613e44565b6111b7565b005b34801561053b57600080fd5b5061055660048036038101906105519190613bbc565b6111d7565b005b610572600480360381019061056d9190613fba565b6111e5565b005b34801561058057600080fd5b5061059b60048036038101906105969190613cb1565b611213565b6040516105a89190613ced565b60405180910390f35b3480156105bd57600080fd5b506105d860048036038101906105d3919061414a565b61122b565b005b3480156105e657600080fd5b506105ef611246565b60405161060499989796959493929190614193565b60405180910390f35b34801561061957600080fd5b5061062261128f565b60405161062f9190613ab9565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a9190613bbc565b6112a6565b60405161066c9190613c2a565b60405180910390f35b34801561068157600080fd5b5061068a6112b8565b6040516106979190613b64565b60405180910390f35b3480156106ac57600080fd5b506106b5611346565b005b3480156106c357600080fd5b506106de60048036038101906106d99190613cb1565b611358565b6040516106eb9190613ced565b60405180910390f35b34801561070057600080fd5b506107096113ec565b005b34801561071757600080fd5b50610720611400565b60405161072d9190613c2a565b60405180910390f35b34801561074257600080fd5b5061075d60048036038101906107589190613f24565b61142a565b60405161076a9190613ab9565b60405180910390f35b34801561077f57600080fd5b50610788611494565b6040516107959190613b64565b60405180910390f35b3480156107aa57600080fd5b506107c560048036038101906107c09190614220565b611526565b6040516107d29190613ced565b60405180910390f35b3480156107e757600080fd5b506107f061154b565b6040516107fd9190613f09565b60405180910390f35b34801561081257600080fd5b5061082d6004803603810190610828919061428c565b611552565b005b34801561083b57600080fd5b50610856600480360381019061085191906142cc565b6116c9565b005b34801561086457600080fd5b5061086d61182f565b005b34801561087b57600080fd5b50610884611841565b6040516108919190613c2a565b60405180910390f35b3480156108a657600080fd5b506108c160048036038101906108bc9190613cb1565b611867565b005b3480156108cf57600080fd5b506108ea60048036038101906108e59190613dc3565b6119fd565b005b3480156108f857600080fd5b50610913600480360381019061090e9190614437565b611b1b565b005b34801561092157600080fd5b5061092a611b8e565b6040516109379190613b64565b60405180910390f35b34801561094c57600080fd5b5061096760048036038101906109629190613bbc565b611c1c565b6040516109749190613b64565b60405180910390f35b34801561098957600080fd5b50610992611d39565b60405161099f9190613c2a565b60405180910390f35b3480156109b457600080fd5b506109cf60048036038101906109ca9190613f24565b611d5f565b005b3480156109dd57600080fd5b506109f860048036038101906109f3919061414a565b611d80565b005b348015610a0657600080fd5b50610a0f611d9b565b005b348015610a1d57600080fd5b50610a386004803603810190610a3391906144ba565b611ee4565b604051610a459190613ab9565b60405180910390f35b348015610a5a57600080fd5b50610a63611f78565b604051610a709190613ab9565b60405180910390f35b348015610a8557600080fd5b50610a8e611f99565b604051610a9b9190613c2a565b60405180910390f35b348015610ab057600080fd5b50610acb6004803603810190610ac69190613cb1565b611fbf565b005b6000610ad882612042565b9050919050565b606060068054610aee90614529565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1a90614529565b8015610b675780601f10610b3c57610100808354040283529160200191610b67565b820191906000526020600020905b815481529060010190602001808311610b4a57829003601f168201915b5050505050905090565b6000610b7c826120d4565b610bb2576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610bf882612133565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c5f576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610c7e6121ff565b73ffffffffffffffffffffffffffffffffffffffff1614610ce157610caa81610ca56121ff565b611ee4565b610ce0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b82600a600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b610da06000801b3361142a565b610ddf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd6906145a6565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6690614612565b60405180910390fd5b610e7c6000801b8261102c565b610eab6000801b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611d5f565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610ef9612207565b6005546004540303905090565b610f0e612210565b818190508484905014610f4d576040517f17e37b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84849050811015610ff057828282818110610f6e57610f6d614632565b5b9050602002013560196000878785818110610f8c57610f8b614632565b5b9050602002016020810190610fa19190613cb1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080610fe990614690565b9050610f50565b5050505050565b61100283838361228e565b505050565b6000806000838152602001908152602001600020600101549050919050565b6115b381565b61103582611007565b61103e81612653565b6110488383612667565b505050565b611055612747565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146110c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b99061474a565b60405180910390fd5b6110cc828261274f565b5050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060004790506111068282612830565b5050565b6111347f10ec476f95b2ac17b26abe61aa04eca5036baf3b2845e79fbbb0fd495127a4583361142a565b611173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116a906147b6565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6111d283838360405180602001604052806000815250611b1b565b505050565b6111e2816001612924565b50565b6111fa8383836111f3612c3c565b6000612c4f565b6112043382612f0d565b61120e3382612fd1565b505050565b60196020528060005260406000206000915090505481565b611233612210565b80601890816112429190614982565b5050565b600d8060000154908060010154908060020154908060030154908060040154908060050154908060060154908060070154908060080160009054906101000a900460ff16905089565b6000600c60149054906101000a900460ff16905090565b60006112b182612133565b9050919050565b601880546112c590614529565b80601f01602080910402602001604051908101604052809291908181526020018280546112f190614529565b801561133e5780601f106113135761010080835404028352916020019161133e565b820191906000526020600020905b81548152906001019060200180831161132157829003601f168201915b505050505081565b61134e612210565b611356612fef565b565b60008061136483613052565b0361139b576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6113f4612210565b6113fe600061305c565b565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6060600780546114a390614529565b80601f01602080910402602001604051908101604052809291908181526020018280546114cf90614529565b801561151c5780601f106114f15761010080835404028352916020019161151c565b820191906000526020600020905b8154815290600101906020018083116114ff57829003601f168201915b5050505050905090565b6016602052816000526040600020602052806000526040600020600091509150505481565b6000801b81565b61155a6121ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115be576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600b60006115cb6121ff565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166116786121ff565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516116bd9190613ab9565b60405180910390a35050565b6116d1612210565b8385111561170b576040517f7616640100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600d600401549050811561172b576001816117289190614a54565b90505b6040518061012001604052808b81526020018a8152602001898152602001888152602001828152602001878152602001868152602001858152602001841515815250600d600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff021916908315150217905550905050897f1eac6b5b91b97537498543fce5db2429ccdd3b13445b508d3142bfc51c8736c78a8a8a8a8a60405161181b959493929190614a88565b60405180910390a250505050505050505050565b611837612210565b61183f613122565b565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6118746000801b3361142a565b6118b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118aa906145a6565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193a90614612565b60405180910390fd5b61196d7f10ec476f95b2ac17b26abe61aa04eca5036baf3b2845e79fbbb0fd495127a4588261102c565b6119b97f10ec476f95b2ac17b26abe61aa04eca5036baf3b2845e79fbbb0fd495127a458600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611d5f565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611a05612210565b818190508484905014611a44576040517f17e37b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84849050811015611b14576115b3838383818110611a6857611a67614632565b5b90506020020135611a77612c3c565b611a819190614a54565b1115611ab9576040517f1c07ee3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b03858583818110611acf57611ace614632565b5b9050602002016020810190611ae49190613cb1565b848484818110611af757611af6614632565b5b90506020020135612fd1565b80611b0d90614690565b9050611a47565b5050505050565b611b2684848461228e565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611b8857611b5184848484613185565b611b87576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60178054611b9b90614529565b80601f0160208091040260200160405190810160405280929190818152602001828054611bc790614529565b8015611c145780601f10611be957610100808354040283529160200191611c14565b820191906000526020600020905b815481529060010190602001808311611bf757829003601f168201915b505050505081565b6060611c27826120d4565b611c5d576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060188054611c6c90614529565b905011611d035760188054611c8090614529565b80601f0160208091040260200160405190810160405280929190818152602001828054611cac90614529565b8015611cf95780601f10611cce57610100808354040283529160200191611cf9565b820191906000526020600020905b815481529060010190602001808311611cdc57829003601f168201915b5050505050611d32565b6018611d0e836132d5565b6017604051602001611d2293929190614b9a565b6040516020818303038152906040525b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611d6882611007565b611d7181612653565b611d7b838361274f565b505050565b611d88612210565b8060179081611d979190614982565b5050565b611da361332f565b60003390506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000611df6612c3c565b6115b3611e039190614bcb565b9050600082821115611e1757829050611e1b565b8190505b60008103611e55576040517f1c07ee3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008303611e8f576040517f1b8d378600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000601960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ede8482612fd1565b50505050565b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000600d600501544210158015611f945750600d600601544211155b905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611fc7612210565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612036576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161202d90614c71565b60405180910390fd5b61203f8161305c565b50565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061209d57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806120cd5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000816120df612207565b111580156120ee575060045482105b801561212c575060007c0100000000000000000000000000000000000000000000000000000000600860008581526020019081526020016000205416145b9050919050565b60008082905080612142612207565b116121c8576004548110156121c75760006008600083815260200190815260200160002054905060007c01000000000000000000000000000000000000000000000000000000008216036121c5575b600081036121bb576008600083600190039350838152602001908152602001600020549050612191565b80925050506121fa565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600033905090565b60006001905090565b612218612747565b73ffffffffffffffffffffffffffffffffffffffff16612236611400565b73ffffffffffffffffffffffffffffffffffffffff161461228c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228390614cdd565b60405180910390fd5b565b600061229982612133565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612300576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600a600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff166123596121ff565b73ffffffffffffffffffffffffffffffffffffffff1614806123885750612387866123826121ff565b611ee4565b5b806123c557506123966121ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050806123fe576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061240986613052565b03612440576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61244d8686866001613379565b600061245883613052565b1461249457600a600085815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055507c020000000000000000000000000000000000000000000000000000000060a042901b61255b87613052565b1717600860008681526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008416036125e357600060018501905060006008600083815260200190815260200160002054036125e15760045481146125e0578360086000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461264b868686600161337f565b505050505050565b6126648161265f612747565b613385565b50565b612671828261142a565b61274357600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506126e8612747565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b612759828261142a565b1561282c57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506127d1612747565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b80471015612873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286a90614d49565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161289990614d9a565b60006040518083038185875af1925050503d80600081146128d6576040519150601f19603f3d011682016040523d82523d6000602084013e6128db565b606091505b505090508061291f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291690614e21565b60405180910390fd5b505050565b600061292f83612133565b905060008190506000600a600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508315612a3c5760008273ffffffffffffffffffffffffffffffffffffffff166129956121ff565b73ffffffffffffffffffffffffffffffffffffffff1614806129c457506129c3836129be6121ff565b611ee4565b5b80612a0157506129d26121ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b905080612a3a576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b612a4a826000876001613379565b6000612a5582613052565b14612a9157600a600086815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b600160806001901b03600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055507c02000000000000000000000000000000000000000000000000000000007c010000000000000000000000000000000000000000000000000000000060a042901b612b3085613052565b171717600860008781526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612bb95760006001860190506000600860008381526020019081526020016000205403612bb7576004548114612bb6578360086000838152602001908152602001600020819055505b5b505b84600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612c2382600087600161337f565b6005600081548092919060010191905055505050505050565b6000612c46612207565b60045403905090565b600033905060003490506000851480612c69575061271085115b15612ca0576040517fccfad01800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612ca8611f78565b612cde576040517fa213ecf100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d600101548585612cf09190614a54565b1115612d28576040517fdfedbeec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060166000600d60040154815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600d60020154118015612da65750600d600201548682612da49190614a54565b115b15612ddd576040517fbf7fbad100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d60080160009054906101000a900460ff16612ea857600083604051602001612e079190614e89565b604051602081830303815290604052805190602001209050612e70898980806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600d600701548361340a565b612ea6576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b600084600d60030154612ebb9190614bcb565b87612ec69190614ea4565b905080831015612f02576040517f6d35ff8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b600060166000600d60040154815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181612f739190614a54565b60166000600d60040154815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612feb828260405180602001604052806000815250613421565b5050565b612ff76136b1565b6000600c60146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61303b612747565b6040516130489190613c2a565b60405180910390a1565b6000819050919050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61312a61332f565b6001600c60146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861316e612747565b60405161317b9190613c2a565b60405180910390a1565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026131ab6121ff565b8786866040518563ffffffff1660e01b81526004016131cd9493929190614f3b565b6020604051808303816000875af192505050801561320957506040513d601f19601f820116820180604052508101906132069190614f9c565b60015b613282573d8060008114613239576040519150601f19603f3d011682016040523d82523d6000602084013e61323e565b606091505b50600081510361327a576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60606080604051019050806040528082600183039250600a81066030018353600a810490505b801561331b57600183039250600a81066030018353600a810490506132fb565b508181036020830392508083525050919050565b61333761128f565b15613377576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161336e90615015565b60405180910390fd5b565b50505050565b50505050565b61338f828261142a565b6134065761339c816136fa565b6133aa8360001c6020613727565b6040516020016133bb9291906150cd565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133fd9190613b64565b60405180910390fd5b5050565b6000826134178584613963565b1490509392505050565b60006004549050600061343385613052565b0361346a576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083036134a4576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134b16000858386613379565b600160406001901b178302600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555060e1613516600185146139b9565b901b60a042901b61352686613052565b1717600860008381526020019081526020016000208190555060008190506000848201905060008673ffffffffffffffffffffffffffffffffffffffff163b1461362a575b818673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46135da6000878480600101955087613185565b613610576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80821061356b57826004541461362557600080fd5b613695565b5b818060010192508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a480821061362b575b8160048190555050506136ab600085838661337f565b50505050565b6136b961128f565b6136f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136ef90615153565b60405180910390fd5b565b60606137208273ffffffffffffffffffffffffffffffffffffffff16601460ff16613727565b9050919050565b60606000600283600261373a9190614ea4565b6137449190614a54565b67ffffffffffffffff81111561375d5761375c61401f565b5b6040519080825280601f01601f19166020018201604052801561378f5781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106137c7576137c6614632565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061382b5761382a614632565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261386b9190614ea4565b6138759190614a54565b90505b6001811115613915577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106138b7576138b6614632565b5b1a60f81b8282815181106138ce576138cd614632565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061390e90615173565b9050613878565b5060008414613959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613950906151e8565b60405180910390fd5b8091505092915050565b60008082905060005b84518110156139ae576139998286838151811061398c5761398b614632565b5b60200260200101516139c3565b915080806139a690614690565b91505061396c565b508091505092915050565b6000819050919050565b60008183106139db576139d682846139ee565b6139e6565b6139e583836139ee565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a4e81613a19565b8114613a5957600080fd5b50565b600081359050613a6b81613a45565b92915050565b600060208284031215613a8757613a86613a0f565b5b6000613a9584828501613a5c565b91505092915050565b60008115159050919050565b613ab381613a9e565b82525050565b6000602082019050613ace6000830184613aaa565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613b0e578082015181840152602081019050613af3565b60008484015250505050565b6000601f19601f8301169050919050565b6000613b3682613ad4565b613b408185613adf565b9350613b50818560208601613af0565b613b5981613b1a565b840191505092915050565b60006020820190508181036000830152613b7e8184613b2b565b905092915050565b6000819050919050565b613b9981613b86565b8114613ba457600080fd5b50565b600081359050613bb681613b90565b92915050565b600060208284031215613bd257613bd1613a0f565b5b6000613be084828501613ba7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c1482613be9565b9050919050565b613c2481613c09565b82525050565b6000602082019050613c3f6000830184613c1b565b92915050565b613c4e81613c09565b8114613c5957600080fd5b50565b600081359050613c6b81613c45565b92915050565b60008060408385031215613c8857613c87613a0f565b5b6000613c9685828601613c5c565b9250506020613ca785828601613ba7565b9150509250929050565b600060208284031215613cc757613cc6613a0f565b5b6000613cd584828501613c5c565b91505092915050565b613ce781613b86565b82525050565b6000602082019050613d026000830184613cde565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112613d2d57613d2c613d08565b5b8235905067ffffffffffffffff811115613d4a57613d49613d0d565b5b602083019150836020820283011115613d6657613d65613d12565b5b9250929050565b60008083601f840112613d8357613d82613d08565b5b8235905067ffffffffffffffff811115613da057613d9f613d0d565b5b602083019150836020820283011115613dbc57613dbb613d12565b5b9250929050565b60008060008060408587031215613ddd57613ddc613a0f565b5b600085013567ffffffffffffffff811115613dfb57613dfa613a14565b5b613e0787828801613d17565b9450945050602085013567ffffffffffffffff811115613e2a57613e29613a14565b5b613e3687828801613d6d565b925092505092959194509250565b600080600060608486031215613e5d57613e5c613a0f565b5b6000613e6b86828701613c5c565b9350506020613e7c86828701613c5c565b9250506040613e8d86828701613ba7565b9150509250925092565b6000819050919050565b613eaa81613e97565b8114613eb557600080fd5b50565b600081359050613ec781613ea1565b92915050565b600060208284031215613ee357613ee2613a0f565b5b6000613ef184828501613eb8565b91505092915050565b613f0381613e97565b82525050565b6000602082019050613f1e6000830184613efa565b92915050565b60008060408385031215613f3b57613f3a613a0f565b5b6000613f4985828601613eb8565b9250506020613f5a85828601613c5c565b9150509250929050565b60008083601f840112613f7a57613f79613d08565b5b8235905067ffffffffffffffff811115613f9757613f96613d0d565b5b602083019150836020820283011115613fb357613fb2613d12565b5b9250929050565b600080600060408486031215613fd357613fd2613a0f565b5b600084013567ffffffffffffffff811115613ff157613ff0613a14565b5b613ffd86828701613f64565b9350935050602061401086828701613ba7565b9150509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61405782613b1a565b810181811067ffffffffffffffff821117156140765761407561401f565b5b80604052505050565b6000614089613a05565b9050614095828261404e565b919050565b600067ffffffffffffffff8211156140b5576140b461401f565b5b6140be82613b1a565b9050602081019050919050565b82818337600083830152505050565b60006140ed6140e88461409a565b61407f565b9050828152602081018484840111156141095761410861401a565b5b6141148482856140cb565b509392505050565b600082601f83011261413157614130613d08565b5b81356141418482602086016140da565b91505092915050565b6000602082840312156141605761415f613a0f565b5b600082013567ffffffffffffffff81111561417e5761417d613a14565b5b61418a8482850161411c565b91505092915050565b6000610120820190506141a9600083018c613cde565b6141b6602083018b613cde565b6141c3604083018a613cde565b6141d06060830189613cde565b6141dd6080830188613cde565b6141ea60a0830187613cde565b6141f760c0830186613cde565b61420460e0830185613efa565b614212610100830184613aaa565b9a9950505050505050505050565b6000806040838503121561423757614236613a0f565b5b600061424585828601613ba7565b925050602061425685828601613c5c565b9150509250929050565b61426981613a9e565b811461427457600080fd5b50565b60008135905061428681614260565b92915050565b600080604083850312156142a3576142a2613a0f565b5b60006142b185828601613c5c565b92505060206142c285828601614277565b9150509250929050565b60008060008060008060008060006101208a8c0312156142ef576142ee613a0f565b5b60006142fd8c828d01613ba7565b995050602061430e8c828d01613ba7565b985050604061431f8c828d01613ba7565b97505060606143308c828d01613ba7565b96505060806143418c828d01613ba7565b95505060a06143528c828d01613ba7565b94505060c06143638c828d01613eb8565b93505060e06143748c828d01614277565b9250506101006143868c828d01614277565b9150509295985092959850929598565b600067ffffffffffffffff8211156143b1576143b061401f565b5b6143ba82613b1a565b9050602081019050919050565b60006143da6143d584614396565b61407f565b9050828152602081018484840111156143f6576143f561401a565b5b6144018482856140cb565b509392505050565b600082601f83011261441e5761441d613d08565b5b813561442e8482602086016143c7565b91505092915050565b6000806000806080858703121561445157614450613a0f565b5b600061445f87828801613c5c565b945050602061447087828801613c5c565b935050604061448187828801613ba7565b925050606085013567ffffffffffffffff8111156144a2576144a1613a14565b5b6144ae87828801614409565b91505092959194509250565b600080604083850312156144d1576144d0613a0f565b5b60006144df85828601613c5c565b92505060206144f085828601613c5c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061454157607f821691505b602082108103614554576145536144fa565b5b50919050565b7f53706c69747465723a204e6f2041646d696e205065726d697373696f6e000000600082015250565b6000614590601d83613adf565b915061459b8261455a565b602082019050919050565b600060208201905081810360008301526145bf81614583565b9050919050565b7f53706c69747465723a2053686f756c6420626520646966666572656e74000000600082015250565b60006145fc601d83613adf565b9150614607826145c6565b602082019050919050565b6000602082019050818103600083015261462b816145ef565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061469b82613b86565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036146cd576146cc614661565b5b600182019050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000614734602f83613adf565b915061473f826146d8565b604082019050919050565b6000602082019050818103600083015261476381614727565b9050919050565b7f53706c69747465723a204e6f2053706c697474657220526f6c65000000000000600082015250565b60006147a0601a83613adf565b91506147ab8261476a565b602082019050919050565b600060208201905081810360008301526147cf81614793565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148387fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826147fb565b61484286836147fb565b95508019841693508086168417925050509392505050565b6000819050919050565b600061487f61487a61487584613b86565b61485a565b613b86565b9050919050565b6000819050919050565b61489983614864565b6148ad6148a582614886565b848454614808565b825550505050565b600090565b6148c26148b5565b6148cd818484614890565b505050565b5b818110156148f1576148e66000826148ba565b6001810190506148d3565b5050565b601f82111561493657614907816147d6565b614910846147eb565b8101602085101561491f578190505b61493361492b856147eb565b8301826148d2565b50505b505050565b600082821c905092915050565b60006149596000198460080261493b565b1980831691505092915050565b60006149728383614948565b9150826002028217905092915050565b61498b82613ad4565b67ffffffffffffffff8111156149a4576149a361401f565b5b6149ae8254614529565b6149b98282856148f5565b600060209050601f8311600181146149ec57600084156149da578287015190505b6149e48582614966565b865550614a4c565b601f1984166149fa866147d6565b60005b82811015614a22578489015182556001820191506020850194506020810190506149fd565b86831015614a3f5784890151614a3b601f891682614948565b8355505b6001600288020188555050505b505050505050565b6000614a5f82613b86565b9150614a6a83613b86565b9250828201905080821115614a8257614a81614661565b5b92915050565b600060a082019050614a9d6000830188613cde565b614aaa6020830187613cde565b614ab76040830186613cde565b614ac46060830185613cde565b614ad16080830184613cde565b9695505050505050565b600081905092915050565b60008154614af381614529565b614afd8186614adb565b94506001821660008114614b185760018114614b2d57614b60565b60ff1983168652811515820286019350614b60565b614b36856147d6565b60005b83811015614b5857815481890152600182019150602081019050614b39565b838801955050505b50505092915050565b6000614b7482613ad4565b614b7e8185614adb565b9350614b8e818560208601613af0565b80840191505092915050565b6000614ba68286614ae6565b9150614bb28285614b69565b9150614bbe8284614ae6565b9150819050949350505050565b6000614bd682613b86565b9150614be183613b86565b9250828203905081811115614bf957614bf8614661565b5b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614c5b602683613adf565b9150614c6682614bff565b604082019050919050565b60006020820190508181036000830152614c8a81614c4e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614cc7602083613adf565b9150614cd282614c91565b602082019050919050565b60006020820190508181036000830152614cf681614cba565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000614d33601d83613adf565b9150614d3e82614cfd565b602082019050919050565b60006020820190508181036000830152614d6281614d26565b9050919050565b600081905092915050565b50565b6000614d84600083614d69565b9150614d8f82614d74565b600082019050919050565b6000614da582614d77565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000614e0b603a83613adf565b9150614e1682614daf565b604082019050919050565b60006020820190508181036000830152614e3a81614dfe565b9050919050565b60008160601b9050919050565b6000614e5982614e41565b9050919050565b6000614e6b82614e4e565b9050919050565b614e83614e7e82613c09565b614e60565b82525050565b6000614e958284614e72565b60148201915081905092915050565b6000614eaf82613b86565b9150614eba83613b86565b9250828202614ec881613b86565b91508282048414831517614edf57614ede614661565b5b5092915050565b600081519050919050565b600082825260208201905092915050565b6000614f0d82614ee6565b614f178185614ef1565b9350614f27818560208601613af0565b614f3081613b1a565b840191505092915050565b6000608082019050614f506000830187613c1b565b614f5d6020830186613c1b565b614f6a6040830185613cde565b8181036060830152614f7c8184614f02565b905095945050505050565b600081519050614f9681613a45565b92915050565b600060208284031215614fb257614fb1613a0f565b5b6000614fc084828501614f87565b91505092915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000614fff601083613adf565b915061500a82614fc9565b602082019050919050565b6000602082019050818103600083015261502e81614ff2565b9050919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061506b601783614adb565b915061507682615035565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006150b7601183614adb565b91506150c282615081565b601182019050919050565b60006150d88261505e565b91506150e48285614b69565b91506150ef826150aa565b91506150fb8284614b69565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061513d601483613adf565b915061514882615107565b602082019050919050565b6000602082019050818103600083015261516c81615130565b9050919050565b600061517e82613b86565b91506000820361519157615190614661565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006151d2602083613adf565b91506151dd8261519c565b602082019050919050565b60006020820190508181036000830152615201816151c5565b905091905056fea2646970667358221220325e8a47a67d94ceafec151edac961d9d30d68116c2297e8573e9872ee5ffcd664736f6c634300081200330000000000000000000000002412c008ed3caabfbd2bf9ee73d9fdb6f2180a21000000000000000000000000f535ae244a9b487107fd67970ad8b119e1b78ead
Deployed Bytecode
0x6080604052600436106102935760003560e01c806370a082311161015a578063b816d087116100c1578063da3ef23f1161007a578063da3ef23f146109d1578063e88d3b3e146109fa578063e985e9c514610a11578063f0fea4c814610a4e578063f234420814610a79578063f2fde38b14610aa457610293565b8063b816d087146108c3578063b88d4fde146108ec578063c668286214610915578063c87b56dd14610940578063d2d871e01461097d578063d547741f146109a857610293565b8063a217fddf11610113578063a217fddf146107db578063a22cb46514610806578063ae0cb9101461082f578063b03f768514610858578063b69f6df91461086f578063b7f70ac21461089a57610293565b806370a08231146106b7578063715018a6146106f45780638da5cb5b1461070b57806391d148541461073657806395d89b4114610773578063978139801461079e57610293565b80633ccfd60b116101fe57806355f804b3116101b757806355f804b3146105b15780635bf5d54c146105da5780635c975abb1461060d5780636352211e146106385780636c0360eb146106755780636c5c0991146106a057610293565b80633ccfd60b146104c657806340dbdd21146104dd57806342842e0e1461050657806342966c681461052f57806345de0d9b146105585780634eba67951461057457610293565b8063185e70b711610250578063185e70b7146103ba57806323b872dd146103e3578063248a9ca31461040c578063292005a2146104495780632f2ff15d1461047457806336568abe1461049d57610293565b806301ffc9a71461029857806306fdde03146102d5578063081812fc14610300578063095ea7b31461033d5780631526e0871461036657806318160ddd1461038f575b600080fd5b3480156102a457600080fd5b506102bf60048036038101906102ba9190613a71565b610acd565b6040516102cc9190613ab9565b60405180910390f35b3480156102e157600080fd5b506102ea610adf565b6040516102f79190613b64565b60405180910390f35b34801561030c57600080fd5b5061032760048036038101906103229190613bbc565b610b71565b6040516103349190613c2a565b60405180910390f35b34801561034957600080fd5b50610364600480360381019061035f9190613c71565b610bed565b005b34801561037257600080fd5b5061038d60048036038101906103889190613cb1565b610d93565b005b34801561039b57600080fd5b506103a4610eef565b6040516103b19190613ced565b60405180910390f35b3480156103c657600080fd5b506103e160048036038101906103dc9190613dc3565b610f06565b005b3480156103ef57600080fd5b5061040a60048036038101906104059190613e44565b610ff7565b005b34801561041857600080fd5b50610433600480360381019061042e9190613ecd565b611007565b6040516104409190613f09565b60405180910390f35b34801561045557600080fd5b5061045e611026565b60405161046b9190613ced565b60405180910390f35b34801561048057600080fd5b5061049b60048036038101906104969190613f24565b61102c565b005b3480156104a957600080fd5b506104c460048036038101906104bf9190613f24565b61104d565b005b3480156104d257600080fd5b506104db6110d0565b005b3480156104e957600080fd5b5061050460048036038101906104ff9190613cb1565b61110a565b005b34801561051257600080fd5b5061052d60048036038101906105289190613e44565b6111b7565b005b34801561053b57600080fd5b5061055660048036038101906105519190613bbc565b6111d7565b005b610572600480360381019061056d9190613fba565b6111e5565b005b34801561058057600080fd5b5061059b60048036038101906105969190613cb1565b611213565b6040516105a89190613ced565b60405180910390f35b3480156105bd57600080fd5b506105d860048036038101906105d3919061414a565b61122b565b005b3480156105e657600080fd5b506105ef611246565b60405161060499989796959493929190614193565b60405180910390f35b34801561061957600080fd5b5061062261128f565b60405161062f9190613ab9565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a9190613bbc565b6112a6565b60405161066c9190613c2a565b60405180910390f35b34801561068157600080fd5b5061068a6112b8565b6040516106979190613b64565b60405180910390f35b3480156106ac57600080fd5b506106b5611346565b005b3480156106c357600080fd5b506106de60048036038101906106d99190613cb1565b611358565b6040516106eb9190613ced565b60405180910390f35b34801561070057600080fd5b506107096113ec565b005b34801561071757600080fd5b50610720611400565b60405161072d9190613c2a565b60405180910390f35b34801561074257600080fd5b5061075d60048036038101906107589190613f24565b61142a565b60405161076a9190613ab9565b60405180910390f35b34801561077f57600080fd5b50610788611494565b6040516107959190613b64565b60405180910390f35b3480156107aa57600080fd5b506107c560048036038101906107c09190614220565b611526565b6040516107d29190613ced565b60405180910390f35b3480156107e757600080fd5b506107f061154b565b6040516107fd9190613f09565b60405180910390f35b34801561081257600080fd5b5061082d6004803603810190610828919061428c565b611552565b005b34801561083b57600080fd5b50610856600480360381019061085191906142cc565b6116c9565b005b34801561086457600080fd5b5061086d61182f565b005b34801561087b57600080fd5b50610884611841565b6040516108919190613c2a565b60405180910390f35b3480156108a657600080fd5b506108c160048036038101906108bc9190613cb1565b611867565b005b3480156108cf57600080fd5b506108ea60048036038101906108e59190613dc3565b6119fd565b005b3480156108f857600080fd5b50610913600480360381019061090e9190614437565b611b1b565b005b34801561092157600080fd5b5061092a611b8e565b6040516109379190613b64565b60405180910390f35b34801561094c57600080fd5b5061096760048036038101906109629190613bbc565b611c1c565b6040516109749190613b64565b60405180910390f35b34801561098957600080fd5b50610992611d39565b60405161099f9190613c2a565b60405180910390f35b3480156109b457600080fd5b506109cf60048036038101906109ca9190613f24565b611d5f565b005b3480156109dd57600080fd5b506109f860048036038101906109f3919061414a565b611d80565b005b348015610a0657600080fd5b50610a0f611d9b565b005b348015610a1d57600080fd5b50610a386004803603810190610a3391906144ba565b611ee4565b604051610a459190613ab9565b60405180910390f35b348015610a5a57600080fd5b50610a63611f78565b604051610a709190613ab9565b60405180910390f35b348015610a8557600080fd5b50610a8e611f99565b604051610a9b9190613c2a565b60405180910390f35b348015610ab057600080fd5b50610acb6004803603810190610ac69190613cb1565b611fbf565b005b6000610ad882612042565b9050919050565b606060068054610aee90614529565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1a90614529565b8015610b675780601f10610b3c57610100808354040283529160200191610b67565b820191906000526020600020905b815481529060010190602001808311610b4a57829003601f168201915b5050505050905090565b6000610b7c826120d4565b610bb2576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610bf882612133565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c5f576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610c7e6121ff565b73ffffffffffffffffffffffffffffffffffffffff1614610ce157610caa81610ca56121ff565b611ee4565b610ce0576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b82600a600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b610da06000801b3361142a565b610ddf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd6906145a6565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610e6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6690614612565b60405180910390fd5b610e7c6000801b8261102c565b610eab6000801b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611d5f565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610ef9612207565b6005546004540303905090565b610f0e612210565b818190508484905014610f4d576040517f17e37b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84849050811015610ff057828282818110610f6e57610f6d614632565b5b9050602002013560196000878785818110610f8c57610f8b614632565b5b9050602002016020810190610fa19190613cb1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080610fe990614690565b9050610f50565b5050505050565b61100283838361228e565b505050565b6000806000838152602001908152602001600020600101549050919050565b6115b381565b61103582611007565b61103e81612653565b6110488383612667565b505050565b611055612747565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146110c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b99061474a565b60405180910390fd5b6110cc828261274f565b5050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060004790506111068282612830565b5050565b6111347f10ec476f95b2ac17b26abe61aa04eca5036baf3b2845e79fbbb0fd495127a4583361142a565b611173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116a906147b6565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6111d283838360405180602001604052806000815250611b1b565b505050565b6111e2816001612924565b50565b6111fa8383836111f3612c3c565b6000612c4f565b6112043382612f0d565b61120e3382612fd1565b505050565b60196020528060005260406000206000915090505481565b611233612210565b80601890816112429190614982565b5050565b600d8060000154908060010154908060020154908060030154908060040154908060050154908060060154908060070154908060080160009054906101000a900460ff16905089565b6000600c60149054906101000a900460ff16905090565b60006112b182612133565b9050919050565b601880546112c590614529565b80601f01602080910402602001604051908101604052809291908181526020018280546112f190614529565b801561133e5780601f106113135761010080835404028352916020019161133e565b820191906000526020600020905b81548152906001019060200180831161132157829003601f168201915b505050505081565b61134e612210565b611356612fef565b565b60008061136483613052565b0361139b576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6113f4612210565b6113fe600061305c565b565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6060600780546114a390614529565b80601f01602080910402602001604051908101604052809291908181526020018280546114cf90614529565b801561151c5780601f106114f15761010080835404028352916020019161151c565b820191906000526020600020905b8154815290600101906020018083116114ff57829003601f168201915b5050505050905090565b6016602052816000526040600020602052806000526040600020600091509150505481565b6000801b81565b61155a6121ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115be576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600b60006115cb6121ff565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166116786121ff565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516116bd9190613ab9565b60405180910390a35050565b6116d1612210565b8385111561170b576040517f7616640100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600d600401549050811561172b576001816117289190614a54565b90505b6040518061012001604052808b81526020018a8152602001898152602001888152602001828152602001878152602001868152602001858152602001841515815250600d600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff021916908315150217905550905050897f1eac6b5b91b97537498543fce5db2429ccdd3b13445b508d3142bfc51c8736c78a8a8a8a8a60405161181b959493929190614a88565b60405180910390a250505050505050505050565b611837612210565b61183f613122565b565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6118746000801b3361142a565b6118b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118aa906145a6565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193a90614612565b60405180910390fd5b61196d7f10ec476f95b2ac17b26abe61aa04eca5036baf3b2845e79fbbb0fd495127a4588261102c565b6119b97f10ec476f95b2ac17b26abe61aa04eca5036baf3b2845e79fbbb0fd495127a458600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611d5f565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611a05612210565b818190508484905014611a44576040517f17e37b5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b84849050811015611b14576115b3838383818110611a6857611a67614632565b5b90506020020135611a77612c3c565b611a819190614a54565b1115611ab9576040517f1c07ee3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b03858583818110611acf57611ace614632565b5b9050602002016020810190611ae49190613cb1565b848484818110611af757611af6614632565b5b90506020020135612fd1565b80611b0d90614690565b9050611a47565b5050505050565b611b2684848461228e565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611b8857611b5184848484613185565b611b87576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60178054611b9b90614529565b80601f0160208091040260200160405190810160405280929190818152602001828054611bc790614529565b8015611c145780601f10611be957610100808354040283529160200191611c14565b820191906000526020600020905b815481529060010190602001808311611bf757829003601f168201915b505050505081565b6060611c27826120d4565b611c5d576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060188054611c6c90614529565b905011611d035760188054611c8090614529565b80601f0160208091040260200160405190810160405280929190818152602001828054611cac90614529565b8015611cf95780601f10611cce57610100808354040283529160200191611cf9565b820191906000526020600020905b815481529060010190602001808311611cdc57829003601f168201915b5050505050611d32565b6018611d0e836132d5565b6017604051602001611d2293929190614b9a565b6040516020818303038152906040525b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611d6882611007565b611d7181612653565b611d7b838361274f565b505050565b611d88612210565b8060179081611d979190614982565b5050565b611da361332f565b60003390506000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000611df6612c3c565b6115b3611e039190614bcb565b9050600082821115611e1757829050611e1b565b8190505b60008103611e55576040517f1c07ee3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008303611e8f576040517f1b8d378600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000601960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ede8482612fd1565b50505050565b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000600d600501544210158015611f945750600d600601544211155b905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611fc7612210565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612036576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161202d90614c71565b60405180910390fd5b61203f8161305c565b50565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061209d57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806120cd5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000816120df612207565b111580156120ee575060045482105b801561212c575060007c0100000000000000000000000000000000000000000000000000000000600860008581526020019081526020016000205416145b9050919050565b60008082905080612142612207565b116121c8576004548110156121c75760006008600083815260200190815260200160002054905060007c01000000000000000000000000000000000000000000000000000000008216036121c5575b600081036121bb576008600083600190039350838152602001908152602001600020549050612191565b80925050506121fa565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600033905090565b60006001905090565b612218612747565b73ffffffffffffffffffffffffffffffffffffffff16612236611400565b73ffffffffffffffffffffffffffffffffffffffff161461228c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228390614cdd565b60405180910390fd5b565b600061229982612133565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612300576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600a600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008573ffffffffffffffffffffffffffffffffffffffff166123596121ff565b73ffffffffffffffffffffffffffffffffffffffff1614806123885750612387866123826121ff565b611ee4565b5b806123c557506123966121ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050806123fe576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061240986613052565b03612440576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61244d8686866001613379565b600061245883613052565b1461249457600a600085815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055507c020000000000000000000000000000000000000000000000000000000060a042901b61255b87613052565b1717600860008681526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008416036125e357600060018501905060006008600083815260200190815260200160002054036125e15760045481146125e0578360086000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461264b868686600161337f565b505050505050565b6126648161265f612747565b613385565b50565b612671828261142a565b61274357600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506126e8612747565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b612759828261142a565b1561282c57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506127d1612747565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b80471015612873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286a90614d49565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405161289990614d9a565b60006040518083038185875af1925050503d80600081146128d6576040519150601f19603f3d011682016040523d82523d6000602084013e6128db565b606091505b505090508061291f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291690614e21565b60405180910390fd5b505050565b600061292f83612133565b905060008190506000600a600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508315612a3c5760008273ffffffffffffffffffffffffffffffffffffffff166129956121ff565b73ffffffffffffffffffffffffffffffffffffffff1614806129c457506129c3836129be6121ff565b611ee4565b5b80612a0157506129d26121ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b905080612a3a576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b612a4a826000876001613379565b6000612a5582613052565b14612a9157600a600086815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b600160806001901b03600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055507c02000000000000000000000000000000000000000000000000000000007c010000000000000000000000000000000000000000000000000000000060a042901b612b3085613052565b171717600860008781526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612bb95760006001860190506000600860008381526020019081526020016000205403612bb7576004548114612bb6578360086000838152602001908152602001600020819055505b5b505b84600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612c2382600087600161337f565b6005600081548092919060010191905055505050505050565b6000612c46612207565b60045403905090565b600033905060003490506000851480612c69575061271085115b15612ca0576040517fccfad01800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612ca8611f78565b612cde576040517fa213ecf100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d600101548585612cf09190614a54565b1115612d28576040517fdfedbeec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060166000600d60040154815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600d60020154118015612da65750600d600201548682612da49190614a54565b115b15612ddd576040517fbf7fbad100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d60080160009054906101000a900460ff16612ea857600083604051602001612e079190614e89565b604051602081830303815290604052805190602001209050612e70898980806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600d600701548361340a565b612ea6576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b600084600d60030154612ebb9190614bcb565b87612ec69190614ea4565b905080831015612f02576040517f6d35ff8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b600060166000600d60040154815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181612f739190614a54565b60166000600d60040154815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612feb828260405180602001604052806000815250613421565b5050565b612ff76136b1565b6000600c60146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61303b612747565b6040516130489190613c2a565b60405180910390a1565b6000819050919050565b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61312a61332f565b6001600c60146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861316e612747565b60405161317b9190613c2a565b60405180910390a1565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026131ab6121ff565b8786866040518563ffffffff1660e01b81526004016131cd9493929190614f3b565b6020604051808303816000875af192505050801561320957506040513d601f19601f820116820180604052508101906132069190614f9c565b60015b613282573d8060008114613239576040519150601f19603f3d011682016040523d82523d6000602084013e61323e565b606091505b50600081510361327a576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60606080604051019050806040528082600183039250600a81066030018353600a810490505b801561331b57600183039250600a81066030018353600a810490506132fb565b508181036020830392508083525050919050565b61333761128f565b15613377576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161336e90615015565b60405180910390fd5b565b50505050565b50505050565b61338f828261142a565b6134065761339c816136fa565b6133aa8360001c6020613727565b6040516020016133bb9291906150cd565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133fd9190613b64565b60405180910390fd5b5050565b6000826134178584613963565b1490509392505050565b60006004549050600061343385613052565b0361346a576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083036134a4576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134b16000858386613379565b600160406001901b178302600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555060e1613516600185146139b9565b901b60a042901b61352686613052565b1717600860008381526020019081526020016000208190555060008190506000848201905060008673ffffffffffffffffffffffffffffffffffffffff163b1461362a575b818673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46135da6000878480600101955087613185565b613610576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80821061356b57826004541461362557600080fd5b613695565b5b818060010192508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a480821061362b575b8160048190555050506136ab600085838661337f565b50505050565b6136b961128f565b6136f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136ef90615153565b60405180910390fd5b565b60606137208273ffffffffffffffffffffffffffffffffffffffff16601460ff16613727565b9050919050565b60606000600283600261373a9190614ea4565b6137449190614a54565b67ffffffffffffffff81111561375d5761375c61401f565b5b6040519080825280601f01601f19166020018201604052801561378f5781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106137c7576137c6614632565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061382b5761382a614632565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261386b9190614ea4565b6138759190614a54565b90505b6001811115613915577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106138b7576138b6614632565b5b1a60f81b8282815181106138ce576138cd614632565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061390e90615173565b9050613878565b5060008414613959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613950906151e8565b60405180910390fd5b8091505092915050565b60008082905060005b84518110156139ae576139998286838151811061398c5761398b614632565b5b60200260200101516139c3565b915080806139a690614690565b91505061396c565b508091505092915050565b6000819050919050565b60008183106139db576139d682846139ee565b6139e6565b6139e583836139ee565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a4e81613a19565b8114613a5957600080fd5b50565b600081359050613a6b81613a45565b92915050565b600060208284031215613a8757613a86613a0f565b5b6000613a9584828501613a5c565b91505092915050565b60008115159050919050565b613ab381613a9e565b82525050565b6000602082019050613ace6000830184613aaa565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613b0e578082015181840152602081019050613af3565b60008484015250505050565b6000601f19601f8301169050919050565b6000613b3682613ad4565b613b408185613adf565b9350613b50818560208601613af0565b613b5981613b1a565b840191505092915050565b60006020820190508181036000830152613b7e8184613b2b565b905092915050565b6000819050919050565b613b9981613b86565b8114613ba457600080fd5b50565b600081359050613bb681613b90565b92915050565b600060208284031215613bd257613bd1613a0f565b5b6000613be084828501613ba7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c1482613be9565b9050919050565b613c2481613c09565b82525050565b6000602082019050613c3f6000830184613c1b565b92915050565b613c4e81613c09565b8114613c5957600080fd5b50565b600081359050613c6b81613c45565b92915050565b60008060408385031215613c8857613c87613a0f565b5b6000613c9685828601613c5c565b9250506020613ca785828601613ba7565b9150509250929050565b600060208284031215613cc757613cc6613a0f565b5b6000613cd584828501613c5c565b91505092915050565b613ce781613b86565b82525050565b6000602082019050613d026000830184613cde565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112613d2d57613d2c613d08565b5b8235905067ffffffffffffffff811115613d4a57613d49613d0d565b5b602083019150836020820283011115613d6657613d65613d12565b5b9250929050565b60008083601f840112613d8357613d82613d08565b5b8235905067ffffffffffffffff811115613da057613d9f613d0d565b5b602083019150836020820283011115613dbc57613dbb613d12565b5b9250929050565b60008060008060408587031215613ddd57613ddc613a0f565b5b600085013567ffffffffffffffff811115613dfb57613dfa613a14565b5b613e0787828801613d17565b9450945050602085013567ffffffffffffffff811115613e2a57613e29613a14565b5b613e3687828801613d6d565b925092505092959194509250565b600080600060608486031215613e5d57613e5c613a0f565b5b6000613e6b86828701613c5c565b9350506020613e7c86828701613c5c565b9250506040613e8d86828701613ba7565b9150509250925092565b6000819050919050565b613eaa81613e97565b8114613eb557600080fd5b50565b600081359050613ec781613ea1565b92915050565b600060208284031215613ee357613ee2613a0f565b5b6000613ef184828501613eb8565b91505092915050565b613f0381613e97565b82525050565b6000602082019050613f1e6000830184613efa565b92915050565b60008060408385031215613f3b57613f3a613a0f565b5b6000613f4985828601613eb8565b9250506020613f5a85828601613c5c565b9150509250929050565b60008083601f840112613f7a57613f79613d08565b5b8235905067ffffffffffffffff811115613f9757613f96613d0d565b5b602083019150836020820283011115613fb357613fb2613d12565b5b9250929050565b600080600060408486031215613fd357613fd2613a0f565b5b600084013567ffffffffffffffff811115613ff157613ff0613a14565b5b613ffd86828701613f64565b9350935050602061401086828701613ba7565b9150509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61405782613b1a565b810181811067ffffffffffffffff821117156140765761407561401f565b5b80604052505050565b6000614089613a05565b9050614095828261404e565b919050565b600067ffffffffffffffff8211156140b5576140b461401f565b5b6140be82613b1a565b9050602081019050919050565b82818337600083830152505050565b60006140ed6140e88461409a565b61407f565b9050828152602081018484840111156141095761410861401a565b5b6141148482856140cb565b509392505050565b600082601f83011261413157614130613d08565b5b81356141418482602086016140da565b91505092915050565b6000602082840312156141605761415f613a0f565b5b600082013567ffffffffffffffff81111561417e5761417d613a14565b5b61418a8482850161411c565b91505092915050565b6000610120820190506141a9600083018c613cde565b6141b6602083018b613cde565b6141c3604083018a613cde565b6141d06060830189613cde565b6141dd6080830188613cde565b6141ea60a0830187613cde565b6141f760c0830186613cde565b61420460e0830185613efa565b614212610100830184613aaa565b9a9950505050505050505050565b6000806040838503121561423757614236613a0f565b5b600061424585828601613ba7565b925050602061425685828601613c5c565b9150509250929050565b61426981613a9e565b811461427457600080fd5b50565b60008135905061428681614260565b92915050565b600080604083850312156142a3576142a2613a0f565b5b60006142b185828601613c5c565b92505060206142c285828601614277565b9150509250929050565b60008060008060008060008060006101208a8c0312156142ef576142ee613a0f565b5b60006142fd8c828d01613ba7565b995050602061430e8c828d01613ba7565b985050604061431f8c828d01613ba7565b97505060606143308c828d01613ba7565b96505060806143418c828d01613ba7565b95505060a06143528c828d01613ba7565b94505060c06143638c828d01613eb8565b93505060e06143748c828d01614277565b9250506101006143868c828d01614277565b9150509295985092959850929598565b600067ffffffffffffffff8211156143b1576143b061401f565b5b6143ba82613b1a565b9050602081019050919050565b60006143da6143d584614396565b61407f565b9050828152602081018484840111156143f6576143f561401a565b5b6144018482856140cb565b509392505050565b600082601f83011261441e5761441d613d08565b5b813561442e8482602086016143c7565b91505092915050565b6000806000806080858703121561445157614450613a0f565b5b600061445f87828801613c5c565b945050602061447087828801613c5c565b935050604061448187828801613ba7565b925050606085013567ffffffffffffffff8111156144a2576144a1613a14565b5b6144ae87828801614409565b91505092959194509250565b600080604083850312156144d1576144d0613a0f565b5b60006144df85828601613c5c565b92505060206144f085828601613c5c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061454157607f821691505b602082108103614554576145536144fa565b5b50919050565b7f53706c69747465723a204e6f2041646d696e205065726d697373696f6e000000600082015250565b6000614590601d83613adf565b915061459b8261455a565b602082019050919050565b600060208201905081810360008301526145bf81614583565b9050919050565b7f53706c69747465723a2053686f756c6420626520646966666572656e74000000600082015250565b60006145fc601d83613adf565b9150614607826145c6565b602082019050919050565b6000602082019050818103600083015261462b816145ef565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061469b82613b86565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036146cd576146cc614661565b5b600182019050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000614734602f83613adf565b915061473f826146d8565b604082019050919050565b6000602082019050818103600083015261476381614727565b9050919050565b7f53706c69747465723a204e6f2053706c697474657220526f6c65000000000000600082015250565b60006147a0601a83613adf565b91506147ab8261476a565b602082019050919050565b600060208201905081810360008301526147cf81614793565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148387fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826147fb565b61484286836147fb565b95508019841693508086168417925050509392505050565b6000819050919050565b600061487f61487a61487584613b86565b61485a565b613b86565b9050919050565b6000819050919050565b61489983614864565b6148ad6148a582614886565b848454614808565b825550505050565b600090565b6148c26148b5565b6148cd818484614890565b505050565b5b818110156148f1576148e66000826148ba565b6001810190506148d3565b5050565b601f82111561493657614907816147d6565b614910846147eb565b8101602085101561491f578190505b61493361492b856147eb565b8301826148d2565b50505b505050565b600082821c905092915050565b60006149596000198460080261493b565b1980831691505092915050565b60006149728383614948565b9150826002028217905092915050565b61498b82613ad4565b67ffffffffffffffff8111156149a4576149a361401f565b5b6149ae8254614529565b6149b98282856148f5565b600060209050601f8311600181146149ec57600084156149da578287015190505b6149e48582614966565b865550614a4c565b601f1984166149fa866147d6565b60005b82811015614a22578489015182556001820191506020850194506020810190506149fd565b86831015614a3f5784890151614a3b601f891682614948565b8355505b6001600288020188555050505b505050505050565b6000614a5f82613b86565b9150614a6a83613b86565b9250828201905080821115614a8257614a81614661565b5b92915050565b600060a082019050614a9d6000830188613cde565b614aaa6020830187613cde565b614ab76040830186613cde565b614ac46060830185613cde565b614ad16080830184613cde565b9695505050505050565b600081905092915050565b60008154614af381614529565b614afd8186614adb565b94506001821660008114614b185760018114614b2d57614b60565b60ff1983168652811515820286019350614b60565b614b36856147d6565b60005b83811015614b5857815481890152600182019150602081019050614b39565b838801955050505b50505092915050565b6000614b7482613ad4565b614b7e8185614adb565b9350614b8e818560208601613af0565b80840191505092915050565b6000614ba68286614ae6565b9150614bb28285614b69565b9150614bbe8284614ae6565b9150819050949350505050565b6000614bd682613b86565b9150614be183613b86565b9250828203905081811115614bf957614bf8614661565b5b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614c5b602683613adf565b9150614c6682614bff565b604082019050919050565b60006020820190508181036000830152614c8a81614c4e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614cc7602083613adf565b9150614cd282614c91565b602082019050919050565b60006020820190508181036000830152614cf681614cba565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000614d33601d83613adf565b9150614d3e82614cfd565b602082019050919050565b60006020820190508181036000830152614d6281614d26565b9050919050565b600081905092915050565b50565b6000614d84600083614d69565b9150614d8f82614d74565b600082019050919050565b6000614da582614d77565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b6000614e0b603a83613adf565b9150614e1682614daf565b604082019050919050565b60006020820190508181036000830152614e3a81614dfe565b9050919050565b60008160601b9050919050565b6000614e5982614e41565b9050919050565b6000614e6b82614e4e565b9050919050565b614e83614e7e82613c09565b614e60565b82525050565b6000614e958284614e72565b60148201915081905092915050565b6000614eaf82613b86565b9150614eba83613b86565b9250828202614ec881613b86565b91508282048414831517614edf57614ede614661565b5b5092915050565b600081519050919050565b600082825260208201905092915050565b6000614f0d82614ee6565b614f178185614ef1565b9350614f27818560208601613af0565b614f3081613b1a565b840191505092915050565b6000608082019050614f506000830187613c1b565b614f5d6020830186613c1b565b614f6a6040830185613cde565b8181036060830152614f7c8184614f02565b905095945050505050565b600081519050614f9681613a45565b92915050565b600060208284031215614fb257614fb1613a0f565b5b6000614fc084828501614f87565b91505092915050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000614fff601083613adf565b915061500a82614fc9565b602082019050919050565b6000602082019050818103600083015261502e81614ff2565b9050919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061506b601783614adb565b915061507682615035565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b60006150b7601183614adb565b91506150c282615081565b601182019050919050565b60006150d88261505e565b91506150e48285614b69565b91506150ef826150aa565b91506150fb8284614b69565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b600061513d601483613adf565b915061514882615107565b602082019050919050565b6000602082019050818103600083015261516c81615130565b9050919050565b600061517e82613b86565b91506000820361519157615190614661565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b60006151d2602083613adf565b91506151dd8261519c565b602082019050919050565b60006020820190508181036000830152615201816151c5565b905091905056fea2646970667358221220325e8a47a67d94ceafec151edac961d9d30d68116c2297e8573e9872ee5ffcd664736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002412c008ed3caabfbd2bf9ee73d9fdb6f2180a21000000000000000000000000f535ae244a9b487107fd67970ad8b119e1b78ead
-----Decoded View---------------
Arg [0] : splitterAdmin (address): 0x2412C008ED3CAaBfBD2bF9Ee73D9fDB6F2180A21
Arg [1] : splitterAddress (address): 0xf535AE244A9b487107FD67970aD8b119E1b78eaD
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000002412c008ed3caabfbd2bf9ee73d9fdb6f2180a21
Arg [1] : 000000000000000000000000f535ae244a9b487107fd67970ad8b119e1b78ead
Loading...
Loading
Loading...
Loading
[ 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.